ex-3: fix some minor mistakes
This commit is contained in:
parent
a82bbfaec0
commit
dcadf3c763
@ -65,7 +65,7 @@ int chisquared_f(const gsl_vector *par,
|
|||||||
|
|
||||||
/* Return an error (invalid domain) if
|
/* Return an error (invalid domain) if
|
||||||
* the current bin is empty. That would
|
* the current bin is empty. That would
|
||||||
* be division by zero.
|
* be square root of negative number.
|
||||||
*/
|
*/
|
||||||
if (expected < 0) {
|
if (expected < 0) {
|
||||||
//fprintf(stderr, "[warning] bin %ld:%ld p<0 (%.2g, %.2g, %.2g)\n",
|
//fprintf(stderr, "[warning] bin %ld:%ld p<0 (%.2g, %.2g, %.2g)\n",
|
||||||
|
@ -63,13 +63,13 @@ double distr(const gsl_vector *par,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* `grad_distr(par, event, grad)`
|
/* `grad_distr(par, event, grad)`
|
||||||
* computes the gradient of F(α,β,γ; α,β) as:
|
* computes the gradient of F(α,β,γ; θ,φ) as:
|
||||||
*
|
*
|
||||||
* ⎡ 3/2⋅cos²(θ) - 1/2 ⎤
|
* ⎡ 3/2⋅cos²(θ) - 1/2 ⎤
|
||||||
* ⎢ ⎥
|
* ⎢ ⎥
|
||||||
* ⎢ sin²(θ)⋅cos(2φ) ⎥ 3/(4π)
|
* ⎢ -sin²(θ)⋅cos(2φ) ⎥ 3/(4π)
|
||||||
* ⎢ ⎥
|
* ⎢ ⎥
|
||||||
* ⎣ √2⋅sin(2θ)⋅cos(φ) ⎦
|
* ⎣ -√2⋅sin(2θ)⋅cos(φ) ⎦
|
||||||
*
|
*
|
||||||
* where `par` is [α,β,γ], `event` is the angle
|
* where `par` is [α,β,γ], `event` is the angle
|
||||||
* structure. The results is stored in the
|
* structure. The results is stored in the
|
||||||
|
@ -9,8 +9,7 @@ bins = tuple(map(int, sys.stdin.readline().split()))
|
|||||||
xedges, yedges, counts = loadtxt(sys.stdin, unpack=True, usecols=[0,2,4])
|
xedges, yedges, counts = loadtxt(sys.stdin, unpack=True, usecols=[0,2,4])
|
||||||
counts = counts.reshape(bins)
|
counts = counts.reshape(bins)
|
||||||
|
|
||||||
plt.rcParams['font.size'] = 30
|
plt.rcParams['font.size'] = 12
|
||||||
tight_layout()
|
|
||||||
suptitle('Angular decay distribution')
|
suptitle('Angular decay distribution')
|
||||||
|
|
||||||
#subplot2grid((1, 3), (0, 0), colspan=2, aspect='equal')
|
#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)))
|
# facecolors=cm.viridis(norm(counts)))
|
||||||
#axis('off')
|
#axis('off')
|
||||||
|
|
||||||
|
tight_layout()
|
||||||
show()
|
show()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user