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
DM-27106: Add array-based operations to simple photoCalib routines. #630
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for using astropy units for magnitudes and fluxes here. The more places we can get rid of people hard-coding 3631, the better!
My only substantial objection is the usual one about making the internals of the PhotoCalib object visible in the public API. It's unfortunate that we've built up an API in afw that is now not going to be used much since most people (even within DM) are going to pandas/parquet tables.
Parameters | ||
---------- | ||
instFluxes : `np.ndarray` (N,) | ||
Array of instFluxes to convert. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that instFluxes have units of counts?
Parameters | ||
---------- | ||
x : `np.ndarray` (N,) | ||
Array of x values. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should all these x/y parameters say they are in pixels? Should we also say that in the method docstrings (where you say "for numpy arrays")?
tests/test_photoCalib.py
Outdated
pointXShiftXArray, | ||
pointXShiftYArray | ||
) | ||
np.testing.assert_array_equal(localCalib2, localCalib) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want explicit equality here? We do have self.assertFloatsEqual()
for that.
998eb60
to
ca9ea09
Compare
ca9ea09
to
166cd07
Compare
This also adds a property to know if the given photoCalib is constant (spatially-varying) or not.