Flat frame overcompensation

Hello Siril experts,

I captured 197 light frames of Andromeda from Sollentuna in Sweden.

  • Canon EF 135 mm F/2.0 @ F/2.0, 2 seconds, ISO 800, RAW (CR2), Long exposure noise reduction (dark frame subtracted in camera)
  • Canon 5D mk IV

I also captured flat frames:

  • 1 second, ISO 100, Long exposure noise reduction

I have Siril 0.99.4 Beta.

My problem:
When I try and perform flat field compensation to remove vignetting I get overcompensation.


How to import the RAW files into SIRIL and use the flat frame to remove vignetting?

A subset of 20 frames (of 197) are here:
https://drive.google.com/drive/folders/1H6BSxkKPMYTXy8-7C5UCm26cV9PXoMYn?usp=sharing

My attempt at a workflow for this case:

Note: If Cal = (Lights - master-dark - master-bias)/(master-flat - master-bias) I assume that my lights are already (lights - master-dark - master-bias) since I have used an in camera dark frame subtraction. The same comment applies to my flats, ie my flats are (flats - master-dark - master-bias)

1: convert flats, stack flats median with multiplicative normalization to get master-flat.
2: convert lights, preprocess lights with master flat and Debayer (no dark, no bias selected).
3: Register preprocessed lights, stack preprocessed lights.

My master-flat from step 1, is here:

An example of a preprocessed light frame from step 2, is here:

My questions:

  1. I might have created: Cal = (Lights - master-dark - master-bias)/(master-flat - master-dark - master-bias), since both lights and flats are RAW with in camera dark frame subtracted. This is NOT the original equation. Is this the root cause of my problems? I need new flats without in camera dark subtraction?
  2. What is the best process, in my case, with RAW frames with “in camera dark” subtracted from light frames and flat frames?
  3. Is the only possible work flow with Siril to have all of bias, darks, flats and lights (and no in camera dark RAW subtraction)? This is what I have seen in tutorials.

Best regards

Magnus Larsson

1: convert biases, stack biases with average and rejection. No normalization to get master-bias
2: convert flats, preprocess flats with master-bias, stack preprocessed flats average rejection with multiplicative normalization to get master-flat.
3: convert lights, preprocess lights with master flat and master dark and Debayer
4: Register preprocessed lights, stack preprocessed lights.

@lock042 Thank you for the feedback.

I have watched the Siril Youtube channel tutorial Pre-processing images with Siril (EN). https://www.youtube.com/watch?v=RswLpEE7EZ4 and I am aware of the standard workflow when you have bias, flats, darks and lights. => Next time I will turn off “in camera noise reduction (in camera black subtraction, Canon: Long exposure noise reduction)” and acquire proper and separate darks as per best practice. That is a lesson learned.

However I wonder what I can salvage with my set:
my_lights = lights - Long exposure noise reduction (dark frame subtracted in camera)
my_flat = flat - Long exposure noise reduction (dark frame subtracted in camera)

Can I use my_lights and my_flats and still let Siril even out the varying contrast in my frames due to vignetting (without overcompensating)?

That was the reason for trying a home cooked procedure:
1: convert flats, stack flats median with multiplicative normalization to get master-flat.
2: convert lights, preprocess lights with master flat and Debayer (no dark, no bias selected).
3: Register preprocessed lights, stack preprocessed lights.
However this cause overcompensation.

I can create a set of bias and new set of flat frames (without dark frame subtracted in camera), if that helps.
I can also create a set of darks.
But the problem is the lights, they are RAW files with a subtracted dark frame, already.

What is the best way forward to remove vignetting, given the frames I have? Can Siril remove the vignetting? Or is the only way to redo lights and add proper darks, bias and flats (all without dark frame subtraction in camera)?

Magnus

OK sorry. I got it now.

The best way is like to do. But in your case it appears that the flat frame is not good. It is very difficult to say.
Maybe you could try the fdiv command in Siril. you can divide an image by another one and to apply a factor. That could help.

OK, this was also my thought. But I can not understand what is wrong with the flats. Perhaps obvious, but I can not see it.

The flats are:

  • F/2.0, 2 seconds, RAW. Same 135 mm lens and F/2.0 F-stop as lights. Avoiding very short exposure time.
  • Taken using my Imac LCD-type screen displaying an evenly grey image.
  • Using the cylindrical lens hood pressed to screen to get exactly normal angle relative to screen and block any exterior light. (They do have in camera dark subtracted though).
  • Mid point histogram, all color components even at same point in histogram and all color channels are un-clipped.

A subset of 20 frames (of 197) are here, also the RAW flats, in “flat” folder, as Canon RAW (CR2) for anyone to check using Siril or RawTherapee. They all load fine:
https://drive.google.com/drive/folders/1H6BSxkKPMYTXy8-7C5UCm26cV9PXoMYn?usp=sharing

@lock042 and all: What is wrong with the flats? Can someone download a flat file and check? All EXIF metadata is included.

Try using same iso as lights and use AV mode to take flats and turn long exposure noise reduction Off you should never use that setting for astro so it’s said .

Dave

@David_Burlington Thank you for the input.

I tried same iso as lights and use AV mode to take flats (ISO = 800, shutter speed = 1/2 s, F/2.0, Av-mode, manual focus on infinity, long exposure noise reduction off) and then executed:
1: convert flats, stack flats median with multiplicative normalization to get master-flat.
2: convert lights, preprocess lights with master flat and Debayer (no dark, no bias selected).
3: Register preprocessed lights, stack preprocessed lights.

In step 1: I took the flat at a dark even gray (R=G=B) Imac monitor with lens hood against screen to get normal angle and no stray light. I opted for sutter speed = 1/2 second, for flats, since I have read in other forum that very short exposure times could lead to issues with the flats.

But the prepocessed lights still turn out overcompensated. The step 2 setup and pp_frame result is shown in this screenshot: https://drive.google.com/file/d/1jjMzZU0y8UhaM-NFzd3xNhVAHFuJFB5Y/view?usp=sharing

Somehow Siril can not remove the vignetting when I only have lights (with dark subtracted in each frame) and flats as per screenshot.

You need bias frames too as they are subtracted from the flat frames during stacking process , you could try using the script dslr so you need four folders named lights ,flats bias and darks , put relevant files into each folder set working directory to folder containing these for folders , choose dslr script and all hard work done for you ,even if it’s just to check if you get same result , try taking flats on a white screen not too bright maybe using a tablet , YouTube has a white screen video ,if you use a lens then you can get away using same flats for a while as orientation never changes with focus .

Regards Dave

@David_Burlington Thank you for your advice. It works for me! I can now remove vignetting from my lights. I made new bias and new flats with same ISO as ligths and without in camera dark subtraction. I will check the script dslr, once I master the manual process.

Manual process:
1: convert biases, stack biases with average and rejection. No normalization to get master-bias
2: convert flats, preprocess flats with master-bias, stack preprocessed flats average rejection with multiplicative normalization to get master-flat.
3: convert lights, preprocess lights with master flat and master bias (I have no darks) and Debayer
4: Register preprocessed lights, stack preprocessed lights.

I did not have same ISO as lights for bias and flats when I started this discussion (and both bias and flats had in camera dark subtraction). I do not know the exact root cause, but I get overcompensation if I only preprocess with my new flat frames. If I preprocess with both bias and flat, I do not get overcompensation.

I will now stack all 197 frames and see what I get. I am sure I will have more questions after that :smile:

In defense of in camera dark subtraction: I usually take pictures of night landscapes or night city-scapes with very long exposure times, single frame. The feature is very effective for that use case.

Great news , you can take darks anytime same with bias , leave camera outside in the evening to cool take 50 frames create a master for both do that every three or four months so average temp to the local conditions, then you just need flats and as your using a lens same with that create a master flat when you redo bias , give the script a look works very well and very quick to do :+1:.

Regards Dave

Andromeda, picture taken from a location in Stockholm northern suburbs, Sweden, 23-24 Aug
196 frames, Canon EF 135 mm L, F/2.0 @ F/2.0. exposure time = 2 s, IS0 = 800
Canon 5D mk IV
Canon RAW stacked in Siril. Remove green noise and Histogram using Siril.

My first stack ever.

I think I understand the RAW -> Siril workflow now and I get a good stacked image to post process. Post processing of astro photo is an art in itself, and I need to learn how to do that, but now I have something to start from.

Thank you for helping me.

Best regards,

Magnus

2 Likes