Skip to content
Snippets Groups Projects
Commit 09789ac5 authored by Colm Talbot's avatar Colm Talbot
Browse files

MAINT: simplify the healpix distance pdf call

parent 32074018
No related branches found
No related tags found
No related merge requests found
......@@ -1459,7 +1459,7 @@ class HealPixMapPriorDist(BaseJointPriorDist):
self.distance_pdf = lambda r: self.distnorm[pix_idx] * norm(
loc=self.distmu[pix_idx], scale=self.distsigma[pix_idx]
).pdf(r)
pdfs = self.rs ** 2 * norm(loc=self.distmu[pix_idx], scale=self.distsigma[pix_idx]).pdf(self.rs)
pdfs = self.rs ** 2 * self.distance_pdf(self.rs)
cdfs = np.cumsum(pdfs) / np.sum(pdfs)
self.distance_icdf = interp1d(cdfs, self.rs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment