#38 closed defect (fixed)
BSCALE/BZERO Processing in FITS Read
| Reported by: | 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:
- Ignore the BSCALE/BZERO of the image file altogether (using fits_set_bscale)
- Add a psElemType parameter in which the output image should be.
| 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
Note:
See TracTickets
for help on using tickets.

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