Skip to content

Commit

Permalink
Fixed bugs in variable halo
Browse files Browse the repository at this point in the history
  • Loading branch information
eblur committed Jul 21, 2020
1 parent 5e4e387 commit 3ca4cd0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions newdust/halos/galhalo.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def fake_variable_image(self, time, lc, arf,
else:
imin = min(np.arange(len(self.lam))[self.lam >= lmin])
if lmax is None:
iend = -1
iend = len(self.lam)
else:
iend = max(np.arange(len(self.lam))[self.lam <= lmax])

Expand Down Expand Up @@ -264,7 +264,8 @@ def fake_variable_image(self, time, lc, arf,
result = np.zeros_like(radius)
for i in np.arange(imin, iend):
h_interp = InterpolatedUnivariateSpline(
self.theta, var_profile[i,:] * int_conv[i], k=1) # ct/s/arcsec^2
self.theta, var_profile[i,:] * int_conv[i], k=1,
ext=1) # ct/s/arcsec^2
# corresponding counts at each radial value in the grid
pix_flux = h_interp(r_asec) * pix_scale**2 * exposure # cts
# use poisson statistics to get a random value
Expand Down

0 comments on commit 3ca4cd0

Please sign in to comment.