ex-3: fix some minor mistakes

master
Michele Guerini Rocco 2020-05-27 22:49:36 +02:00
parent a82bbfaec0
commit dcadf3c763
3 changed files with 9 additions and 10 deletions

View File

@ -65,7 +65,7 @@ int chisquared_f(const gsl_vector *par,
/* Return an error (invalid domain) if
* the current bin is empty. That would
* be division by zero.
* be square root of negative number.
*/
if (expected < 0) {
//fprintf(stderr, "[warning] bin %ld:%ld p<0 (%.2g, %.2g, %.2g)\n",

View File

@ -63,13 +63,13 @@ double distr(const gsl_vector *par,
}
/* `grad_distr(par, event, grad)`
* computes the gradient of F(α,β,γ; α,β) as:
* computes the gradient of F(α,β,γ; θ,φ) as:
*
* 3/2cos²(θ) - 1/2
*
* sin²(θ)cos(2φ) 3/(4π)
*
* 2sin(2θ)cos(φ)
* 3/2cos²(θ) - 1/2
*
* -sin²(θ)cos(2φ) 3/(4π)
*
* -2sin(2θ)cos(φ)
*
* where `par` is [α,β,γ], `event` is the angle
* structure. The results is stored in the

View File

@ -9,8 +9,7 @@ bins = tuple(map(int, sys.stdin.readline().split()))
xedges, yedges, counts = loadtxt(sys.stdin, unpack=True, usecols=[0,2,4])
counts = counts.reshape(bins)
plt.rcParams['font.size'] = 30
tight_layout()
plt.rcParams['font.size'] = 12
suptitle('Angular decay distribution')
#subplot2grid((1, 3), (0, 0), colspan=2, aspect='equal')
@ -29,5 +28,5 @@ norm = colorbar(fraction=0.023, pad=0.04).norm
# facecolors=cm.viridis(norm(counts)))
#axis('off')
tight_layout()
show()