Page 1 of 1

BAYERPAT

Posted: Sun Sep 09, 2018 12:50 am
by Ray Hansen
Is it possible to have a user option to set the BAYERPAT and COLORTYP for the fits header? I'm having to batch
process these changes now on all of my subs before calibration.

Re: BAYERPAT

Posted: Sun Sep 09, 2018 10:50 am
by admin
Hi Ray,

what camera and capture settings are you using? SharpCap does write both colourtyp and bayerpat to the Fits headers - ie

Code: Select all

Image #1
    SIMPLE  =                    T / C# FITS: 09/07/2018 22:33:44
    BITPIX  =                   16
    NAXIS   =                    2 / Dimensionality
    NAXIS1  =                  320
    NAXIS2  =                  240
    GAIN    =                  100 /
    DATE-OBS= '2018-09-07T21:33:44.1550377' / System Clock:Frame Received
    SWCREATE= 'SharpCap'           / 3.2.5735.0
    BAYOFFY =                    1 /
    BAYOFFX =                    0 /
    BAYERPAT= 'GBRG    '           / NOTE: Use RGGB on some software (eg PixInsight)
    COLORTYP= 'GBRG    '           / NOTE: Use RGGB on some software (eg PixInsight)
    YPIXSZ  =     2.40000009536743 /
    BLKLEVEL=                    1 /
    XPIXSZ  =     2.40000009536743 /
    EXPTIME =               0.0003 /
    BSCALE  =                    1 /
    BZERO   =                32768 /
    EXTEND  =                    T / Extensions are permitted
    CCD-TEMP=                 27.2 /
    INSTRUME= 'ALTAIRH183C'        /
Unfortunately processing software does not agree on what the 'correct' settings are for a particular pattern. The file with the headers shown above would require GBRG to process correctly in AstroArt but RGGB for PixInsight.

To be honest I have yet to find any software that automatically takes notice of either of those settings (or the BAYOFFX BAYOFFY headers). If you have found software that reads and applies those headers then please let me know what software and what settings/workflow you are using.

thanks,

Robin

Re: BAYERPAT

Posted: Mon Sep 10, 2018 12:02 am
by Ray Hansen
Hi Robin,

The camera is a ZWO ASI094 set for RAW16 output as fits files. I calibrate and stack with Deep Sky Stacker and finish
with both photoshop and pixinsight. I run batch conversion programs to change the colortyp and bayerpat values
before running in DSS. If I skip the conversion, I get purple or green stars in PS and PI. If this request would be
difficult or create problems, I can continue with the batch process with little impact.

Re: BAYERPAT

Posted: Mon Sep 10, 2018 5:41 am
by turfpit
Ray

See viewtopic.php?f=35&t=254
  • Drag and drop a FITS image into PIPP.
  • See what PIPP says for Debayer pattern.
  • Set that pattern in DSS
  • Debayer and stack in one step.
OR
  • Post a picture of the Image Headers tab from FITS Liberator and I can tell you the pattern to set in DSS
image-headers.PNG
image-headers.PNG (22.15 KiB) Viewed 3798 times
Dave

Re: BAYERPAT

Posted: Mon Sep 10, 2018 6:02 am
by admin
Ah, ok, sounds like maybe DSS is reading the header values then - I will investigate

cheers,

Robin

Re: BAYERPAT

Posted: Mon Sep 10, 2018 6:29 am
by turfpit
Robin

I have found Autostakkert & PIPP autodetect and debayer correctly a FITS frame using the pattern you show in the FITS header. When using Siril, I have to use your alternate pattern in your NOTE in the FITS header. DSS doesn't seem to autodetect - so a 25% chance of success. Don't know about PixInsight but at a guess same as Siril.

The original request
Is it possible to have a user option to set the BAYERPAT and COLORTYP for the fits header
is not logical (if I understand it correctly) because BAYERPAT is what it is at time of writing the FITS frame not what someone wants it to be.

Since I wrote my original Debayer document, my understanding of this has increased somewhat. I think a new version is called for after I have finished that other small documentation job I have just started for you ;)

One day I might write a book entitled "Things You Really Need to Know to Image Successfully".

Dave

Re: BAYERPAT

Posted: Tue Sep 11, 2018 8:32 pm
by admin
Hi folks,

right, just found some time to look at this - I have a FITS file saved from an Altair camera (RGGB pattern as standard). The FITS header saved from SharpCap is (inverted because of the upside down nature of the FITS file formt)

Code: Select all

  BAYERPAT= 'GBRG    '           / NOTE: Use RGGB on some software (eg PixInsight)
* AstroArt, PIPP, Autostakkert expect bayer pattern GBRG to show colour correctly
* DSS and PixInsight expect pattern RGGB to show colour correctly

None of the above apps automatically works out the pattern based on the FITS headers - in all cases there is a manual control somewhere in the program that needs to be set correctly to get the correct colour output, but the headers themselves have no effect except to give you (the user) information.

cheers,

Robin

Re: BAYERPAT

Posted: Sat Sep 15, 2018 2:03 am
by Ray Hansen
Thanks Robin, I've got it now.