Author Topic: FITS header issues when creating RGB image  (Read 1121 times)

Offline jtalbot

  • PixInsight Enthusiast
  • **
  • Posts: 78
    • http://www.starscapeimaging.com
FITS header issues when creating RGB image
« on: 2019 October 15 07:37:06 »
Juan,
I've been working on processing an image using PI 1.8.7 on a IMac using the latest updates/bug fixes.   Yesterday after creating some master RGB images through the BPP script I combined them to a RGB image using Channel Combination.  I then went to photometric color calibration and the image failed to plate solve many times and PCC failed.  After thinking about this I looked at the FITS header of the RGB combined image.  The values in the OBSGEO-L, LONG-OBS, LAT-OBS, OBSGEO-H, ALT-OBS were wrong.  What caught my eye was the LONG-OBS value of +140.  I took the images at a star party at the Long of 102deg West.  After looking some more I noticed the LAT-OBS was wrong too as were other fields.   I ended up editing the FITS header with data from the master Red image and magically it worked and the image plate solved and color calibrated.  I'm not sure if this is a bug or not but this is the first image I've processed with the new version of PI from scratch with the exception of a DSLR image which didn't include this info. I've never experienced this issue before.  I've included a link to my dropbox with the master R, G, and B frames which were created using Image Integration if anyone wants to see if they can reproduce this.  Check out the FITS header of the RGB image.  I also included three single calibrated Red, Green and Blue frames and three uncalibrated Red, Green and Blue frames.  I'm not sure the FITS info is computing correctly during calibration and then RGB combination.

https://www.dropbox.com/sh/c7p7sqk3utjh45d/AACBuy6oJwjgZwtdWJHCfYQka?dl=0

Jon
Clear Skies

Jon

Offline dave_galera

  • PixInsight Addict
  • ***
  • Posts: 261
    • QDigital Astro
Re: FITS header issues when creating RGB image
« Reply #1 on: 2019 October 15 08:01:58 »
Wouldn't the lat and long keywords in the Fits header be set by your capture software, i.e. not by PI.

Check one of the light images straight off your capture software and see if has the problem you describe.
Dave

Offline jtalbot

  • PixInsight Enthusiast
  • **
  • Posts: 78
    • http://www.starscapeimaging.com
Re: FITS header issues when creating RGB image
« Reply #2 on: 2019 October 15 08:11:07 »
Hi Dave,
Exactly, the camera does report it correctly in the FITS header.  Something is being changed in calibration or image integration or channel combination or all.  Check out the files I uploaded and look at the FITS header.  Then create a RGB image and again look at the FITS header.

Jon
Clear Skies

Jon

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: FITS header issues when creating RGB image
« Reply #3 on: 2019 October 15 08:15:48 »
Bug confirmed. I have just fixed it, and am preparing an update for all platforms.

In version 1.8.7 of PixInsight several tools that combine images (such as ChannelCombination and ImageIntegration for example) preserve metadata gathered from input images in the output image. Center image coordinates and geodetic observer coordinates are averaged from existing metadata in the whole data set.

Thank you for discovering this problem, and sorry for the trouble.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline jtalbot

  • PixInsight Enthusiast
  • **
  • Posts: 78
    • http://www.starscapeimaging.com
Re: FITS header issues when creating RGB image
« Reply #4 on: 2019 October 15 08:21:37 »
Hi Juan,

Thanks for the great support.....

Jon
Clear Skies

Jon

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: FITS header issues when creating RGB image
« Reply #5 on: 2019 October 15 10:21:11 »
Hi Jon,

Thank you for uploading the images. I have released a cumulative update that fixes this bug. Let me know if it works as expected now.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/