Page 1 of 3

Astrophotography Lab - A Limited Overview

Posted: Mon Jan 13, 2020 5:36 am
by STEVE333
Astrophotography Lab is a free program (Windows or Linux) that can be used to determine the magnitude of the noise sources in your astrophotography images (camera read noise, camera dark current noise, Light Pollution noise). The program can also be used to determine the optimum camera exposure time to maximize the quality (Signal-to-Noise ratio) of your final stacked image.

In this post I won't go into details on how to input camera and telescope information, or, how to input images into the program, but, just give an overview to show some of the features of the program. If there is sufficient interest I could prepare a "tutorial".

The image below shows the Image analyzer tool where the various images (taken with your sensor/telescope combination) are input. To characterize your sensor noises as well as determine your optimum sub exposure time you will need to input: 2 Bias frames, 2 Flat frames, 2 Dark frames, 1 Light frame (actual target image), and 1 Saturated frame where at least some of the pixels are saturated. The Files window in the image below shows I have input all of these images.

Image



Once the data is input to the program you can switch to the Image Calculator window which is shown below.

Image

Here the sensor noises are shown (bottom left box) as well as the noise contributions to your Light image (bottom right box). For my system the Sky Shot Noise (LP noise) is the dominant noise. Even though my system uses an Astro Duo-Narrowband filter the LP noise is still the dominant noise. For this analysis I chose the Green channel (LP noise is only calculated for one color channel).


The Plotting Tool is the tool I use to determine the exposure time for my subs (images). I use the Stack SNR vs sub exposure time graph. This graph for my system is shown in the image below.

Image

This graph shows how your choice of exposure time for your individual images will affect the quality (SNR) of your stacked images. For my system, exposures of 300 - 400 or more seconds will produce the highest SNR which means the best quality. Thus, my exposures of 540 sec are well suited to my camera/filter/telescope combination.

Your system will likely have a different graph, but, the shape will be similar with a sharp rise at the beginning, a "knee" in the curve, and a relatively flat region for longer exposures. Any exposure time longer than the time at the "knee" will produce your best results.

This is a short introduction (many features not mentioned), but, hopefully it will whet your appetite to look into this program. It has given me high confidence in choosing the exposure time for my images.

The program can be downloaded (Windows and Linux) at: http://lars-frogner.github.io/Astrophot ... nload.html

Steve

Re: Astrophotography Lab - A Limited Overview

Posted: Mon Jan 13, 2020 6:56 am
by Don Quixote
Thank you Steve.
This is a great !

Re: Astrophotography Lab - A Limited Overview

Posted: Mon Jan 13, 2020 2:25 pm
by bobharmony
Thanks, Steve. I have recently started using the tool to measure max ADU and for getting my flats close to 50% of ADU. It is nice to get a tour of some of the other capabilities. I would be interested in a more in-depth presentation, if you are willing to spend the time!

Bob

Re: Astrophotography Lab - A Limited Overview

Posted: Mon Jan 13, 2020 2:34 pm
by Juno16
Thanks Steve!

JT referenced this application several times when discussing shooting flats.

Really is pretty cool software. I need to take a look at it later and try to analyze some of my mid histogram flats to see what the adu value is.

Thanks again!
Jim

Re: Astrophotography Lab - A Limited Overview

Posted: Mon Jan 13, 2020 2:39 pm
by yobbo89
Cheers, I'll check it out, is there a function for calculating optimal exposure time based on a sqm reading?

Re: Astrophotography Lab - A Limited Overview

Posted: Mon Jan 13, 2020 5:06 pm
by Juno16
Hi Steve,

Thanks for this post. I had messed around with AP Lab before, but not as much as I have this morning. Pretty neat stuff!

Your stack s/n ratio is double mine for a light frame of M33 for 120 sec exposure for 3 hours!

Steve, if you don't mind confirming for me, to determine the ADU for a flat frame, just select the flat in the Image Analyzer, right click and Show Statistics. The full well capacity for my Nikon D5300 is 33,927 e-. How does e- relate to ADU and should my flat be half of my full well (~17,000 e-). Any idea how e- relates to ADU?
AP Lab.JPG
Thanks,
Jim

Re: Astrophotography Lab - A Limited Overview

Posted: Mon Jan 13, 2020 5:10 pm
by STEVE333
yobbo89 wrote: Mon Jan 13, 2020 2:39 pm Cheers, I'll check it out, is there a function for calculating optimal exposure time based on a sqm reading?


Hi "Yobbo" - The answer is no.

To determine the optimum exposure time the program needs to know the noise sources within your camera as well as the amount of the LP that is "seen" by your camera. I use the term "seen" because any filters that you use will alter the amount of LP "seen" by your sensor.

To calculate the optimum exposure time for your setup you would need to load into the program:
2 Bias, 2 Flat, 1 Saturated, 1 Light, and 2 Dark frames.

The Bias, Flat and Saturated frames are used to measure your sensor (camera) noise. The Light and Dark frames are used to calculate the Dark Current noise and the LP noise for your target image. All of this information is required for the program to generate the graph I showed which then allows you to determine your "Optimum" Exposure Time.

I found that I already had all the images I needed (Dark frames, Bias frames, etc.) to load into this program to create the graph I showed.

It isn't as complicated as it sounds. Bob has asked for a tutorial, so, I will put one together. The information is all there in the program Help file, but, it is spread around making it a bit difficult to navigate. It will take a little time to put the tutorial together, so, bear with me.

Steve


bobharmony wrote: Mon Jan 13, 2020 2:25 pm Thanks, Steve. I have recently started using the tool to measure max ADU and for getting my flats close to 50% of ADU. It is nice to get a tour of some of the other capabilities. I would be interested in a more in-depth presentation, if you are willing to spend the time!

Bob

Hi Bob - I'll be glad to put together a bit of a tutorial showing how to load the images into the program and then navigate to the various "tools". I'll only be concentrating on the steps needed to generate the Stacked SNR vs sub exposure time graph, but, once you have the data in the program you can explore any of the other features. I'm a little busy right now, so, bear with me.

Steve

Re: Astrophotography Lab - A Limited Overview

Posted: Mon Jan 13, 2020 6:00 pm
by STEVE333
Juno16 wrote: Mon Jan 13, 2020 5:06 pm Hi Steve,

Thanks for this post. I had messed around with AP Lab before, but not as much as I have this morning. Pretty neat stuff!

Your stack s/n ratio is double mine for a light frame of M33 for 120 sec exposure for 3 hours!

Steve, if you don't mind confirming for me, to determine the ADU for a flat frame, just select the flat in the Image Analyzer, right click and Show Statistics. The full well capacity for my Nikon D5300 is 33,927 e-. How does e- relate to ADU and should my flat be half of my full well (~17,000 e-). Any idea how e- relates to ADU?

AP Lab.JPG

Thanks,
Jim


Hi Jim -
1) Don't worry about the value of the SNR, it will be affected by your LP, your filters, your telescope f-number, the brightness of the target, etc. It is only where the "knee" occurs that is important for you. Just make sure your exposures are longer than the Exposure Time where the "knee" occurs.

2) Your approach to determine the ADU is correct.

3) ADU stands for Analog to Digital Unit. When photons fall on a pixel and create electrons, these electrons are temporarily stored in the pixel "well". The more electrons in the well the higher the signal. This signal (voltage) is measured by the A-to-D converter and converted to a digital signal (ADU units).

e- and ADU are related by a term called Gain, where Gain = e- / ADU. If you look at my second picture, in the lower left corner in the Sensor box you will see the program calculated the Gain for my camera settings (Gain is affected by ISO) at 0.408 e-/ADU.

4) Yes, you do want your Flats to be approximately 1/2 full well.

Hope this helps.

Now it is time for breakfast (coffee and scones)!

Steve

Re: Astrophotography Lab - A Limited Overview

Posted: Mon Jan 13, 2020 10:11 pm
by JayTee
Wow, Steve, thank you so much for doing this. I have been using this program for a few years now and haven't scratched the surface on all that it can do. If you have the time and can put together a tutorial only because the documentation for this software is a bit sparse that would be wonderful and truly appreciated.

Thank you again for doing this.

Cheers,
JT

Re: Astrophotography Lab - A Limited Overview

Posted: Mon Jan 13, 2020 10:41 pm
by STEVE333
JayTee wrote: Mon Jan 13, 2020 10:11 pm Wow, Steve, thank you so much for doing this. I have been using this program for a few years now and haven't scratched the surface on all that it can do. If you have the time and can put together a tutorial only because the documentation for this software is a bit sparse that would be wonderful and truly appreciated.

Thank you again for doing this.

Cheers,
JT
Hi JT - You're most welcome.

I do plan on putting a tutorial together showing how to use it to determine your "optimum" exposure time. As I mentioned above I'm a bit busy right now, so, it may take a few days.

Steve

Re: Astrophotography Lab - A Limited Overview

Posted: Tue Jan 14, 2020 2:36 am
by yobbo89
just downloaded, i'll get onto it after work,a saturated frame ? is it important ?

Re: Astrophotography Lab - A Limited Overview

Posted: Tue Jan 14, 2020 4:39 am
by JayTee
yobbo89 wrote: Tue Jan 14, 2020 2:36 am just downloaded, i'll get onto it after work,a saturated frame ? is it important ?
Yes

JT

Re: Astrophotography Lab - A Limited Overview

Posted: Tue Jan 14, 2020 7:23 am
by Baskevo
Can't wait to try this! Now all we need is an app/site that will recommend the best filters to use... RGB, SHO, H + O, etc...

Re: Astrophotography Lab - A Limited Overview

Posted: Tue Jan 14, 2020 7:47 am
by frajanssen
Hello,
Perhaps a stupid question: how to take a saturated sample?

François

Re: Astrophotography Lab - A Limited Overview

Posted: Tue Jan 14, 2020 8:32 am
by JayTee
frajanssen wrote: Tue Jan 14, 2020 7:47 am Hello,
Perhaps a stupid question: how to take a saturated sample?

François
Hi François,

Take an overexposed image of a single star like Sirius. If you take a 30-second exposure of Sirius at ISO 1600 you will have what the program is asking for. It's actually asking for a portion of the image (a small portion) to have a star that is saturated. This is what we call star bloat it's an indication of a saturated portion of an image.

Cheers,
JT

Re: Astrophotography Lab - A Limited Overview

Posted: Tue Jan 14, 2020 12:44 pm
by Juno16
Steve,

I really appreciate your work on this tutorial.

I know that you are busy right now, but can anyone else answer this question that has used the AP LAb?

These are the stats on my flat frame.
Flat.JPG
These are the stats of a selected saturated star (Alnitak) in a light frame.
Saturated.JPG
Should my flat frame ADU be approximately one-half the mean ADU value of (12576.6) of the saturated star? So, my flat frame ADU value should be about 6k-7k?

Thanks,
Jim

Re: Astrophotography Lab - A Limited Overview

Posted: Tue Jan 14, 2020 1:04 pm
by JayTee
The following is an excerpt from a post on CN about the correct ADU value for flats. See what you think.

This post is to correct some misconceptions about the difference between the full-well capacity of a camera vs the max ADU value the software reports on your computer.
First some definitions:

Fullwell capacity: Full well capacity defines the amount of charge an individual pixel can hold before saturating. ... This value has been measured at the factory and the camera gain has been adjusted so that the full range of the ADC matches the single-pixel linear full well capacity of the CCD at 1x gain. It's measured and reported in e (electrons).

Anti Blooming Gate(ABG): Some sensors contain circuitry called “antiblooming” electronics which allows a pixel to bleed off excess charge before it saturates and spills over into adjacent image data. Imagers that do not have antiblooming circuitry will show white streaking around the areas of the image where the full well capacity has been exceeded.

Linear Fullwell Capacity: I'll call it LFC for simplicity. LFC is the point before ABG starts kicking in. Making the rest of the FW non-linear. In most cameras, this starts around 60% of FW.

ADU (analog-to-digital unit): ADU is a digital number that the software will report on your computer. For a 16 bit camera, it will be 0 to 65535. Most software(like SGP SkyX, Maxim, or Prism) will report ADU values based on 16 bit regardless of whether your cameras is either 12 bit or 16 bit.

Why is this important? Because the flat calibration frames should be taken in the LFC section of the FW.

The problem is many people confuse their cameras FW with ADU values. When using our cameras on a daily basis the FW number doesn't mean anything. The only number we care about is the ADU. So when someone says take your flats at 50% of your cameras FW capacity, what they really mean is to take your flats at 50% of 65535 ADU value the software shows not the published FW of your camera.


So that means that we should be using an ADU value of around 30,000 for our flats if I'm reading this excerpt correctly. But we need to pay close attention to which bit-depth is used for the measurement. Here are the 50% LFCs numbers for the different bit-depths. 12/14/16 bits = ADU value of 2084/8192/32768, respectively.

JT

Re: Astrophotography Lab - A Limited Overview

Posted: Tue Jan 14, 2020 1:27 pm
by Baskevo
^ That's what I did, and it worked perfectly. My flats were not correcting at all with my DSLR, until I figured out how to measure the ADU and get it close to 50%. You have about a +/- 5% margin :)

For DSLR's, I have heard that the Max ADU value (the 65,535 number) can be measured differently. I thought this was the case with mine, as my max ADU value was reporting to be like 34k or something around there when measured in PI. It turns out PixInsight measures the RAW files differently when you have it set to "pure raw" under format explorer (I'm not sure how it measures it), and I'm assuming the correct value measured in 16-bit was actually around 30k at half max ADU. But this is probably way TMI, and 30k usually works perfectly. If it doesn't, then you can try to measure your max ADU value for your DSLR and aim for 50% of that.

Re: Astrophotography Lab - A Limited Overview

Posted: Tue Jan 14, 2020 2:48 pm
by bobharmony
Juno16 wrote: Tue Jan 14, 2020 12:44 pm Steve,

I really appreciate your work on this tutorial.

I know that you are busy right now, but can anyone else answer this question that has used the AP LAb?

These are the stats on my flat frame.

Flat.JPG

These are the stats of a selected saturated star (Alnitak) in a light frame.

Saturated.JPG

Should my flat frame ADU be approximately one-half the mean ADU value of (12576.6) of the saturated star? So, my flat frame ADU value should be about 6k-7k?

Thanks,
Jim
Like James, I did what you are thinking about here, and my limited experience with the subject indicates that getting the flats up to ~50% of max ADU has a beneficial impact. It seemed to help with the ability to bring out the darker portions of the Iris nebula for me, and I plan to try it again when I get a chance to get out under the skies. The ADU I measured from using the cameras AV setting are very similar to what you are reporting.

I dimmed my light source and brought the exposure time up to 1/20 second to raise the ADU. The histogram in APT showed the peak way over to the right, but APLab showed a median at about 50% of maximum. I posted a thread on my result, or maybe it was in an Iris repro thread, I'm not sure which ATM.

Bob

Edit - a link to the post I reported in: viewtopic.php?f=66&t=5129

Re: Astrophotography Lab - A Limited Overview

Posted: Tue Jan 14, 2020 3:06 pm
by Juno16
bobharmony wrote: Tue Jan 14, 2020 2:48 pm

Like James, I did what you are thinking about here, and my limited experience with the subject indicates that getting the flats up to ~50% of max ADU has a beneficial impact. It seemed to help with the ability to bring out the darker portions of the Iris nebula for me, and I plan to try it again when I get a chance to get out under the skies. The ADU I measured from using the cameras AV setting are very similar to what you are reporting.

I dimmed my light source and brought the exposure time up to 1/20 second to raise the ADU. The histogram in APT showed the peak way over to the right, but APLab showed a median at about 50% of maximum. I posted a thread on my result, or maybe it was in an Iris repro thread, I'm not sure which ATM.

Bob
Thanks Bob. It does seem like if I select a saturated star and view the stats, then shoot for about half of the saturated star ADU for the flats. I have only about a third of what I need now in my flats.
Wow, that would really move the histogram to the right big time! If something this simple can bring out darker details in the final image, I am for it!

Thanks for confirming my process.

I have been familiarizing myself with the APLab software and even if I am not completely correct on my assumptions, I am learning my way around.

Best of luck with your skies. We haven't had a clear day so far this year.

Thanks,
Jim