Author Topic: New Script: Calculate Sky Limited Exposure  (Read 32411 times)

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
    • View Profile
Re: New Script: Calculate Sky Limited Exposure
« Reply #30 on: 2010 December 01 10:19:21 »
Hi Tasos,

I agree wholeheartedly with you re faint targets, especially if you are doing an HDRComposition so that the bright stars are not massively oversaturated. I really liked that paper!

Cheers
         Simon

Offline Sean Houghton

  • Newcomer
  • Posts: 36
    • View Profile
    • Cerebiggum
Re: New Script: Calculate Sky Limited Exposure
« Reply #31 on: 2010 December 01 12:30:17 »
I enjoyed a quick read of the paper and I'll do another careful one tonight.

It sounds like providing another value, "Total Exposure Time", to the script would let me go further and calculate a second subexposure value. It might be possible to provide a target image and have the script suggest an appropriate exposure based on its flux, the star saturation level, and the tides.

This is turning out to be more complicated than I expected when I first decided to 'write a simple script to learn the API'  ???

One of my goals in dusting off all of my equipment and having another serious go at astrophotography has been to audit and improve every aspect of my imaging pipeline.  This means working through hardware issues, such as PE in the mount, all the way through final image processing.  This is turning out to be a very interesting part of that process.
Sean
Carlsbad, CA
cerebiggum.com

Offline harist

  • Newcomer
  • Posts: 46
    • View Profile
Re: New Script: Calculate Sky Limited Exposure
« Reply #32 on: 2010 December 01 13:43:01 »
Quote
This is turning out to be more complicated than I expected when I first decided to 'write a simple script to learn the API'

I confess that I posted the article link hoping it would provide a challenge for enriching the script.  ;)

Tasos

Offline Sean Houghton

  • Newcomer
  • Posts: 36
    • View Profile
    • Cerebiggum
Re: New Script: Calculate Sky Limited Exposure
« Reply #33 on: 2010 December 03 22:44:06 »
I'm working on a new version of the script but after studying that paper I can't seem to make sense of a few details.  The formatting is not doing it any favors for readability.

I have two questions:

  • Is lambda = "?" = Tgtsignal?  All three symbols seem to be used interchangeably.  This is a critical part of the final equation but the paper does not explain these symbols at all.  If lambda is Tgtsignal it means that subexposure length goes up linearly with target signal, which seems wrong.
  • Equation (14) uses E_total in the denominator, but then uses the value measured for Etotal/min which is not the same as Etotal.  We can't calculate Etotal since we don't know the exposure length so I'm assuming it's an error.

Sean
Carlsbad, CA
cerebiggum.com

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
    • View Profile
Re: New Script: Calculate Sky Limited Exposure
« Reply #34 on: 2010 December 04 01:55:11 »
Sean,

I think the author has used Etotal/min to denote Etotal in units of minutes......more usually wriiten as Etotal(min). But that's just a hunch, I may be wrong!

I'm not sure about the other equations. Could you contact the author for clarification?

Cheers
         Simon

***** Ignore the above....I've just re-read it......and I'm talking rubbish!!! ******
« Last Edit: 2010 December 04 08:07:04 by simonhicks »

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
    • View Profile
Re: New Script: Calculate Sky Limited Exposure
« Reply #35 on: 2010 December 04 09:19:34 »
Sean,

Wow, that paper is a difficult read! (or is it just me???)

Yes, lambda is ?, but its not too clear what lambda actually is. From the paragraphs just above eqn 14 it does look like it is something to do with the target signal. And if you click on the link to the info on the Poisson distribution then lambda is defined as "a positive real number, equal to the expected number of occurrences that occur during the given interval. For instance, if the events occur on average 4 times per minute, and one is interested in the probability of an event occurring k times in a 10 minute interval, one would use a Poisson distribution as the model with ? = 10×4 = 40." And that sounds like the faint target signal level to me.

But if you go down to the bottom of the paper to the final paragraph before the Conclusions, then it talks about lambda in a different way. It looks like its a factor that you can enter depending upon how close you want to be to a normal Poisson distribution.....with a value of 15 being a "good" value. IF this is correct, then lambda is effectively a constant....one that you choose at the begining.

I've got this feeling that what the author is saying is something like this......the maths analysis assumes a Poisson distribution. A Poisson dist becomes normal when the faint signal becomes > 5, with 15 being a 'good' number. So if you put 15 into the equations, then they will be valid and will give you the optimum subexposure for the faint parts of the image that have a signal level of 15. However, if you want to get the optimum subexposure time for parts of the image that have a signal level of 10 (or even 5) then it will still hold true.

This value of 15 is the signal level of the faint part that we are concerned about during the exposure, i.e. it is not the value per minute, but the value per minute multiplied by the subexposure time.

IF any of the above is correct then it still doesn't make much sense. The equation seems to be dimensionally incorrect....S seems to be in units of sqrt(T)?

I have no idea if any of this rambling helps at all????

Cheers
         Simon

Offline Sean Houghton

  • Newcomer
  • Posts: 36
    • View Profile
    • Cerebiggum
Re: New Script: Calculate Sky Limited Exposure
« Reply #36 on: 2010 December 04 11:24:04 »
That definition of lambda is what I initially thought and how I initially implemented the code.  Somehow I missed the conclusion where he clearly states that and went off reworkng everything to use target signal.  Now I'm glad I started using git to track revisions :)

I think the remaining confusion boils down to the unclear definition of ETotal and it's components.

Quote
No matter how many sub-frames you want to stack, there is going to be a limit in total exposure time, call it TTotal. The final combined stacked photo’s total noise term,  will be



Where: ETotal is the total noise for a shot of time T.
S is the sub-frame length in units of time T
TTotal is the total time in units of time T

I'm fairly certain that ETotal is the error for the sum of all subexposure time, not for each subexposure time. However, in his example he uses the value for ETotal/minute: 16.5 instead of the value his equations would produce for an ETotal for a 45 minute T (16.5 * 45 = 684 with no camera noise).

Adding to the confusion is the equations for light pollution noise that are not consistent with each other:




???  I'm going to email the author and see if he'll take a look at this thread.

Sean
Carlsbad, CA
cerebiggum.com

Offline Nigel Ball

  • PixInsight Addict
  • ***
  • Posts: 277
    • View Profile
    • Astrophotography by Nigel
Re: New Script: Calculate Sky Limited Exposure
« Reply #37 on: 2010 December 05 08:22:09 »
Sean

Only just got round to testing the latest version of the script

Seems to work okay but when i close the image I have run th escript on I get this error

After this I cannot run the script again without restarting PI

Windows 7 64 bit

Nigel
Nigel Ball
Nantwich, Cheshire, United Kingdom

Takahashi FSQ-106 at f/8, f/5 and f/3.6 on AP900, Nikon 28 mm and 180mm f/2.8
SBIG STL-11000M, Astrodon LRGB, 5nm Ha
ST-10XME, Astrodon HaLRGB
www.nigelaball.com

Offline Nigel Ball

  • PixInsight Addict
  • ***
  • Posts: 277
    • View Profile
    • Astrophotography by Nigel
Re: New Script: Calculate Sky Limited Exposure
« Reply #38 on: 2010 December 05 08:28:19 »
Thanks Sean. Works fine now  :)

I am not understanding something though: I image from 6800ft, at a location where we have a 21.5SQM skies.
And the ExposureCalculator is telling me that the suggested exposure should be 53 seconds?

How is that possible?


I'm also getting some 'unusual' figures for my Luminance subs - suggested exposures of 16s on a 300s Lum sub???

That said my Ha subs appear to be almost spot on? I don't profess to understand the maths here so perhaps someone could enlighten me :-[

Nigel

Nigel Ball
Nantwich, Cheshire, United Kingdom

Takahashi FSQ-106 at f/8, f/5 and f/3.6 on AP900, Nikon 28 mm and 180mm f/2.8
SBIG STL-11000M, Astrodon LRGB, 5nm Ha
ST-10XME, Astrodon HaLRGB
www.nigelaball.com

Offline Sean Houghton

  • Newcomer
  • Posts: 36
    • View Profile
    • Cerebiggum
Re: New Script: Calculate Sky Limited Exposure
« Reply #39 on: 2010 December 05 15:25:54 »
Ok, version 2.0 is ready for testing out. It includes my best effort at the Anstey equations for limited exposures.

  • Anstey model
  • Realtime updates
  • UI tweaks
Sean
Carlsbad, CA
cerebiggum.com

Offline Sean Houghton

  • Newcomer
  • Posts: 36
    • View Profile
    • Cerebiggum
Re: New Script: Calculate Sky Limited Exposure
« Reply #40 on: 2010 December 05 15:31:38 »
Quote
I'm also getting some 'unusual' figures for my Luminance subs - suggested exposures of 16s on a 300s Lum sub???

The readout noise limited exposures are very sensitive to the background ADU value.  If your skies have a high flux (e-/s) relative to readout noise you'll get low exposure numbers.  This can easily happen with an unfiltered luminance setup unless you're at very dark site.  Alternatively, if you use narrowband filters your sky flux can be so low that it can take hours to overcome the readout noise.

What sky flux value are you getting for your luminance test image?  Also, you can try running the script on a preview view that only contains background to ensure no target photons are creeping in - the script uses the image's median to approximate the background value.
Sean
Carlsbad, CA
cerebiggum.com

Offline Sean Houghton

  • Newcomer
  • Posts: 36
    • View Profile
    • Cerebiggum
Re: New Script: Calculate Sky Limited Exposure
« Reply #41 on: 2010 December 05 21:31:40 »
Charles Anstey, the author of the paper, has been very helpful (and patient) with my pestering.  With his help I have updated the script to use equation (16).  This version takes Ereadout into account and will provide more accurate values when ELP is very low.  However, this is fairly unlikely in most cases because with new cameras the Ereadout is so low and total integration time is so long.

Now, if only these clouds would clear up so I can get back to.
Sean
Carlsbad, CA
cerebiggum.com

Offline Nigel Ball

  • PixInsight Addict
  • ***
  • Posts: 277
    • View Profile
    • Astrophotography by Nigel
Re: New Script: Calculate Sky Limited Exposure
« Reply #42 on: 2010 December 06 04:00:17 »
Sean

Downloaded and ran the latest version

I'm still getting an error when I close the image window

Nigel

PS Could you add a feature to remember the last selected camera?

Nigel Ball
Nantwich, Cheshire, United Kingdom

Takahashi FSQ-106 at f/8, f/5 and f/3.6 on AP900, Nikon 28 mm and 180mm f/2.8
SBIG STL-11000M, Astrodon LRGB, 5nm Ha
ST-10XME, Astrodon HaLRGB
www.nigelaball.com

Offline Sean Houghton

  • Newcomer
  • Posts: 36
    • View Profile
    • Cerebiggum
Re: New Script: Calculate Sky Limited Exposure
« Reply #43 on: 2010 December 06 08:07:01 »
I'm running on OSX and don't get a crash but I'll take a look on my windows machine at work.  I think it might be related to one of the things Juan mentioned in his post.
Sean
Carlsbad, CA
cerebiggum.com

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
    • View Profile
Re: New Script: Calculate Sky Limited Exposure
« Reply #44 on: 2010 December 06 08:48:25 »
Just to confirm, I've been getting the same error message behaviour as Nigel. I'm running Win Vista 32 bit. Hope that helps.