Closed michaelaye closed 6 years ago
@michaelaye Sorry for the long delay on this. The default is to use the standard uint16 bit value, but it is only the default. The code automatically converts the image to a 32-bit floating point internally. For making a cosmic ray mask, this is nearly always sufficient. If you need higher precision for some reason, we should talk. In that case, I would recommend not using the "cleaned" array, but only take the mask. Feel free to close this if it answers your question.
Thanks.
Just to be clear, that seems to mean that detect_cosmics
works with all input ranges and all input data-types?
As far as I know it should. If you run into issues let me know. You just need to set the saturate and gain values accordingly.
On Tue, Dec 19, 2017 at 4:40 PM K.-Michael Aye notifications@github.com wrote:
Thanks. Just to be clear, that seems to mean that detect_cosmics works with all input ranges and all input data-types?
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/astropy/astroscrappy/issues/27#issuecomment-352930228, or mute the thread https://github.com/notifications/unsubscribe-auth/AFFcHDcRNedbEsRAAv3weIprlSdsDGatks5tCFdygaJpZM4M2VOM .
@michaelaye Does this answer your question so I can close this?
Closing this. Let me know if I need to reopen.
The doctext of
detect_cosmics
says that the input should be a float numpy array, but the parametersatlevel
default is given as 65538, which indicates that the function expects a uint16 data-type? By convention, float dtype image data should be 0.0...1.0 (or sometimes -1.0...1.0) but not use uint16 numbers up to 2**16. Could you clarify ifdetect_cosmics
requiresfloat
, but as I described above, that somehow doesn't fit with satlevel default, and while testing, it seems to do something properly with a uint8 input?)Thanks!