Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

PI Sky Limited Exposure Script

  • Please log in to reply
9 replies to this topic

#1 Alex McConahay

Alex McConahay

    Cosmos

  • *****
  • topic starter
  • Posts: 9,104
  • Joined: 11 Aug 2008
  • Loc: Moreno Valley, CA

Posted 24 May 2020 - 08:01 PM

Looking through the many "What is the ideal exposure" threads, I thought I would look into the PI Scripts/Instrumentation/Calculate Sky Limited Exposure Script

 

After a few sessions of google, I really found no documentation of what it all means. It refers to the Anstey limits, and I read through the Anstey article (and lots of other stuff). I really found nothing that would help with what I wanted to know. 

 

How does one get something out of the Script. 

 

Camera input box looks pretty easy.....just identify your camera.

 

Background Image---Still pretty easy.....looks like I identify which image I want to analyze. SO, I take a sample image of what I think will be good, and identify that in the pull-down. The script goes into the FITS header, I assume, and gets the information it needs. Is that right so far? What else needs to be done? Do I need to change those parameters?

 

Options: Again pretty easy, and the context hints are helpful. Except for that "Total Exposures." Are they asking me to input how many seconds overall I have to devote to the image? Say I want to gather an hour of data----I put in 3600? If I want two hours, I put in 7200?

 

 

Results: Here it gets tricky.....I assume the "Background Flux" is what the script determines is the overall background. 

 

THen I cannot figure out what the other three elements are telling me? 
 

What is the Limit 1? Limit 2? Anstey Limit? I mean......which of those is the length of the ideal exposure?  

 

I would appreciate any help you can give out there. Including directing me to a source where this is explained. 

 

Alex

 


  • rockstarbill likes this

#2 FlankerOneTwo

FlankerOneTwo

    Viking 1

  • *****
  • Posts: 830
  • Joined: 30 Aug 2017
  • Loc: Vegas, baby!

Posted 24 May 2020 - 10:31 PM

Interesting, I've never looked at that script. The source code for the script references this article for the Antsey limit:

https://www.cloudyni...-exposure-r1571

 

and this page for the other two limits (seems to be dead link, the Advanced CCD tutorial page doesn't seem to want to open for me at the moment either):

http://starizona.com...vtheoryexp.aspx

 

I'll have to read up on that sometime.



#3 bobFranke

bobFranke

    Sputnik

  • -----
  • Posts: 38
  • Joined: 16 Aug 2010
  • Loc: Chino Valley, AZ USA

Posted 24 May 2020 - 11:48 PM

Yes, there's something strange going on with the starizona website. Here's the link for the exposure calculator.
https://starizona.co...ure-calculator/

 

I found that it will work if you restart your web browser and then paste this in for the URL. Another way to go is to create a desktop shortcut and execute after closing the browser.

 

Additional info…

Further testing seems to show that, after restarting the browser, the above link will work. But only once. Then you have to restart the browser. At least, that is how it is working for me. :-)

 

 

Cheers,
Bob
http://bf-astro.com/


Edited by bobFranke, 24 May 2020 - 11:56 PM.


#4 Alex McConahay

Alex McConahay

    Cosmos

  • *****
  • topic starter
  • Posts: 9,104
  • Joined: 11 Aug 2008
  • Loc: Moreno Valley, CA

Posted 25 May 2020 - 08:27 AM

I've read through the CN link to the Antsey article. I do not see what the references to Limit 1 and 2. (And while I was familiar with the concepts, and got the overall drift of the article, I could not follow in too much detail.)

 

I have used the Starizona calculator before. And, even switching browsers I cannot get into Starizona to check the tutorial. 

 

The advantage of the PI script seems to be that you can take a picture on site with whatever sky you might have, have it analyzed, and get a recommendation for ideal subexposure. Starizona's calculator requires a bit more work. 

Alex



#5 rockstarbill

rockstarbill

    Fly Me to the Moon

  • *****
  • Posts: 6,994
  • Joined: 16 Jul 2013
  • Loc: Snohomish, WA

Posted 25 May 2020 - 09:26 AM

Do you want to know the length of the exposure or the ADU of the exposure?



#6 FlankerOneTwo

FlankerOneTwo

    Viking 1

  • *****
  • Posts: 830
  • Joined: 30 Aug 2017
  • Loc: Vegas, baby!

Posted 25 May 2020 - 09:35 AM

I've read through the CN link to the Antsey article. I do not see what the references to Limit 1 and 2. (And while I was familiar with the concepts, and got the overall drift of the article, I could not follow in too much detail.)

 

I have used the Starizona calculator before. And, even switching browsers I cannot get into Starizona to check the tutorial. 

 

The advantage of the PI script seems to be that you can take a picture on site with whatever sky you might have, have it analyzed, and get a recommendation for ideal subexposure. Starizona's calculator requires a bit more work. 

Alex

The comment in the code above the Limit 1 and 2 calculations points to the Starizona page, unfortunately.

 

// from http://starizona.com...vtheoryexp.aspx
   this.calculateSkyLimitedExposure = function()
   {
      debugPrint("");
      debugPrint("-------------------------------------------");
      debugPrint("Read noise limited exposure calculation (I)");
      debugPrint("-------------------------------------------");
      debugPrint("Background ADU: " + this.ccd.normToAdu(this.backgroundImageData.median) + " ADU");
      debugPrint("Background Flux:" + this.backgroundFluxE + " e-");
      debugPrint("RO Noise:       " + this.ccd.readnoise + " e-");
      debugPrint("");

      debugPrint("t = (Ron*Ron) / (((1+p)^2-1) * Esky)");
      var pct = this.readoutNoisePct / 100.0;
      var effectiveReadoutNoiseE = this.ccd.readnoise / this.backgroundImageData.binning;

      debugPrint("t = " + effectiveReadoutNoiseE + "^2 / " + "(((1+" + pct + ")^2-1) * " + this.backgroundFluxE + ")");

      var k = 1.0 / (((1.0+pct)*(1.0+pct)) - 1.0);
      var result = k * Math.pow(effectiveReadoutNoiseE,2) / this.backgroundFluxE;

      debugPrint("t = " + result);
      debugPrint("");

      return result;
   }

   // from http://starizona.com...vtheoryexp.aspx
   this.calculateSkyLimitedExposure2 = function()
   {
      debugPrint("");
      debugPrint("--------------------------------------------");
      debugPrint("Read noise limited exposure calculation (II)");
      debugPrint("--------------------------------------------");
      debugPrint("Background ADU: " + this.ccd.normToAdu(this.backgroundImageData.median) + " ADU");
      debugPrint("Background Flux:" + this.backgroundFluxE + " e-");
      debugPrint("RO Noise:       " + this.ccd.readnoise + " e-");
      debugPrint("");

      debugPrint("t = (4.38 * Ron^2) / (Elp^2 + Edc^2)");

      var pct = this.readoutNoisePct / 100.0;
      var effectiveReadoutNoiseE = this.ccd.readnoise / this.backgroundImageData.binning;

      debugPrint("t = (4.38 * " + effectiveReadoutNoiseE + "^2) / ("+ this.backgroundFluxE + "^2 + " + this.ccd.darkCurrentNoise + "^2)");

      var result = 4.38 * Math.pow(effectiveReadoutNoiseE,2) / (Math.pow(this.backgroundFluxE,2)+Math.pow(this.ccd.darkCurrentNoise,2));

      debugPrint("t = " + result);
      debugPrint("");

      return result;
   }



#7 rockstarbill

rockstarbill

    Fly Me to the Moon

  • *****
  • Posts: 6,994
  • Joined: 16 Jul 2013
  • Loc: Snohomish, WA

Posted 25 May 2020 - 09:43 AM

If you just want to know the ADU, you can use this basic utility I wrote:

 

https://github.com/r...rbill/mindncalc

 

It uses Jon Rista's swamping calculation he has posted about in the past. I actually fixed it this morning, as it was not properly calculating anything other than 3xRN^2. Now it calculates them all (3x, 20x, User Defined) correctly. 

 

You do need to know a few things:

 

1. The Read Noise of the camera in electrons.

2. The Gain of the camera, in e-/ADU.

3. The Bias Offset of the camera.

4. The Bit Depth of the camera.

 

All of these you can get from the manufacturer or from the BasicCCDParameters script in PI. 



#8 jdupton

jdupton

    Mercury-Atlas

  • *****
  • Posts: 2,517
  • Joined: 21 Nov 2010
  • Loc: Central Texas, USA

Posted 25 May 2020 - 09:59 AM

Bob,

 

Yes, there's something strange going on with the starizona website. Here's the link for the exposure calculator.
https://starizona.co...ure-calculator/

 

I found that it will work if you restart your web browser and then paste this in for the URL. Another way to go is to create a desktop shortcut and execute after closing the browser.

 

Additional info…

Further testing seems to show that, after restarting the browser, the above link will work. But only once. Then you have to restart the browser. At least, that is how it is working for me. :-)

 

   For anyone having trouble with the Starizona link, the article is available through the Internet Wayback Machine (archive.org).

 

https://web.archive.org/web/20171030042744/http://starizona.com/acb/ccd/advtheoryexp.aspx

 

   It seems to load from there without trouble.

 

 

John



#9 Alex McConahay

Alex McConahay

    Cosmos

  • *****
  • topic starter
  • Posts: 9,104
  • Joined: 11 Aug 2008
  • Loc: Moreno Valley, CA

Posted 25 May 2020 - 10:14 AM

Thanks for the contributions. 

 

Unfortunately, and perhaps I am just denser than I need to be, neither the Starizona article or the original Anstey article seems to tell me what the numbers at the end of the PI calculation mean. And I have found no documentation in the PI site. I did find somebody asking essentially the same question three years ago without any response. 

 

I understand the theory behind the 5% background rule. And I do have alternate ways to calculate ideal exposure. In one of my cameras, the background should  be 1300. On a different one, it should be 1700. And SGP has an ideal exposure calculator. So, I am not asking how to determine ideal exposure. I am asking how to use the Script.

 

Alex 



#10 rockstarbill

rockstarbill

    Fly Me to the Moon

  • *****
  • Posts: 6,994
  • Joined: 16 Jul 2013
  • Loc: Snohomish, WA

Posted 25 May 2020 - 10:42 AM

I looked at it, and it is not clear about what conclusions it comes to. Some of the input values are questionable as well, and the tooltips are not very helpful. 




CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics