Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to deal with npts=0 data in a consistent way #106

Open
mdecleir opened this issue Mar 2, 2022 · 0 comments
Open

Need to deal with npts=0 data in a consistent way #106

mdecleir opened this issue Mar 2, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@mdecleir
Copy link
Collaborator

mdecleir commented Mar 2, 2022

In some parts of the code, unit transformations and other calculations are done on both the good data (npts>0) and the bad data (npts=0). However, in other parts, the npts=0 data are ignored. In the example below, the extinction values will be converted from E(lambda-V) to E(lambda-V)/E(B-V) for all data (npts=0 and >0), but the uncertainties are only converted for good data (npts>0). We should discuss what the goal is of the npts=0, and if we want to make sure that all calculations still propagate correctly for those data, or if we want to completely ignore those data throughout, or if we want to set extinctions and uncertainties to 0 for those data, etc. Once a decision has been made, this should be applied consistently throughout the code.

Also, special considerations need to be made for the V-band (see issue #105).

# only compute where there is data and exts is not zero
gvals = (self.exts[curname] != 0) & (self.npts[curname] > 0)
self.uncs[curname][gvals] = (self.exts[curname][gvals] / fullebv[0]) * np.sqrt(
np.square(self.uncs[curname][gvals] / self.exts[curname][gvals])
+ np.square(fullebv[1] / fullebv[0])
)
self.exts[curname] /= fullebv[0]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants