IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 22 years ago

Closed 22 years ago

Last modified 22 years ago

#38 closed defect (fixed)

BSCALE/BZERO Processing in FITS Read

Reported by: robert.desonia@… Owned by: eugene
Priority: high Milestone:
Component: PSLib SDRS Version: unspecified
Severity: normal Keywords:
Cc:

Description

Since the psImageReadSection does not specify the desired datatype of the output
image, I'm, therefore, assuming that it should match the datatype of the file
(i.e., same as the bitPix). This is a problem, however, if BSCALE!=1 or
BZERO!=0. CFITSIO, by default, applies the file's BSCALE/BZERO to the data at
read time and might result in a pixel value range not matching the datatype's range.

There are three options that come to mind:

  1. Ignore the BSCALE/BZERO of the image file altogether (using fits_set_bscale)
  2. Add a psElemType parameter in which the output image should be.
If BSCALE!=1
BZERO!=0, force the output image type to be a float (or

double if file datatype is 32-bit int as to preserve precision?).

Let me know which behavior you prefer me to implement.

-rdd

Change History (1)

comment:1 by eugene, 22 years ago

Resolution: fixed
Status: newclosed

we've agreed to go with option 1 for now:

  1. Ignore the BSCALE/BZERO of the image file altogether (using fits_set_bscale)
Note: See TracTickets for help on using tickets.