-
Notifications
You must be signed in to change notification settings - Fork 15
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
Automatic Flagging of Negative Magnitudes #112
Comments
I'm somehow against such changes of code based on changes of opinion. Somebody could have written a code/script that depends on our error, so a change in that could result in lack of compatibility. |
Well, I guess my expectation is that if we set a "bad" array when we import the data, it won't raise the exception. So, that's the simplest change, and my preference. That allows the user to flag the bad points without manually editing the data file. A more complicated change would be to allow "bad" to take some kind of conditional. But that's probably TOO complicated. |
First, do you really mean 'if we import a data file with negative magnitude values'? Or maybe negative uncertainties (in either mag or flux space)? |
Currently, if we import a data file with negative magnitude values, it raises the following error:
ValueError: Scaling of magnitude uncertainties to flux space resulted in zero or negative values. Maybe the photometry format is in fact 'flux', not 'mag' (as you indicated). File name: [your file]
This necessitates flagging all the negative magnitudes beforehand. This is even a problem if I include a
bad
data array to flag those points.What if instead, we raised a warning and automatically set those points to
bad
?The text was updated successfully, but these errors were encountered: