Starlink / starlink

Starlink Software Collection
160 stars 53 forks source link

AstLib: Setting CarLin=0 or CarLin=1 does not seem to have any effect #23

Closed pfederl closed 10 years ago

pfederl commented 10 years ago

In astlib version 7.3.2 setting CarLin=0 or CarLin=1 on FitsChan does not seem to have any effect. In version 7.0.6 setting CarLin seemed to work. Here is an example FITS header on which it does not work for me (i.e. calling astTranN returns the same result whether I set CarLin=0 or CarLin=1):

SIMPLE  =                    T / file does conform to FITS standard
BITPIX  =                  -32 / number of bits per data pixel
NAXIS   =                    3 / number of data axes
NAXIS1  =                   81 / length of data axis 1
NAXIS2  =                   59 / length of data axis 2
NAXIS3  =                    1 / length of data axis 3
EXTEND  =                    T / FITS dataset may contain extensions
COMMENT   FITS (Flexible Image Transport System) format is defined in 'Astronomy
COMMENT   and Astrophysics', volume 376, page 359; bibcode: 2001A&A...376..359H
OBJECT  = 'GALFACTS Field 1 Polarized Intensity' / Object name
CTYPE1  = 'RA---CAR'           /  1st axis type
CRVAL1  =            63.224998 /  Reference pixel value
CRPIX1  = -6.150000000000000E+01 /  Reference pixel
CDELT1  =           -0.0166667 /  Pixel size in world coordinate units
CROTA1  =               0.0000 /  Axis rotation in degrees
CTYPE2  = 'DEC--CAR'           /  2nd axis type
CRVAL2  =            28.650000 /  Reference pixel value
CRPIX2  = 1.650000000000000E+01 /  Reference pixel
CDELT2  =            0.0166667 /  Pixel size in world coordinate units
CROTA2  =               0.0000 /  Axis rotation in degrees
CTYPE3  = 'FREQ'               /  3rd axis type
CRVAL3  =    1451974016.000000 /  Reference pixel value
CRPIX3  =                 1.00 /  Reference pixel
CDELT3  =    126000000.0000000 /  Pixel size in world coordinate units
CROTA3  =               0.0000 /  Axis rotation in degrees
EQUINOX =              2000.00 /  Equinox of coordinates (if any)
BUNIT   = 'Kelvin'                                 /  Units of pixel data values
BTYPE   = 'Polarized Intensity'
END

The online AST Grid Plotter (http://starlink.jach.hawaii.edu/cgi-bin/ast/fits-plotter) seems to work fine though.

dsberry commented 10 years ago

This bug is fixed by commit c0413b8b02 . The new version of AST (7.3.3) can be downloaded from http://starlink.jach.hawaii.edu/starlink/AST. The bug caused a value of 1 to be used for CarLin regardless of the value actually set for the attribute, and was triggered by the presence of a third spectral axis in the header for which the CTYPE value includes no algorithm code.