Skip to content

Commit

Permalink
Merge pull request #59 from P-1884/Truncated-redshift-distribution-fix
Browse files Browse the repository at this point in the history
Bug fix: Truncated Redshift distribution
  • Loading branch information
swagnercarena committed Jul 9, 2024
2 parents 3a51d30 + 66dc8c6 commit 3cebbd4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions paltas/Sampling/distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,10 @@ def __call__(self):
clip = (z_lens - self.z_source_mean) / self.z_source_std
# number of std. devs away to stop (negative)
if(clip > self.z_source_min):
self.z_source_min = clip
z_source_min = clip
else: z_source_min = self.z_source_min
# define truncnorm dist for source redshift
z_source = truncnorm(self.z_source_min,np.inf,self.z_source_mean,
z_source = truncnorm(z_source_min,np.inf,self.z_source_mean,
self.z_source_std).rvs()

return z_lens,z_source
Expand Down

0 comments on commit 3cebbd4

Please sign in to comment.