Skip to content

Commit

Permalink
Update lephare.py (#25)
Browse files Browse the repository at this point in the history
* Update lephare.py

This was a simple bug possibly caused by a git merge not being properly managed.

* test running but olnly covering inform initialisation

What is minimum imports and data required for test golden spike uncitonality

* Including one assert in the inform_stage unit test.

---------

Co-authored-by: Raphael Shirley <[email protected]>
Co-authored-by: Drew Oldag <[email protected]>
  • Loading branch information
3 people authored Apr 26, 2024
1 parent bd5118d commit 6b0a9ae
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/rail/estimation/algos/lephare.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,28 +189,6 @@ def __init__(self, args, comm=None):
self.lephare_config = lp.read_config(self.config["lephare_config_file"])
self.photz = lp.PhotoZ(self.lephare_config)

def _estimate_pdf(self, onesource):
"""Return the pdf of a single source.
Do we want to resample on RAIL z grid?
"""
# Check this is the best way to access pdf
pdf = onesource.pdfmap[11] # 11 = Bayesian galaxy redshift
# return the PDF as an array alongside lephare native zgrid
return np.array(pdf.vPDF), np.array(pdf.xaxis)

# Default local parameters
self.config_file = "{}/{}".format(
os.path.dirname(os.path.abspath(__file__)), "lsst.para"
)
self.lephare_config = lp.read_config(self.config_file)
self.photz = lp.PhotoZ(self.lephare_config)
print("init")

# def open_model(self, **kwargs):
# CatEstimator.open_model(self, **kwargs)
# self.modeldict = self.model

def _estimate_pdf(self, onesource):
"""Return the pdf of a single source.
Expand Down

0 comments on commit 6b0a9ae

Please sign in to comment.