Share:
Notifications
Clear all

15th Feb 2024: Astro Pixel Processor 2.0.0-beta29 released - macOS native File Chooser, macOS CMD-Q fixed, read-only Fits on network fixed and other bug fixes

7th December 2023:  added payment option Alipay to purchase Astro Pixel Processor from China, Hong Kong, Macau, Taiwan, Korea, Japan and other countries where Alipay is used.

 

Debayering / Handling FITS color frames in APP

4 Posts
2 Users
1 Likes
6,246 Views
(@viorelc)
Molecular Cloud
Joined: 6 years ago
Posts: 3
Topic starter  

I have done some experimenting and am still confused about where in the workflow is the Bayer matrix used.

My image capture was done with Nebulosity, using a setting "RGB Fits: Maxim" which seems to create the FITS in BGGR pattern, just no specific header seems to exist specifying the pattern.  In fact, this was my best guess from looking at the lights with all 4 patterns to decide.

When forcing this pattern from the beginning, all Master frames created with APP have this pattern and show as color when displayed in APP.  Should they?  Does it matter? Will this affect any parts of the processing in APP?

The camera I use is a OSC CCD (SBIG STF-8300C).  As far as I know, there is no specific debayering step in APP, but I'm confident APP applies at some point.  I observed that if I don't specify "Force CFA" in APP, my entire process ends-up making everything MONO, which is is not what the intent of my using an OSC is.

I am looking for advice on using CCD-OSC frames, and in particular what to do if my FITS don't have the expected header.  If this is easier, I can do a "Batch Modify" on all my lights/darks/bias/flats to prepare them for the default process; what are the headers I should have to be properly handled by APP?

 

Thanks,

Viorel


   
ReplyQuote
(@mabula-admin)
Universe Admin
Joined: 7 years ago
Posts: 4366
 

Hi Viorel (@viorelc),

Thank you for your question and welcome to the APP forum 😉

Debayering (or demosaicing) is done automatically in APP after data calibration as it should be, because data calibration needs to be done on the  Bayer CFA pixels.

Therefore, your master frames need to be Bayer CFA frames as well. If you load one of your Bayer CFA frames into the image viewer, then APP will automatically show you them debayered. If you want to have a look (to verify) at the monochrome Bayer CFA data, set the debayer algorithm in 0) RAW/FITS to no interpolation, before loading a frame into the image viewer. You will actually see the monochrome Bayer CFA data.

Yes, the fits headers apparently don't have the correct FITS Tags to indicate it's Bayer CFA data. So you need to force CFA to tell APP you are going to process Bayer CFA data. When forced, the master calibration frames will automatically be created properly to support data calibration of Bayer CFA light frames. That's why you see that the master frames have become Bayer CFA data themselves.

I hope this clarifies what APP is doing internally and that debayering is an automatic process in APP done after data calibration. So actual debayering is done only once  and after data calibration 😉

You won't need to use the Batch Modify tool in this case for correct processing. Just make sure all processing is done with the force CFA option enabled and that you have selected the correct Bayer Pattern. The RGGB pattern is the default pattern by the way.

Kind regards,

Mabula

 


   
ReplyQuote
(@viorelc)
Molecular Cloud
Joined: 6 years ago
Posts: 3
Topic starter  

Thank you for the clarifications.

 

As the CFA pattern is used where needed in APP, the easiest choice for me is to "set and forget" the CFA pattern from the beginning, since it is used exactly where needed.

One of my sources of confusion was the fact that some of the Master frames (specifically Master Bias/Darks/Flats, not the BPM) created by APP included the CFAIMAGE tag, despite the fact that these frames don't need one (since they are not used beyond Calibration).

 

Best,

Viorel


   
Mabula-Admin reacted
ReplyQuote
(@mabula-admin)
Universe Admin
Joined: 7 years ago
Posts: 4366
 
Posted by: viorelc

Thank you for the clarifications.

 

As the CFA pattern is used where needed in APP, the easiest choice for me is to "set and forget" the CFA pattern from the beginning, since it is used exactly where needed.

One of my sources of confusion was the fact that some of the Master frames (specifically Master Bias/Darks/Flats, not the BPM) created by APP included the CFAIMAGE tag, despite the fact that these frames don't need one (since they are not used beyond Calibration).

 

Best,

Viorel

Hi Viorel @viorelc,

You're most welcome 😉

Yes, indeed set it and forget it is fine.

Actually, adding the CFAIMAGE tag to the calibration masters is usefull. Internally it signals to APP that these are to be used on CFA light frames, not on monochrome images.

Indeed, not really required for the actual calibration, but it's easy to view your master frames in RGB directly if wished in the image viewer and for analytical results on the 4 CFA channels, R, G1, G2, B. If you check the master frames fits headers, you'll see that there are analytical results for the 4 CFA channels as well. For instance, on a masterbias of a DSLR/OSC camera, you can actually see if the camera manufacturer isn't scaling the channels before writing the RAW data (which happens in Nikon DSLRs).

Kind regards,

Mabula

 


   
ReplyQuote
Share: