LSSTDESC / rail_gpz_v1

RAIL-wrapped version of Peter Hatfields pure python implementation of GPz-v1
MIT License
0 stars 1 forks source link

add mask replacement of nan and negative mag errors #18

Closed sschmidt23 closed 4 months ago

sschmidt23 commented 4 months ago

Addresses #17 where Henrique was having problems because data contains np.nan for magnitudes and magnitude errors, and any magnitude errors that are <=0.0 (GPz by default takes the log of the errors). This adds a simple mask check to the data processing to get rid of those values. It also adds a new parameter where you can set the value to replace the negative magnitude errors with in each band. I tested this on some data where I replaces inputs so that they had some NaNs and negative mag errors and all were caught and replaced.

Code Quality