You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As requested by @PatrickOgle, even though we now display WCS in moment map images in Cubeviz, the WCS is kind of a hack and not really attached to Data.coords . As a result, when you save the moment map out to a FITS file, the file header has no WCS information, thus breaking round-trip.
The reason we do not attach the WCS to Data.coords properly for a moment map is because in order to do so, we have to slice the cube WCS to obtain only spatial WCS (3D to 2D). Unfortunately, that breaks CCDData conversion as CCDData does not take sliced WCS object. The proper fix is to stop using CCDData.
The quicker but more hacky fix is to insert WCS into the FITS header at the time of writing out the moment map image. Patrick provided some code on how he did this manually for his data but the code appears a little too specific (and also won't work with writing out as GWCS). Whoever takes this ticket should investigate whether a more generic solution is possible (e.g., see if we can slice the cube WCS and write the sliced WCS out without resorting to manually writing FITS header keywords one by one), but Patrick's code can be considered as a last-resort hack-fix.
DISCLAIMER: This issue was autocreated by the Jdaviz Issue Creation Bot on behalf of the reporter. If any information is incorrect, please contact Duy Nguyen
The text was updated successfully, but these errors were encountered:
Reporter: pllim
As requested by @PatrickOgle, even though we now display WCS in moment map images in Cubeviz, the WCS is kind of a hack and not really attached to Data.coords . As a result, when you save the moment map out to a FITS file, the file header has no WCS information, thus breaking round-trip.
The reason we do not attach the WCS to Data.coords properly for a moment map is because in order to do so, we have to slice the cube WCS to obtain only spatial WCS (3D to 2D). Unfortunately, that breaks CCDData conversion as CCDData does not take sliced WCS object. The proper fix is to stop using CCDData.
The quicker but more hacky fix is to insert WCS into the FITS header at the time of writing out the moment map image. Patrick provided some code on how he did this manually for his data but the code appears a little too specific (and also won't work with writing out as GWCS). Whoever takes this ticket should investigate whether a more generic solution is possible (e.g., see if we can slice the cube WCS and write the sliced WCS out without resorting to manually writing FITS header keywords one by one), but Patrick's code can be considered as a last-resort hack-fix.
🐱
DISCLAIMER: This issue was autocreated by the Jdaviz Issue Creation Bot on behalf of the reporter. If any information is incorrect, please contact Duy Nguyen
The text was updated successfully, but these errors were encountered: