by JeanTate » Tue Feb 05, 2013 12:14 am
Thank you Chris.
Chris Peterson wrote:JeanTate wrote:In particular, the mJPEG utility.
I have three SDSS FITS, cutouts created by GALFIT, all the same size, all centered on the same object; mJPEG gets upset: "Red and green FITS images don't match." From the detailed dump, I see that the values for crval1, crval2, crpix1, crpix2, and crota2 are not the same, in the two FITS ('red' and 'green'; I expect the same mismatch for 'blue').
What are these parameters? Which ones need to be the same, for mJPEG to work? How to create a (set of) FITS with values that mJPEG will accept?
Of course, I can simply edit two FITS headers, copying the values of these five parameters from the third (and this will no doubt work, sorta), but I'd *much* prefer to know what I'm doing ...
The mJPEG tool requires all the files to have the same WCS information. That means all of the CR... keys must have the same values, and possibly some of the other, non-WCS entries (EPOCH, LAT, LONG) that might be used by the WCS engine. You can see the
FITS standard for a list of WCS keywords.
What's odd is that the FITS used by GALFIT were extracted from three SDSS FITS using Montage's mSubimage module, with identical input (RA, Dec, size) values!
You can try forcing all the header values to match.
Yes, that's easy enough to do ... but I'm really quite interested in why the values are different, and how I can force them to match in a way that ensures each of the RGB pixels will come from as close to the same points on the sky as possible.
The fact that they don't suggests there might be a fundamental alignment issue, so your results may be less than perfect. Have you tried a more simple approach, like just combining the layers in Photoshop?
No. For starters, I do not have Photoshop (nor any desire to get it); more importantly, I'm more interested - for now - in learning why mJPEG is getting indigestion, and how I can make it happy, without doing silly things.
Thank you Chris.
[quote="Chris Peterson"][quote="JeanTate"]In particular, the mJPEG utility.
I have three SDSS FITS, cutouts created by GALFIT, all the same size, all centered on the same object; mJPEG gets upset: "Red and green FITS images don't match." From the detailed dump, I see that the values for crval1, crval2, crpix1, crpix2, and crota2 are not the same, in the two FITS ('red' and 'green'; I expect the same mismatch for 'blue').
What are these parameters? Which ones need to be the same, for mJPEG to work? How to create a (set of) FITS with values that mJPEG will accept?
Of course, I can simply edit two FITS headers, copying the values of these five parameters from the third (and this will no doubt work, sorta), but I'd *much* prefer to know what I'm doing ...[/quote]
The mJPEG tool requires all the files to have the same WCS information. That means all of the CR... keys must have the same values, and possibly some of the other, non-WCS entries (EPOCH, LAT, LONG) that might be used by the WCS engine. You can see the [url=http://fits.gsfc.nasa.gov/standard30/fits_standard30aa.pdf]FITS standard[/url] for a list of WCS keywords.[/quote]
What's odd is that the FITS used by GALFIT were extracted from three SDSS FITS using Montage's mSubimage module, with identical input (RA, Dec, size) values!
[quote]You can try forcing all the header values to match.[/quote]
Yes, that's easy enough to do ... but I'm really quite interested in why the values are different, and how I can force them to match in a way that ensures each of the RGB pixels will come from as close to the same points on the sky as possible.
[quote] The fact that they don't suggests there might be a fundamental alignment issue, so your results may be less than perfect. Have you tried a more simple approach, like just combining the layers in Photoshop?[/quote]
No. For starters, I do not have Photoshop (nor any desire to get it); more importantly, I'm more interested - for now - in learning why mJPEG is getting indigestion, and how I can make it happy, without doing silly things.