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

Not sure if I'm doing this right, sky flux calc from an image

  • Please log in to reply
8 replies to this topic

#1 Peregrinatum

Peregrinatum

    Viking 1

  • *****
  • topic starter
  • Posts: 804
  • Joined: 27 Dec 2018
  • Loc: South Central Valley, Ca

Posted 21 January 2020 - 11:35 PM

Need a little help fellas to see if I'm doing this right...

 

I'm trying to calculate the sky flux from background previews in Pixinsight...  this is what I have done using an image from my ASI1600MM 12 bit:

 

1)  Open 12 bit FITS file in PI (raw image, was not calibrated)
2)  Create several background only previews, image was Ha 300s 200 gain 40 offset
3)  Use PreviewAggregator Script to combine previews into 1 imaged saved as 16 bit image (see image below)
4)  Open 16 bit Preview Image in Statistics Process (see screenshot)
5)  Measure mean adu in 16 bit, mean adu = 1034

 

Sky Flux = (mean -  offset) / time = (1034 - 50) / 300 = 3.28 adu/s

 

Sky Noise = SQRT(Sky Flux) = SQRT(3.28) = 1.81

 

M4FEPVil.jpg

 

VOc1ohIl.jpg



#2 bobzeq25

bobzeq25

    Hubble

  • *****
  • Posts: 18,388
  • Joined: 27 Oct 2014

Posted 22 January 2020 - 12:17 AM

Few things.  Why did you say 40 offset, and then use 50 in the equation?  Is the 50 (or 40) 16 bit? 

 

I'd do this a bit more surely.  Instead of using the offset, I'd use a bias frame at the same gain as the light and the PI statistics from it.  Much less likely to make a mistake that way.  And I'd check a dark, to see if the PI statistics are close enough to the bias.  The light may have significant thermal noise embedded in it.


Edited by bobzeq25, 22 January 2020 - 12:23 AM.


#3 freestar8n

freestar8n

    Vendor - MetaGuide

  • *****
  • Vendors
  • Posts: 9,279
  • Joined: 12 Oct 2007

Posted 22 January 2020 - 12:38 AM

First make sure you convert adu to electrons before you take the square root.

I would keep things very simple to get a basic value and then use more elaborate methods once you know the ballpark value.

Take a single light and subtract a single dark from it. Both raw. Then find the means of the result in some dark part of the image. Convert to electrons and take the square root. That is your sky noise. Now divide the electron count by exposure time and that is your sky background flux.

Frank
  • BenKolt, happylimpet, bmhjr and 1 other like this

#4 bulrichl

bulrichl

    Mariner 2

  • -----
  • Posts: 209
  • Joined: 27 May 2018
  • Loc: La Palma (Canary Islands)

Posted 22 January 2020 - 06:32 AM

Both answers are correct, but there is one important hint missing:

 

The camera driver scales the intensity values (from 12 bit to 16 bit, i.e. multplies by factor 16). This must be accounted for. The correct equation would read:

Sky flux = ( mean(preview) - mean(bias) ) / 16 / time * gain
(gain in e/ADU)

Bernd



#5 Peregrinatum

Peregrinatum

    Viking 1

  • *****
  • topic starter
  • Posts: 804
  • Joined: 27 Dec 2018
  • Loc: South Central Valley, Ca

Posted 22 January 2020 - 09:58 AM

Both answers are correct, but there is one important hint missing:

 

The camera driver scales the intensity values (from 12 bit to 16 bit, i.e. multplies by factor 16). This must be accounted for. The correct equation would read:

Sky flux = ( mean(preview) - mean(bias) ) / 16 / time * gain
(gain in e/ADU)

Bernd

Hi Bernd, yes this is one issue I am not sure on.

 

The raw image was 12 bit, and if I use Statistics Process I should use 12 bit from the drop down list.

 

However, the PreviewAggregator image was saved as 16 bit, so do I select 12 bit or 16 bit to measure the previews in image in Statistics?



#6 bobzeq25

bobzeq25

    Hubble

  • *****
  • Posts: 18,388
  • Joined: 27 Oct 2014

Posted 22 January 2020 - 11:27 AM

Hi Bernd, yes this is one issue I am not sure on.

 

The raw image was 12 bit, and if I use Statistics Process I should use 12 bit from the drop down list.

 

However, the PreviewAggregator image was saved as 16 bit, so do I select 12 bit or 16 bit to measure the previews in image in Statistics?

You can do it either way, so long as you're consistent, and do the ADU to electrons conversion correctly.  PI is pretty smart about scaling things properly in Statistics.

 

This is why I recommended using a bias frame, rather than offset.  It makes it easier to be consistent.  But freestar8ns suggestion of a dark is better, the dark includes bias and thermal noise.


Edited by bobzeq25, 22 January 2020 - 11:31 AM.

  • Peregrinatum likes this

#7 Peregrinatum

Peregrinatum

    Viking 1

  • *****
  • topic starter
  • Posts: 804
  • Joined: 27 Dec 2018
  • Loc: South Central Valley, Ca

Posted 22 January 2020 - 11:54 AM

You can do it either way, so long as you're consistent, and do the ADU to electrons conversion correctly.  PI is pretty smart about scaling things properly in Statistics.

 

This is why I recommended using a bias frame, rather than offset.  It makes it easier to be consistent.  But freestar8ns suggestion of a dark is better, the dark includes bias and thermal noise.

 

Ok sounds good Bob!

 

How would I convert Sky Background Noise to adu:

 

Sky Background Noise in adu = SQRT(Sky Background Signal in e / gain)   ???

 

edit: I flubbed up the formula, fixed it


Edited by Peregrinatum, 22 January 2020 - 12:16 PM.


#8 bobzeq25

bobzeq25

    Hubble

  • *****
  • Posts: 18,388
  • Joined: 27 Oct 2014

Posted 22 January 2020 - 12:01 PM

Ok sounds good Bob!

 

How would I convert Sky Background Noise to adu:

 

Sky Background Noise in adu = SQRT(Sky Background Signal in e) / gain   ???

2nd graph down, below.  That's going to be 12 bit ADU, like the camera.  Obviously, doing this at gain 139 would be simpler.

 

Most would change everything to electrons, sky noise data is usually in electrons.  You had used ADU, so I went with that.

 

https://astronomy-im.../asi1600mm-cool


Edited by bobzeq25, 22 January 2020 - 12:04 PM.


#9 Peregrinatum

Peregrinatum

    Viking 1

  • *****
  • topic starter
  • Posts: 804
  • Joined: 27 Dec 2018
  • Loc: South Central Valley, Ca

Posted 22 January 2020 - 09:42 PM

Thanks guys I got it dialed in... need to do the calcs in the native camera bit depth and it works out fine.


  • bobzeq25 likes this


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