CARTAvis / carta

To CARTA users, this repo holds the CARTA release packages. Please use this repo to log bugs and feature requests. These will be triaged by the development team and prioritised as necessary in the development cycles.
19 stars 0 forks source link

Can't load PV diagram with just an RA axis #152

Open keflavich opened 2 years ago

keflavich commented 2 years ago

Opening a file with this header:

SIMPLE  =                    T / conforms to FITS standard
BITPIX  =                  -64 / array data type
NAXIS   =                    2 / number of array dimensions
NAXIS1  =                  729
NAXIS2  =                  266
BMAJ    = 0.000300056855542465
BMIN    = 0.000231425445281507
BPA     =    87.93917508585434
FILENAME= 'G351.77_B6_spw1_12M_spw1.model'
BUNIT   = 'beam-1 Jy'
SLICE   = '[[(0, 959, None), (64, 801, None), (136, 865, None)]]'
BEAM    = 'Beam: BMAJ=1.080204679952874 arcsec BMIN=0.8331316030134253 arcsec &'
CONTINUE  'BPA=87.93917508585434 deg'
WCSAXES =                    2 / Number of coordinate axes
CRPIX1  =                365.0 / Pixel coordinate of reference point
CRPIX2  =                  1.0 / Pixel coordinate of reference point
CDELT1  = -4.7222222222222E-05 / [deg] Coordinate increment at reference point
CDELT2  =      336.88692248353 / [m s-1] Coordinate increment at reference point
CUNIT1  = 'deg'                / Units of coordinate increment and value
CUNIT2  = 'm s-1'              / Units of coordinate increment and value
CTYPE1  = 'RA'                 / Coordinate type codeundefined projection
CTYPE2  = 'VRAD'               / Radio velocity (linear)
CRVAL1  =       261.6775833333 / [deg] Coordinate value at reference point
CRVAL2  =      -42328.01591376 / [m s-1] Coordinate value at reference point
LONPOLE =                180.0 / [deg] Native longitude of celestial pole
LATPOLE =     -36.155694070182 / [deg] Native latitude of celestial pole
RESTFRQ =       217238530000.0 / [Hz] Line rest frequency
MJDREF  =                  0.0 / [d] MJD of fiducial time
DATE-OBS= '2018-05-02T05:59:28.656000' / ISO-8601 time of observation
MJD-OBS =      58240.249637222 / [d] MJD of observation
OBSGEO-X=       2225142.180269 / [m] observatory X-coordinate
OBSGEO-Y=     -5440307.3703486 / [m] observatory Y-coordinate
OBSGEO-Z=     -2481029.8518735 / [m] observatory Z-coordinate
RADESYS = 'ICRS'               / Equatorial coordinate system
SPECSYS = 'LSRK'               / Reference frame of spectral coordinates
COMMENT JvM_epsilon_max=0.8076561747395334
COMMENT JvM_epsilon_min=0.7388852694815842
COMMENT JvM_epsilon_median=0.7457567637342183
COMMENT collapse_axis=1
COMMENT Original Unit=Hz
COMMENT Original Type=FREQ
END

results in a message: "Error loading file: Error loading FITS image."

The file should load, even if it can't be aligned with other data

veggiesaurus commented 2 years ago

@kswang1029 any ideas on this?

kswang1029 commented 2 years ago

@veggiesaurus guess it is the axes parser at the backend unable to recognize it is a PV image. We might need to adjust the frontend too (ast grid).

kswang1029 commented 10 months ago

@keflavich please confirm if this is still an issue with v4-stable which should support a rotated cube.