Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't spatially match images with SIP #203

Open
keflavich opened this issue Nov 7, 2023 · 7 comments
Open

Can't spatially match images with SIP #203

keflavich opened this issue Nov 7, 2023 · 7 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@keflavich
Copy link

Files with FITS SIP headers won't spatially match. I'm not certain it's the SIP's fault, but maybe.

Could not enable spatial matching of jw01182004001_04101_00001_nrcblong_cal.fits to reference image jw01182004001_04101_00001_nrcalong_cal.fits.HDU_1_SCI. No valid transform was found.

This is a JWST _cal.fits file - you can get these from MAST in the L2 (level 2) pipeline products for any NIRCam observations.

Header:

Name = jw01182004001_04101_00001_nrcalong_destreak.fits
HDU = 1
Extension name = SCI
Data type = float
Shape = [2048, 2048] (RA, DEC)
Coordinate type = Right Ascension, Declination
Projection = TAN-SIP
Image reference pixels = [1024.5, 1024.5]
Image reference coords = [17:46:14.7145, -028.43.20.9506]
Image ref coords (deg) = [266.561 deg, -28.7225 deg]
Pixel unit = MJy/sr
Celestial frame = ICRS
RA range = [17:46:09.728, 17:46:19.699]
DEC range = [-28.44.26.323, -28.42.15.567]

The coordinates are displayed, though:
image

@github-project-automation github-project-automation bot moved this to New issue in CARTA Nov 7, 2023
@kswang1029
Copy link

I see the rendered ra and dec axes are swapped. Is that supposed to be?

@keflavich
Copy link
Author

Yes, but with a gigantic "?" next to that yes. JWST observes on its side, so the CD1_1/CD2_2 matrices are always rotated 90 deg. The most natural way to display the pixel coordinates is therefore with RA vertical, dec horizontal. It is confusing as heck working with 90-deg rotates WCSes, but that's what blocking out the sun does for you.

@kswang1029 kswang1029 added question Further information is requested help wanted Extra attention is needed labels Nov 28, 2023
@kswang1029
Copy link

@keflavich would it be possible to have a test FITS image for diagnostics, please?
@acdo2002 are you able to obtain a test image with SIP projection?

@acdo2002
Copy link

@kswang1029 Ok, I am going to look at whether I can obtain JWST NIRCam L2 product with Projection = TAN-SIP

@keflavich
Copy link
Author

Anything from the JWST archives on MAST should work; if you need me to, I can dig up a file

@acdo2002
Copy link

Anything from the JWST archives on MAST should work; if you need me to, I can dig up a file

Many thanks for your report!
We have obtained the JWST NIRCam level 2 products and I have confirmed the Spatial Matching does not work (with our current dev branch) for the CTYPE1 = "RA---TAN-SIP"and CTYPE2 = "DEC---TAIN-SIP" (file information of Projection = TAN-SIP for level 2c *.crf.fits). and does not work correctly if the file information has Projection = TAN (resample image *i2d.fits)

Please don't use level 2 JWST product with current released. CARTA but level 3 JWST product looks Ok, at least it can spatially matched well (quick check by my eyes) with MIRI-IFU and ALMA.
And please let us know if you have any other problem with using CARTA on JWST or other IFU format data!

@kswang1029 kswang1029 removed this from CARTA Dec 6, 2023
@kswang1029 kswang1029 added this to CARTA Dec 6, 2023
@kswang1029 kswang1029 moved this to New issue in CARTA Dec 6, 2023
@kswang1029 kswang1029 removed this from CARTA Dec 6, 2023
@kswang1029 kswang1029 added this to CARTA Dec 6, 2023
@kswang1029 kswang1029 moved this to New issue in CARTA Dec 6, 2023
@keflavich
Copy link
Author

Is there any chance you'll add support for SIP in a future release, and any idea on the timeline for that? I'm working with JWST archive produces that have (very) bad WCS solutions, and I need to be able to access and work with the SIP versions in order to derive appropriate corrections. My workflow without CARTA is clunky: either I have to use in-notebook visualizations or ds9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
No open projects
Status: New issues
Development

No branches or pull requests

3 participants