CARTAvis / carta-frontend

Source code repository for the frontend component of CARTA, a new visualization tool designed for the ALMA, the VLA and the SKA pathfinders.
https://cartavis.github.io/
GNU General Public License v3.0
20 stars 10 forks source link

parsing ATCA FITS header - no WCS grid rendered #2357

Closed kswang1029 closed 4 months ago

kswang1029 commented 7 months ago

Describe the bug

With v4.1-stable, some of the ATCA FITS images cannot have WCS grid rendered properly (missing) at the frontend.

The attached image shows the headers as displayed in v3 (left) and v4.1 (right) respectively.

Screenshot 2024-03-07 at 15 39 46

The key difference is CTYPE3 v3 CTYPE3 = VELO-HEL BUNIT = JY/BEAM v4.1 CTYPE3 = VELO BUNIT = Jy/beam

With ds9 we see CTYPE3 = 'VELO-HEL' BUNIT = 'JY/BEAM '

With some other ATCA FITS images, it works just fine (ex https://drive.google.com/file/d/1ynmyPlgEJolb_1D8m5tWNapXIGMwmUHO/view?usp=sharing)

To Reproduce Steps to reproduce the behavior:

  1. download the test image here: https://drive.google.com/file/d/1MrseMvR3j9YVeLk_4bwCmDjvIaPHUtye/view?usp=sharing
  2. load it and we will see missing WCS grid.
  3. try to generate a moment image but we will see errors in the browser's console.
Screenshot 2024-03-07 at 15 50 40

Expected behavior WCS grid should be rendered and moment image can be generated.

Platform info (please complete the following information):

TienHao commented 5 months ago

I found both ATCA images are inconsistent between the OpenFileAck and the fits files headers in CTYPE3. There might be a change of file info parsing from the backend causing this problem.

For the WCS rendering failed ATCA image(link): The headerEntries of OpenFileAck from the backend shows CTYPE3 = 'VELO'. But the header from the fits file shows CTYPE3 = 'VELO-HEL'

截圖 2024-05-02 下午2 48 59 截圖 2024-05-02 下午2 38 03

For the WCS rendering succeeded one(link): The headerEntries of OpenFileAck from the backend shows CTYPE3 = 'VELO' just like the failed one. But the header from the fits file shows CTYPE3 = 'VELO-LSR'

截圖 2024-05-02 下午2 58 14 截圖 2024-05-02 下午3 09 36

I am not sure why it works fine for the second image, but the missing of chars is spotted.

kswang1029 commented 4 months ago

Refer to https://github.com/CARTAvis/carta-backend/issues/1375 for the issue. This is going to be fixed via https://github.com/CARTAvis/carta-backend/pull/1376.