You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
Instead, we could extend the arguments of MulensData. The best one would be to allow something like bad='negative_uncertainties' that will change to the behavior you want. Agreed?
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)?
Second, we cannot change the code in v2 to work differently, cause it could breaks somebody's code that uses MM. Either we do extension that doesn't change the previous behavior (and stay in v2) or we change what we want in v3.
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: