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
The nom-tam-fits library exposes too many low-level methods. Apart from making the library confusing to use, they are also dangerous because they promote misuse.
For example, consider the setNaxes(int), setNAxis(int, int), setSimple(boolean), or setBitpix(BitPix) methods in Header. Say, you created the HDU with a float[32][40] image (or read an existing FITS file with such an image). That image itself defines that BITPIX should be -32, NAXIS = 2, NAXIS1 = 40, NAXIS2 = 32. And, whether or not this HDU is the primary HDU in a FITS file decides whether the header should start with a SIMPLE or XTENSION key. By allowing the user to tinker with these properties, we can mess up the FITS header in a way that it no longer represents the data that is associated with it, and can result in creating corrupted unreadable FITS files.
Therefore, we should deprecate such unsafe methods, so they can either be removed or have reduced visibility in a future major release (2.0). As such this issue is a pre-requisite of #174.
The text was updated successfully, but these errors were encountered:
The nom-tam-fits library exposes too many low-level methods. Apart from making the library confusing to use, they are also dangerous because they promote misuse.
For example, consider the
setNaxes(int)
,setNAxis(int, int)
,setSimple(boolean)
, orsetBitpix(BitPix)
methods inHeader
. Say, you created the HDU with afloat[32][40]
image (or read an existing FITS file with such an image). That image itself defines thatBITPIX
should be -32,NAXIS
= 2,NAXIS1
= 40,NAXIS2
= 32. And, whether or not this HDU is the primary HDU in a FITS file decides whether the header should start with aSIMPLE
orXTENSION
key. By allowing the user to tinker with these properties, we can mess up the FITS header in a way that it no longer represents the data that is associated with it, and can result in creating corrupted unreadable FITS files.Therefore, we should deprecate such unsafe methods, so they can either be removed or have reduced visibility in a future major release (2.0). As such this issue is a pre-requisite of #174.
The text was updated successfully, but these errors were encountered: