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

Offline Sean Houghton

  • Newcomer
  • Posts: 36
    • View Profile
    • Cerebiggum
New Script: Calculate Sky Limited Exposure
« on: 2010 November 26 22:48:47 »
Here's my first go at a PixInsight script.  It collects the information from a test image and gives you a suggested sub-exposure length at which point the read noise is low enough relative to sky noise that it makes sense to stop and take another sub-exposure.  The background and calculations are detailed in this paper.


Currently it doesn't handle DSLR images well I use data from the FITS header that isn't present in converted DSLR raw files.  The script uses the FITS information for most of the calculations with the exception of read noise which comes from the camera presets list.
Sean
Carlsbad, CA
cerebiggum.com

Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
    • View Profile
Re: New Script: Calculate Sky Limited Exposure
« Reply #1 on: 2010 November 28 02:54:04 »
Sean,

thank you for this very useful tool!
But it doesn't seem to work for me: see screenshot.
A couple of things:
1. I have an FLI ML8300, which is not present on the list
2. The FITS were captured in Maxim DL v5.09

« Last Edit: 2010 November 28 03:08:14 by Emanuele »

Offline Sean Houghton

  • Newcomer
  • Posts: 36
    • View Profile
    • Cerebiggum
Re: New Script: Calculate Sky Limited Exposure
« Reply #2 on: 2010 November 28 10:47:26 »
Thanks for the feedback,

It looks like some fields are missing in the FITS header for your image.  I captured most of my images in MaxIm DL 5.x and it worked; I'm using an ST-8300M. It's possible MaxIm is not populating the FITS header the same way for each camera.  Are you using a processed test image?

The fields that need to be present in the FITS header are:

  • CWHITE
  • PEDESTAL
  • EXPOSURE
  • EGAIN
  • XBINNING


I'm going to re-work the script so that you can enter in every value manually if the FITS header or preset list is incomplete.  In the meantime you can manually add them to your test image using the File -> Fits Header dialog.  From what I've read online your camera should use:

CWHITE: 25667 (although it seems like it should be 65535)
PEDESTAL: 0
EGAIN: 0.4

The read noise is 7.59

(source http://www.narrowbandimaging.com/images/u8300_ml8300_ptc_dtc_comparison.pdf)
Sean
Carlsbad, CA
cerebiggum.com

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
    • View Profile
Re: New Script: Calculate Sky Limited Exposure
« Reply #3 on: 2010 November 28 10:55:11 »
Hi Sean,

Well done on the script, it certainly looks interesting. If you are going to rework the script so you can manually enter certain bits of data...will this mean it can be used by DSLR users? (I'm one of them  ;) ).

Cheers
         Simon

Offline Nigel Ball

  • PixInsight Addict
  • ***
  • Posts: 277
    • View Profile
    • Astrophotography by Nigel
Re: New Script: Calculate Sky Limited Exposure
« Reply #4 on: 2010 November 28 14:49:46 »
Hi Sean

The script doesn't work for me

I'm using a QSI583 with Maxim 5.09

Running PI on Windows7 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 Sean Houghton

  • Newcomer
  • Posts: 36
    • View Profile
    • Cerebiggum
Re: New Script: Calculate Sky Limited Exposure
« Reply #5 on: 2010 November 28 18:53:40 »
Ok, here's version 0.2.  I rely more on the presets now and less on the FITS header so it should work better for everyone who doesn't have the exact same camera as me  ;)

New features:

  • Manual entry of every field
  • Better UI layout
  • Canon DSLR camera presets

Also, please double check my preset numbers for your camera.  I'm using values from various places on the interweb and errors are always possible.

« Last Edit: 2010 November 28 19:00:43 by Sean Houghton »
Sean
Carlsbad, CA
cerebiggum.com

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 967
    • View Profile
    • http://www.astrofoto.es/
Re: New Script: Calculate Sky Limited Exposure
« Reply #6 on: 2010 November 29 01:30:12 »
Hi Sean,

good work. This weekend I was thinking on another possibility for this script... It would be a direct measure of bias and light frames.

In the utility script section you have a script for evaluating the noise of one image (NoiseEvaluation). The idea would be:

- Load a bias frame and analyse the noise.
- Load a preview of the light frame containing a background sky area. Then analyse the noise.

From the ratio between noise intensity in the two frames you can calculate the appropriate exposure time.

The main advantage I see here is that maths are very simple: just copy and paste the NoiseEvaluation script. :)


Regards,
Vicent.

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
    • View Profile
Re: New Script: Calculate Sky Limited Exposure
« Reply #7 on: 2010 November 29 03:34:27 »
Hi Sean,

Quick question: Will this script give sensible results if I am giving it a RAW image from a Canon camera taken with an Halpha filter, i.e. so that the green and blue channels are effectively just noise?

Or should I extract just the red channel and use that with the script?

Cheers
         Simon

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
    • View Profile
Re: New Script: Calculate Sky Limited Exposure
« Reply #8 on: 2010 November 29 03:40:17 »
Update: I've just tried the script with an Halpha RAW and then again with only the red channel extracted.....both gave exactly the same results. So that seems cool!  ;)

Offline Simon Hicks

  • PixInsight Old Hand
  • ****
  • Posts: 333
    • View Profile
Re: New Script: Calculate Sky Limited Exposure
« Reply #9 on: 2010 November 29 05:08:17 »
Sorry...its me again!

I have a Canon 400D. I have found that the gain is 2.74 e/ADU at ISO400. ( http://astrosurf.com/buil/eos40d/test.htm ) How do I estimate the gain at ISO1600? Is it 2.74 divided by 4?

I have also found out that the readout noise is 7e at ISO400. Does the readout noise stay roughly constant with ISO? If not, how do I estimate it at ISO1600?

Any help would be really appreciated.

Cheers
         Simon

Offline Sean Houghton

  • Newcomer
  • Posts: 36
    • View Profile
    • Cerebiggum
Re: New Script: Calculate Sky Limited Exposure
« Reply #10 on: 2010 November 29 10:50:52 »
Hi Simon, I think your math is correct for the gain.  You are correct about the gain at different ISO values, to quote another page on the astrosurf site...

http://astrosurf.com/buil/50d/test.htm


For compute the inverse electronic gain at XXX ISO "sensitivity" use the relation: gain_XXX ISO = (400 ISO/XXX ISO) x gain_400 ISO. For example, the inverse electronic gain of 50D at 100 ISO is 400/100 x 0.57 = 2.28 electrons/ADU.


So basically twice the ISO means half the [inverse electronic] gain.
Sean
Carlsbad, CA
cerebiggum.com

Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
    • View Profile
Re: New Script: Calculate Sky Limited Exposure
« Reply #11 on: 2010 November 29 11:55:26 »
Hi Sean,
I have just downloaded version 0.2 and this is what is happening to the window:

Offline Sean Houghton

  • Newcomer
  • Posts: 36
    • View Profile
    • Cerebiggum
Re: New Script: Calculate Sky Limited Exposure
« Reply #12 on: 2010 November 29 12:17:36 »
Just drag the sizer in the lower right corner a bit and it will pop to the correct size.  I'm not sure why this is happening, it happens to me when I use the script on my laptop, but not on a 30" monitor.  It has something to do with the vertical size of the screen.  I left the dialog as "sizable" instead of the convention of preventing resizing to work around this problem.

If any other script developers know what's going on let me know  :-\
Sean
Carlsbad, CA
cerebiggum.com

Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
    • View Profile
Re: New Script: Calculate Sky Limited Exposure
« Reply #13 on: 2010 November 29 12:32:10 »
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?

Offline Emanuele

  • PixInsight Addict
  • ***
  • Posts: 270
    • View Profile
Re: New Script: Calculate Sky Limited Exposure
« Reply #14 on: 2010 November 29 12:34:26 »
I think it must be because I don't use darks with my ML8300. ?