Author Topic: Matching flat density (exposure) to light frames  (Read 10296 times)

Offline fwm891

  • Newcomer
  • Posts: 21
Matching flat density (exposure) to light frames
« on: 2014 September 20 05:11:01 »
Hi - Just trying to sort out some problems I have with flat frames. I've just ordered an EL panel so that should sort out getting even illumination. That leaves me with the problem of how much/little exposure is needed for a flat frame. Is there a method of relating the density of the the flat to the density of the light frame?

I have a 16bit mono camera (Atik 383+mono) which reaches pixel saturation at 65+K, so should I aim for say 48K, 40K or some other fractional value of pixel saturation?

Or is it really just suck it and see!

Francis

Offline lenbo

  • Newcomer
  • Posts: 9
Re: Matching flat density (exposure) to light frames
« Reply #1 on: 2014 September 20 06:28:19 »
Hi. I've been using around 30k for my flats with my 383l. Seems to work pretty well in that general range. I use a homebuilt lightbox on an outlet controlled by a dimmer type switch so I have some intensity control. I use SGP for imaging acquisition so I just run the cursor around the image to see the various readouts and kind of do a rough estimate. Nothing too exact but it seems to work OK.   Len
Len

Offline fwm891

  • Newcomer
  • Posts: 21
Re: Matching flat density (exposure) to light frames
« Reply #2 on: 2014 September 20 07:11:35 »
Thanks Len.

I've been working on 40-48K ADU values and sounds like I'm too high. Will try again when the new EL panel comes next week.

Francis

Offline rleisenz

  • Newcomer
  • Posts: 26
  • In the sun we remember, in the planets we forget
Re: Matching flat density (exposure) to light frames
« Reply #3 on: 2014 September 20 08:39:55 »
Hi,

i am aiming at around 23000 ADU. I used a tool called
"Sky Flats Assistant" which is available here: http://winfij.com/maximdl/skyflats.html  (free stuff),
but you need Maxim DL to operate.

Robert
G11/Gemini2 on pier; 8"f4 Newton; ED80;80/480 APO; EOS1000Da; ALCCD9m; QHY6pro; ALCCD5LII-M;

Offline jkmorse

  • PixInsight Padawan
  • ****
  • Posts: 931
  • Two questions, Mitch . .
    • Jim Morse Astronomy
Re: Matching flat density (exposure) to light frames
« Reply #4 on: 2014 September 20 10:31:54 »
Key is you need to stay in the range where your data remains linear.  Many CCDs, especially those with blooming protection, stop being linear the higher the photon count, which is why you want to keep your flats below half full well, or below a count of 32000 for a 16 bit CCD.  I typically aim for 18,000 to 24,000 counts.  And be sure to shoot a bunch of subframes to build your master flats, at least 16 frames and 25 if you have the time.  Gotta drive down that noise.

Hope that helps,

Jim
Really, are clear skies, low wind and no moon that much to ask for? 

New Mexico Skies Observatory
Apogee Aspen 16803
Planewave CDK17 - Paramount MEII
Planewave IFR90 - Astrodon LRGB & NB filters
SkyX - MaximDL - ACP

http://www.jimmorse-astronomy.com
http://www.astrobin.com/users/JimMorse

Offline fwm891

  • Newcomer
  • Posts: 21
Re: Matching flat density (exposure) to light frames
« Reply #5 on: 2014 September 20 10:34:29 »
Thanks Robert, I use Maxim so will give it a try

Francis

Offline fwm891

  • Newcomer
  • Posts: 21
Re: Matching flat density (exposure) to light frames
« Reply #6 on: 2014 September 20 10:36:13 »
Thanks Jim - Very useful information :)

Offline MortenBalling

  • Member
  • *
  • Posts: 74
Re: Matching flat density (exposure) to light frames
« Reply #7 on: 2014 September 24 04:01:51 »
A few general comments on flats.

At first they can be a struggle, but once you figure them out, they are one of the strongest tools in the toolbox. The hole idea about flats involves some very simple algebra. If you shoot a frame of a white surface that is "perfectly" evenly illuminated, in theory it should look like that on the exposure. But it doesn't. First of all there are vignetting (the image is darker towards the edges), and there are small grains of dust in the optical path.

Lets (very simplified) say that you have white in the middle of the exposed flat frame , and 50% grey at the edges. That will be the same on a light frame of the night sky. With a stack of the flats, you can very easily compensate that. You (PixInsight in most cases) simply divide the value of each pixel in the light frame with your flat stack. In the centre of the image you divide by one (white), but at the edges you divide by 0.5 (or 50%). Back in school we learned that dividing with a fraction is the same as multiplying with the inverted fraction, so here dividing by 1/2 is the same as multiplying with 2 (or 2/1). At the edges of the image, where the chip only receives 50% of the light, that signal is now multiplied by two getting the value back to one.

This is all there is to it. If you do things right, you will have a perfectly flat field after using flat calibration. This is very important with astrophotography, as we basically try to image something that is "black", and it makes the task of enhancing the object you're imaging a lot easier if your field is flat. Some people don't use them, but especially with large chips (like DSLR) they are invaluable.

I normally shoot flats using the sky or even a white wall or the ceiling. I cover the front of the telescope with a peace of white cloth, and use a large rubber band to hold the cloth in place and even out wrinkles. It's is very important not to change focus (or anything else in the light path) between the time you shoot lights and flats. If you change focus, the dust bunnies will move, and after flat calibration you will see them as embossed circles. Also focusing the telescope on something lightyears away, will make the wall/sky/ceiling defocused while you shoot the flats and that is good. Look at the histogram while shooting and find an exposure time which creates a spike a little bit to the right of the centre of the histogram. Your flat frames should look grey without stretching them. Not burned out, and not too dark.

Another important thing about flats is that they introduce noise (and we don't like noise!). Typically exposure time of each flat frame is well below one second, and that gives a lot of noise. The are several ways around that. Shoot many flats. I normally shoot 100-200, but recently I've started denoising the flat stack as well, using TGVDenoise with default settings. Especially if you don't use dithering on the mount this has a major positive effect. Even if you use dithering, you'll see an increase in SNR, by denoising the flat stack. You don't have any usable information in the flat stack on pixel level, except for uneven sensitivity of each pixel, and my experience (based on measuring SNR) is that it's better to have a noise free flat stack.

A very easy way to check wether you are doing things right, is to try to calibrate a series of flats using your flat stack. That should give a perfectly flat (grey) frame if you are doing it the proper way.

Cs

Morten
« Last Edit: 2014 September 24 04:13:55 by MortenBalling »

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: Matching flat density (exposure) to light frames
« Reply #8 on: 2014 September 24 04:37:54 »
Hi Morten!
Excellent description and explanation of - how to produce,  how to use flats and how the calculations with flats are done in an
easy to understand and simplified way!

Gerald


Offline MikeOates

  • PixInsight Addict
  • ***
  • Posts: 278
Re: Matching flat density (exposure) to light frames
« Reply #9 on: 2014 September 25 07:36:42 »
Morten,

Yes, an excellent explanation and I like the idea of de-noising the flats, I never thought of that, so I will try that myself.

Thanks,

Mike

Offline lenbo

  • Newcomer
  • Posts: 9
Re: Matching flat density (exposure) to light frames
« Reply #10 on: 2014 September 25 08:13:19 »
Thanks Morton. I usually adjust box intensity so I'm exposing 4 to 6 seconds. Helps avoid shutter issues with my particular camera. It never occurred to me to do noise removal processing against the flats. I'll give it a try. Always learning something new with PI. Far to go. Thanks again.  Len
Len

Offline fwm891

  • Newcomer
  • Posts: 21
Re: Matching flat density (exposure) to light frames
« Reply #11 on: 2014 September 25 09:30:18 »
Morten,

Many thanks for all the information. I've just got a variable output EL panel and use that to produce flats. My camera has a shutter and fractional second exposures normally show a darkening in one corner so for my flats I use a minimum of 10 seconds.
Denoising sound interesting so I will duplicate a few of the flats and run TGVD and see what I get....

Thanks all this has demystified 'flats' certainly my images are looking better.

Offline mads0100

  • PixInsight Addict
  • ***
  • Posts: 116
Re: Matching flat density (exposure) to light frames
« Reply #12 on: 2014 September 27 09:49:59 »
I used to have issues with flats when I tried to do the 50% rule.  Then, I read a thread on CN where people mentioned with their KAF8300s they were using a value closer to 43000 ADUs.  Magically, my images were flat-fielded!

I don't know why it works, but it does.

Offline lensman57

  • Newcomer
  • Posts: 13
Re: Matching flat density (exposure) to light frames
« Reply #13 on: 2014 October 19 05:03:13 »
Morten,

Thank you for posting the useful information. For the sake of a Newbie, myself, would you kindly explain how to denoise flats for 383L camera which uses the 8300 sensor please? Would you apply the denoise to the Master Flat or the individual frames? I use a 4 seconds exposure using an EL panel to get around 23000K and I do seem to have a problem with Flats. Would the new SuperBias tool be of any use here?

Thanks and Regards,

A.G

Offline gvanhau

  • PixInsight Old Hand
  • ****
  • Posts: 345
Re: Matching flat density (exposure) to light frames
« Reply #14 on: 2014 October 27 13:11:43 »
Hi Morten

I agree with almost all of your flat explanation, except with "denoising the flats".
The mean reason why I disagree, is that when you apply any denoising algorithm, you are destroying the relative brightness of each pixel with its neighbours.
One of the goals of applying flats is to correct the brightness of each pixel of the image which may vary due to several aspects: differences in the light path, dust particles that obscure the light path and also diferences in sensibility of the pixels.
The only way to get a near to noise free flat (master flat) is stacking as many flats as possible.

Geert
Geert Vanhauwaert