ossama-othman / MaRC

MaRC - Map Reprojections and Conversions
GNU Lesser General Public License v2.1
1 stars 0 forks source link

MaRC input file DATA_OFFSET and DATA_SCALE may cause errors #69

Open ossama-othman opened 6 years ago

ossama-othman commented 6 years ago

The MaRC input file DATA_OFFSET and DATA_SCALE keywords are not well tested in how they interact with some of the automatic scaling that MaRC performs, such as the automatic virtual image data scaling for integer typed maps. Setting either of these values will cause MaRC to set the FITS BZERO and/or BSCALE keywords in the FITS file, which will in turn cause underlying FITS library (CFITSIO) to scale the data accordingly.

At the very least, MaRC should disable CFITSIO's automatic scaling as it already does for its virtual images. However, that's simply a work around for a design issue in MaRC. Deprecating the MaRC input file DATA_OFFSET and DATA_SCALE keyword support in favor of pulling the corresponding values from the source image FITS files and automatically determining if they can be used seems like a better way to go.