Skip to content

Commit

Permalink
Make sure it's actually Gaussian, and not other type of spectrum with…
Browse files Browse the repository at this point in the history
… a single bin
  • Loading branch information
israelmcmc committed Jul 19, 2024
1 parent a6ecd0b commit 2782114
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cosipy/response/FullDetectorResponse.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def _open_rsp(cls, filename, Spectrumfile=None,norm="Linear" ,single_pixel = Fal

#if we have one single bin, treat the gaussian norm like the mono one
#also check that the gaussian spectrum is fully contained in that bin
if len(ewidth) == 1 :
if len(ewidth) == 1 and norm == "Gaussian":
edges = dr.axes['Ei'].edges
gauss_int = 0.5 * (1 + erf( (edges[0]-Gauss_mean)/(4*np.sqrt(2)) ) ) + 0.5 * (1 + erf( (edges[1]-Gauss_mean)/(4*np.sqrt(2)) ) )

Expand Down

0 comments on commit 2782114

Please sign in to comment.