Author Topic: Data scaling and throughput estimation  (Read 3321 times)

Offline rga218

  • Newcomer
  • Posts: 37
Data scaling and throughput estimation
« on: 2013 August 12 20:50:28 »
Hi, I am trying to determine the overall efficiency of my imaging system (the mean throughput of the camera * QE of the detector in the filter bandpass). It is relatively easy to estimate this from the photometric zero point corresponding to a single data frame calibrated in physical units like electron/s, but I'm a bit puzzled about how I can do this once the images have been rescaled to the (0-1) range by PixInsight (e.g. after I have de-biased, dark-subtracted  flat-fielded them). Is it possible for me to recover the data values that would have occurred in the absence of scaling (from which I can get electron/s using the detector gain)?

I imagine the scaling information I need must be stored somewhere, since without access to scaling information I can't see how PixInsight's FluxCalibration process has enough information to calibrate a frame. I just can't seem to figure out how to determine this scaling data using information in the FITS headers.

Thank you,

Roberto Abraham
Roberto Abraham
Professor of Astronomy & Astrophysics
University of Toronto

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Data scaling and throughput estimation
« Reply #1 on: 2013 August 16 08:40:56 »
Hi Roberto,

The FluxCalibration tool has been fully documented:

http://pixinsight.com/doc/tools/FluxCalibration/FluxCalibration.html

On the above document you'll find information on the FLX2DN, FLXMIN and FLXRANGE FITS header keywords, which you can use to obtain the original data values and the calibrated energy flux units.

Let me know if this is the information you were looking for.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline rga218

  • Newcomer
  • Posts: 37
Re: Data scaling and throughput estimation
« Reply #2 on: 2013 August 16 09:56:55 »
Hi Juan,

Thanks for replying to my post. I'd read the documentation before posting, but I'm afraid I found that it didn't make sense. I think the problem is that I'm not understanding something fundamental about PixInsight's operation.

Here's the thing I don't understand. The quantity FLX2DN is a constant for any instrumental setup. To get to calibrated quantities one simply divides the image by this quantity:

Intensity (erg × cm-2s-1nm-1) = Intensity (DN) / FLX2DN

That's fine, I do similar things all the time in other software (e.g. IRAF) to calibrate my images.

However...

The documentation also says that one has to apply FluxCalibration on processed images: "Before using FluxCalibration, the image must have been dark and bias subtracted and flat-fielded, for example using the ImageCalibration tool." After this has been done the image has been rescaled to (0,1) and the thing I'm not understanding is how this rescaling is ignorable. So, in essence, the thing I'm not understanding is how it's possible for FLX2DN to be be independent of the scaling used to bring the images to the range (0,1).

Here's a thought experiment. Say I imaged a field yesterday and now I do a flux calibration using the FluxCalibration process. Say I then image the field again tonight but a very bright supernova has gone off in the field, so now the supernova is the brightest thing in the frame. The scaling applied to the images to bring them to the range (0,1) is now different so all the Intensity (DN) values are rescaled. But FLX2DN is the same for both frames. So physical fluxes of every object in the field returned by the FluxCalibration tool will be different on night 2 compared to night 1.

Anyway, apologies in advance as I'm sure I'm doing something stupid. The formula above would make sense to me if it were applied to raw images or if the scalings used to bring the data to the range (0,1) were known and accounted for in deriving FLX2DN.

Thanks,

Bob
« Last Edit: 2013 August 16 10:11:04 by rga218 »
Roberto Abraham
Professor of Astronomy & Astrophysics
University of Toronto

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Data scaling and throughput estimation
« Reply #3 on: 2013 August 16 10:20:48 »
Quote
The thing I'm not understanding is how this rescaling is ignorable

Quote
the thing I'm not understanding is how it's possible for FLX2DN to be be independent of the scaling used to bring the images to the range (0,1).

Rescaling of n-bit integer pixel data to the [0,1] floating point range consists of a simple division:

v = D/(2n - 1)

where v is the rescaled value and D is the input integer data value. In the case of 16-bit raw CCD data,

v = D16/65535

The output of the ImageCalibration tool is a 32-bit floating point image rescaled just as above. So we have the invariants 0=black and 1=white, and the operation is prefectly reversible. Naturally, the FluxCalibration tool has this into account.

Quote
Say I imaged a field yesterday and now I do a flux calibration using the FluxCalibration process. Say I then image the field again tonight but a very bright supernova has gone off in the field, so now the supernova is the brightest thing in the frame. The scaling is now different.

As described above, the scaling is not different: it is exactly the same in both cases.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline rga218

  • Newcomer
  • Posts: 37
Re: Data scaling and throughput estimation
« Reply #4 on: 2013 August 16 17:07:31 »
Thank you Juan, that is very helpful. I believer I now understand how the scaling works, and it all makes sense. For some reason I had picked up the incorrect impression that the scaling mapped the maximum data value in the frame to unity, rather than the maximum allowed by the data representation.

Thanks again,

Bob
Roberto Abraham
Professor of Astronomy & Astrophysics
University of Toronto

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Data scaling and throughput estimation
« Reply #5 on: 2013 August 25 08:07:08 »
Maybe the BasicCCDParameters script is useful for you. Can be found under Script/Instrumentation.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)