Author Topic: FITS header data  (Read 6553 times)

Offline Luigi

  • PixInsight Addict
  • ***
  • Posts: 140
FITS header data
« on: 2010 September 03 18:03:17 »
Not sure if this is a stupid question, but here goes ...

Is there a way to preserve the FITS header data from component images into the final image? I was doing some test shots and I took an RGB which I combined in PI, but the FITS header data from the RGB frames is no longer part of the file.

In fact, it would be nice to be able to save the final image and the component images plus processing steps. Perhaps I need a database ...
Regards,
Luigi Marchesi

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: FITS header data
« Reply #1 on: 2010 September 03 22:06:19 »
I believe that FITS header propagation is on the wish list. The second thing you're asking for is something I've been begging for for a long time. I generally refer to it as the 'project' feature. I believe Juan is working on it.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: FITS header data
« Reply #2 on: 2010 September 05 05:04:42 »
If  you use the MENU: <File> <FITS Header> option, you can 'save' the FITS Header for an image as a 'process icon' on your workspace (and, therefore, it can also be saved to disk as well).

You can then re-apply that 'FITS Header' process icon to any other image, thus saving key data from image to image.

Of course, you CANNOT alter the fundamental FITS Header information for an image - as that is related, directly, to the physical image format itself.

So, perhaps you need to show us a FITS header from one of your component images, and then describe what part of that data you need to be re-incorporated into your subsequent, processed, images?
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline Nigel Ball

  • PixInsight Addict
  • ***
  • Posts: 277
    • Astrophotography by Nigel
Re: FITS header data
« Reply #3 on: 2010 September 05 15:07:25 »
Evening all

Maybe this will give a starting point

This is the FITS header from the combined image out of CCDStack

OriginalName     M:\Photos\Astrophotography\2010_06_19\NGC7000-002_Ha.fit
FileSourceType   FITS
Camera           QSI 583ws S/N 00504105 HW 06.00.00 FW 05.02.06 PI 5.2.0.0
Observer         Nigel Ball
ExpDateTime      19/06/2010 23:03:35
Exposure         900
Filter           H alpha
Calibrated       True
Temperature      -20
Aperture         0
Focal_length     150
Pixel_size_X     5.4
Pixel_size_Y     5.4
Binning X        1
Binning Y        1
Pedestal         0
Gain             0.45
ReadoutNoise     15
MaximumADU       50000
COMMENT          = start unedited lines from original header
SAT_LEVE         =                50000
COMMENT          = created by CCDStack
FILESRC          = 'FITS'
HISTORY          =COMBINE: MEAN of the following SOURCEs
HISTORY          =SOURCE0: NGC7000-002_Ha_Calibrated_20100619
HISTORY          =SOURCE1: NGC7000-002_Ha_Calibrated_20100624
HISTORY          =SOURCE2: NGC7000-003_Ha_Calibrated_20100619
HISTORY          =SOURCE3: NGC7000-003_Ha_Calibrated_20100624
HISTORY          =SOURCE4: NGC7000-004_Ha_Calibrated_20100619
HISTORY          =SOURCE5: NGC7000-004_Ha_Calibrated_20100624
HISTORY          =SOURCE6: NGC7000-005_Ha_Calibrated_20100619
HISTORY          =SOURCE7: NGC7000-005_Ha_Calibrated_20100624
HISTORY          =SOURCE8: NGC7000-006_Ha_Calibrated_20100624
HISTORY          =SOURCE9: NGC7000-007_Ha_Calibrated_20100624
HISTORY          =SOURCE10: NGC7000-008_Ha_Calibrated_20100624
HISTORY          =SOURCE11: NGC7000-009_Ha_Calibrated_20100624
HISTORY          =SOURCE12: NGC7000-010_Ha_Calibrated_20100624
HISTORY          =SOURCE13: NGC7000-011_Ha_Calibrated_20100624
COMMENT          = the following lines from NGC7000-002_Ha_Calibrated_20100619
COMMENT          = start unedited lines from original header
SAT_LEVE         =                50000
COMMENT          = created by CCDStack
FILESRC          = 'FITS'
HISTORY          =DARK SUBTRACT: Dark Master bin1x1 -20C 900 seconds.FIT
HISTORY          =FLAT FIELD: Flat Master - Flat_150mm_Ha-001.FIT
COMMENT          = start unedited lines from original header
SET-TEMP         =  -20.000000000000000 /CCD temperature setpoint in C
XORGSUBF         =                    0 /Subframe X position in binned pixels
YORGSUBF         =                    0 /Subframe Y position in binned pixels
IMAGETYP         = 'Light Frame' /       Type of image
OBJCTRA          = '20 57 50' /          Nominal Right Ascension of center of image
OBJCTDEC         = '+42 37 18' /         Nominal Declination of center of image
OBJCTALT         = ' 50.0926' /          Nominal altitude of center of image
OBJCTAZ          = ' 80.3811' /          Nominal azimuth of center of image
OBJCTHA          = ' -3.9557' /          Nominal hour angle of center of image
SITELAT          = '53 05 00' /          Latitude of the imaging location
SITELONG         = '-02 30 00' /         Longitude of the imaging location
AIRMASS          =   1.3466959689952069 /Relative optical path length through atmosphere
TRAKTIME         =   1.0000000000000000 /Exposure time used for autoguiding
APTDIA           =   106.00000000000000 /Aperture diameter of telescope in mm
APTAREA          =   8824.7340095043182 /Aperture area of telescope in mm^2
SWCREATE         = 'MaxIm DL Version 5.08' /Name of software that created the image
SBSTDVER         = 'SBFITSEXT Version 1.0' /Version of SBFITSEXT standard in effect
OBJECT           = 'NGC7000 '
TELESCOP         = 'Hasselblad 150mm lens' /telescope used to acquire this image
NOTES            = '        '
FLIPSTAT         = '        '
SWOWNER          = 'NigelBall' /         Licensed owner of software
CBLACK           =                  431 /Initial display black level in ADUs
CWHITE           =                 2267 /Initial display white level in ADUs
COMMENT          = end of unedited lines from original header


As processing steps are executed a new COMMENT line could be added?

HTH

Nigel
Nigel Ball
Nantwich, Cheshire, United Kingdom

Takahashi FSQ-106 at f/8, f/5 and f/3.6 on AP900, Nikon 28 mm and 180mm f/2.8
SBIG STL-11000M, Astrodon LRGB, 5nm Ha
ST-10XME, Astrodon HaLRGB
www.nigelaball.com

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: FITS header data
« Reply #4 on: 2010 September 05 15:37:11 »
Hi,

Original FITS headers will be preserved in an incoming new version of the ImageIntegration module. This is in the todo list.

However, as I've said in other forum threads, we are working on a new XML-based file format that will be the default format to manage images in PixInsight. When the new format is implemented and published, FITS will be obsolete in PixInsight. The FITS module will still be available and maintained only as a legacy format for compatibility with other applications. Existing FITS headers will also be preserved as a legacy metadata feature.

The new format will store the processing histories and metadata for a set of images. This means that when you load an image (or some images) from a file in the new format, you'll have the corresponding histories available on the History Explorer window, just as usual when you're processing any image in PixInsight. For this reason I am not investing resources to implement features like storing applied processes as FITS keywords.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline RBA

  • PixInsight Guru
  • ****
  • Posts: 511
    • DeepSkyColors
Re: FITS header data
« Reply #5 on: 2011 April 02 15:06:34 »
Existing FITS headers will also be preserved as a legacy metadata feature.

Sorry for jumping on this "old" topic.  While it may be old, it seems it's still a show-stopper for some people to use PixInsight for certain things, that they would gladly use if it wasn't because they do want to preserve all FITS header info, not only those keywords PixInsight approves as "valid" for whatever reason (defined in the FITS specs, have become a de-facto standard, etc).

My question is this: When you say that existing FITS header will be preserved, do you refer to existing "valid" headers, or just about any keyword/value other apps decide to throw in the header?


Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: FITS header data
« Reply #6 on: 2011 April 03 03:09:08 »
Besides a few mandatory keywords (BITPIX and the like) that are reserved to describe basic properties of images, there are no 'valid keywords' in the FITS standard: you can store whatever key/value/comment triads you want, as long as they meet the standard. Basically this means that:

- Only the 7-bit ASCII character set can be used
- Key names must have 8 characters or less
- Each header keyword must fit in an 80-character 'card image'

For example, this means that something like:

name = MYKEYWRD
value = ''
comment = 'Copyright © MyCompany'

is not acceptable as a FITS header keyword (the copyright symbol does not pertain to the ASCII set).

So the next versions of ImageIntegration and StarAlignment will store all FITS header keywords from their source images, as long as they are valid.

So if someone is not using PixInsight just for this reason (missing headers), then I'm sure PI 1.7 will make them extremely happy  :)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline RBA

  • PixInsight Guru
  • ****
  • Posts: 511
    • DeepSkyColors
Re: FITS header data
« Reply #7 on: 2011 April 03 10:41:57 »
[...] you can store whatever key/value/comment triads you want, as long as they meet the standard.

That is correct. Since the FITS specs allow for *any* keyword (as long as it meets the rules for defining keywords and their values), not preserving any of such "invented" (custom) keywords would be against the specs. Part of the FITS madness but that's how it is..

Thanks for the response!