Author Topic: Can't get rid of this grid in my FIT files  (Read 961 times)

Offline lifesvr

  • Newcomer
  • Posts: 7
Can't get rid of this grid in my FIT files
« on: 2019 February 19 13:04:12 »
I was used to working with CR2 raw files, and had all settings done so I didn't have to make too much changes every time I used the program.

With a new asi 071mc pro (color), my new raw files come in FIT format.

Problem: When I want to review my raw files, I keep getting a grid over my pictures. Even after debayering.

The strange thing is: when I stack them in APP, and then return to PI for further developement, PI DOES load them correctly.

I think some setting must be off, but I tried everything in the Format explorer tab and nothing helped.

I'll attach a double view of the stacked image in APP, then loaded in PI, and 1 stretched raw FIT - I'll also enclose some data from the FITS header.

Comparison, top pic is 1 raw, lower pic an imported stack from APP.


original exif from 1 raw:


1 raw, debayered:



Offline WillB

  • Newcomer
  • Posts: 30
Re: Can't get rid of this grid in my FIT files
« Reply #1 on: 2019 February 20 05:16:30 »
The problem most likely is that PI is using the wrong bayer/mosaic pattern to debayer the raw fits image.

I don't have access to a ASI071MC so can't establish myself which bayer pattern is correct.
For the old ASI120MC that I do have the bayer pattern is GRGB. If I use any other bayer pattern I will end up with the grid pattern remaining as well as wrong colours.

Open your sample FITS image in PI, use the Debayer module under ColorSpaces, change the Bayer/mosaic pattern from the default 'Auto' to each of the other patterns in turn the list and apply to the raw image, stretch the result and zoom the image, the grid pattern will disappear and the colours will be correct when the correct bayer pattern is found. As your FITS header info shows that the ASIAir is reporting the pattern as RGGB and APP is showing no grid and the correct colours then most likely BGGR will be the correct pattern for the ASI071MC in PI however it only takes a few minutes to try all the available patterns.

Once you have the correct pattern use that pattern in all processes that involve debayering instead of the default 'Auto' option.

If still having problems provide a raw fits image here, or a link to a Dropbox or Google Drive folder with a sample file, and we can look at the problem inside PI rather than trying to diagnose from screenshots.

HTH

William.

Offline lifesvr

  • Newcomer
  • Posts: 7
Re: Can't get rid of this grid in my FIT files
« Reply #2 on: 2019 February 20 05:23:23 »
Bayer pattern is RGGB. As shown in the FITSheader.
Even debayering does not solve the issue.

Pixinsight can't decode the images correctly, when I do an autostretch it should immediately give a smooth image, debayered (color) or not (gray).

Could it be related to the update? If I could force CFA on my FITS; it would most likely be solved. But I can't find a way to do that in the FITS image properties tab.

Offline WillB

  • Newcomer
  • Posts: 30
Re: Can't get rid of this grid in my FIT files
« Reply #3 on: 2019 February 20 05:52:49 »
Can you provide a sample unprocessed FITS image?

Offline lifesvr

  • Newcomer
  • Posts: 7
Re: Can't get rid of this grid in my FIT files
« Reply #4 on: 2019 February 20 06:01:05 »
https://www.dropbox.com/s/g62s51zn5p3sns7/Light_Orionnevel_60.000sec_bin1_frame0001.fit?dl=0

I hope this works. Link expires in 2 months.
Image was taken with dual band Ha / OIII filter, so color balance WILL be off.

Offline WillB

  • Newcomer
  • Posts: 30
Re: Can't get rid of this grid in my FIT files
« Reply #5 on: 2019 February 20 06:33:33 »
OK, using your FITS image and the Debayer module attached is what I see using RGGB as the Bayer/mosaic pattern.

Colour is correct and there is no grid after Debayer is applied.

Only problem I came up was that 'Auto' in Bayer/mosaic pattern results in an error message from PI saying "Missing or Invalid CFA property" even though the fits header does have RGGB as BAYERPAT in the header.

When you updated PI did you uninstall the old copy first or are you referring to a recent module update?

(Having problems attaching an image with Safari, will try again later with a different browser if the screenshot is missing)


Offline lifesvr

  • Newcomer
  • Posts: 7
Re: Can't get rid of this grid in my FIT files
« Reply #6 on: 2019 February 20 06:47:50 »
And what do you see when you open the fits and 'nuke' it ? Does it show the grid too?

Laptop has always done regular updates, since I bought the ASI camera, I also needed a stronger computer (3 times more data and a 7 year old laptop don't mix), so I installed a new version on the desktop.

I have only updated the laptop last week, haven't checked if the problem persists on both computers now. I do remember the desktop version doesn't say "DSLR_RAW" any more, but just "RAW" or something similar (the one where you set them to 'pure raw')

Still thinking it might be the settings in the new update that are off somewhere.

Offline WillB

  • Newcomer
  • Posts: 30
Re: Can't get rid of this grid in my FIT files
« Reply #7 on: 2019 February 20 07:00:44 »
If you open the unprocessed FITS image then it shows the CFA grid, that does not disappear until the image is manually debayered.

For FITS images the DSLR RAW module is not used.
When opening a DSLR RAW image the DSLR RAW module is invoked and depending on how you configure it the image will be automatically debayered and white balanced so you would see no grid and the correct colours.

For a single FITS image from a colour camera you have to manually debayer the image before doing anything else.
Pre-processing and calibrating a set of FITS images is a bit different in when the debayer is applied but for this single image manual debayer would be the first step.

Offline lifesvr

  • Newcomer
  • Posts: 7
Re: Can't get rid of this grid in my FIT files
« Reply #8 on: 2019 February 20 07:27:59 »
The last picture in my original post shows a manually debayered FIT file. The pattern is still visible.
Details about the debayering are in the fits header info: RGGB, VNG. I guess there still is something I'm missing.

How can I inspect my images before processing them? And how to process them when they are already debayered?
Isn't it much easier to just make the FITs "forced" as it is possible with DSLR RAW images?   :-\  ???

Offline WillB

  • Newcomer
  • Posts: 30
Re: Can't get rid of this grid in my FIT files
« Reply #9 on: 2019 February 20 07:52:58 »
Can you provide a download link to the same unprocessed image of M51 that you are having problems with?

Offline lifesvr

  • Newcomer
  • Posts: 7
Re: Can't get rid of this grid in my FIT files
« Reply #10 on: 2019 February 21 04:51:39 »
https://www.dropbox.com/s/bt6fmlzfyuyurrk/Light_M51_300.000sec_bin1_frame0068_a.fit?dl=0

I updated my FITS settings to "upper left"; and after debayering, they come out pretty okay.

Very green, though.

Strange you have to go through calibration before being able to select your subs. I used to select them before the whole process, to save on processing time.


Offline WillB

  • Newcomer
  • Posts: 30
Re: Can't get rid of this grid in my FIT files
« Reply #11 on: 2019 February 21 06:44:40 »
That looks ok to me too.

Using the Debayer module in ColorSpaces with RGGB as the Bayer pattern then M51 shows the characteristic orange shade at the intersection of the two components and the bright red/orange star in the outermost 'arm' of the largest component (lower left). No sign of the grid remaining in this image.

Green is normal for OSC with the RGGB matrix since there are twice as many green pixels as red or blue and there is no automatic white balance to correct for this as there is with your DSLR images. Use the STF tool with the channels 'unchained' to auto stretch the image with a more neutral background.

I don't often process OSC images in PixInsight so can't really advise you on the best method of pre-checking your subs.

When I used to have an OSC that was used with MaxIm DL and I had to debayer those images first if I wanted to pre-check, though after a while I got used to looking at the bayered images and learned to ignore the grid, reject the subs that were badly trailed or the focus poor and would carry out full calibration, de-bayer, alignment, combination and finally transformation on the subs that were left.

Hopefully another PI user will be able to advise an efficient method for pre-checking and/or automatically rejecting poor quality OSC images during the alignment and combination stage so that you don't need to pre-check at all.

William.

Offline lifesvr

  • Newcomer
  • Posts: 7
Re: Can't get rid of this grid in my FIT files
« Reply #12 on: 2019 February 21 08:04:07 »
Done some further testing and it seems OK now.

This workflow was presented to me and seems to be working:

  • calibrate and debayer light frames
  • Load into SubFrameSelector script
  • Measure FWHM, SNR and eccentricity of the stars
  • Copy the "good" subs to a new directory ("approved")
  • Register all subs with the "best" as reference
  • Stack the registered subs