Plotting Slit Jaw and Spectrographs FOVs using WCS information
jacobdparker opened this issue · 7 comments
Hello,
I am attempting to plot the FOV of both the IRIS Slit Jaw and Slit on top of an AIA image using the WCS information. Following a procedure very similar to @tiagopereira in his irispy tutorial from IRIS10 I was able to do so, but the slit positions do not seem even visually centered in the Slit Jaw FOV.
I since have attempted to plot the IRIS Slit on top of the Slit Jaw data and found a similar offset. The next step in my trouble shooting will be try on a different observation, but in the short term I was hoping you all could spot an obvious mistake in my procedure, or point me toward a procedure that does something similar so I can check my work.
I will attach my code below. Thanks for your help.
iris.py.zip
Update:
I tried this same routine on multiple different coarse rasters with different points and it worked perfectly. So there appears to be an issue with this particular observation.
I also found that if I add 2 pixels to each slit position in the pixel_to_world call for the problem observation it places the slit correctly for all four positions. This may or may not have to do with the fact that CRPIX for slit position is 2.
Could it be that the calibration was not perfect for your dataset? Or maybe something is assuming a different CRPIX? What is the link to the dataset?
Hey @tiagopereira, here is the dataset I am using https://www.lmsal.com/hek/hcr?cmd=view-event&event-id=ivo%3A%2F%2Fsot.lmsal.com%2FVOEvent%23VOEvent_IRIS_20190930_171911_3604109624_2019-09-30T17%3A19%3A112019-09-30T17%3A19%3A11.xml
I wondered if it could be a calibration issue since other observations worked fine. Are you, or is anyone else, aware of a step in the calibration that may lead to a disagreement between the Slit Jaw and Raster WCS info?
As far as a assuming a different CRPIX goes. The only command I am using that references WCS information is si_iv.pixel_to_world . I will dig into that method and see if I can't find where it may be reading in CRPIX incorrectly or assuming it is a different value.
Thanks for the help so far!
Hi @jacobdparker, did you ever solve this?
Recently other people have noticed this and I am trying to work out the issue.
No I have not solved this issue.
As discussed on Element, the issue turns out to be that irispy+sunraster do not read in the per-exposure WCS metadata from the extension in the IRIS FITS file, but instead only read in the (average) WCS metadata from the primary header. When the per-exposure WCS metadata is used, the slit position matches the slit-jaw image as it should.
This has been addressed in a 0.2.0rc1 release of irispy-lmsal
, I plan to improve it in a future release to be less slow.