Author Topic: Odd statistics witn DSLR subs  (Read 2563 times)

Offline magnusl

  • PixInsight Enthusiast
  • **
  • Posts: 84
Odd statistics witn DSLR subs
« on: 2016 July 11 22:24:15 »
Hi!

I've found something odd in the statistics of my pre-processing of some DSLR-images. The images are from a Canon EOS 70D, that I understand to be a 14 bit camera. That would give me pixel values from 0 to 16383, if I am correct. And fully saturating the images gives me values around that. Now, what I've found, is that after calibrating with flat, dark, and bias, at least some of my lights produce maximum values that are twice as high. How can that be? And how can the max value INCREASE during calibration, that is all about removing, rather than adding, to the subs?

In the folder

https://www.dropbox.com/sh/fs744ujp8oed79d/AACfnztnt-E98N8km8Tv2dUBa?dl=0

you find two subs. The one from the camera is in FITS format, not CR2, as the EKOS system I use prefer to convert CR2 to FITS. Second, is a calibrated version of the same file. I use the statistics tool in PI set to 16 bits, aware that I will only be given values up to 16383 for these images. Max value for the raw image is then 15352, but for the calibrated (with suffix _c) it is 31867.

Anyone can explain this?

Magnus

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Odd statistics witn DSLR subs
« Reply #1 on: 2016 July 12 03:03:27 »
Hi Magnus,

This result is perfectly normal. The values above original raw values in the calibrated image are just a few undercorrected hot pixels.

In the first place, you are computing clipped statistics. To see the actual extrema in the calibrated image, open the Statistics tool and check the Unclipped option (read the tool tip text for more information). Now you'll see that the actual maximum value is 1.0, or 65535 in the unsigned 16-bit range. That is, there are white pixels in the calibrated image.

To check the calibrated image both quantitatively and qualitatively, apply the following PixelMath expression to the RGB/K channel:

b = $T > 15352/65535; n += b; $T*b

with the following symbols defined:

b, n = global(+)

Apply this PixelMath instance to a duplicate of the calibrated image. On the console you'll see the final value of the cumulative global PixelMath variable n:

* Global variables:
n(+) = { 57, 57, 57 }


57 is the total number of pixels above the original 15352 16-bit value, which is about a 0.00028% of the total pixels in the image. On the resulting image after PixelMath execution, you can identify the 57 undercorrected pixels as isolated single pixels throughout the image.

Hot pixel over/undercorrection is a side effect of our current dark optimization algorithm implementation in the ImageCalibration tool. It is a negligible issue because these outlier pixels should be rejected without problems in the image integration phase (provided that you have dithered your images). If you prefer, you can also fix them with the CosmeticCorrection tool. At any rate, they are statistically irrelevant.

The hot pixel over/undercorrection issue has been fixed with a new dark optimization algorithm that we have already designed. It will be implemented in a new version of the ImageCalibration tool that we'll release in September.
« Last Edit: 2016 July 12 03:17:22 by Juan Conejero »
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline magnusl

  • PixInsight Enthusiast
  • **
  • Posts: 84
Re: Odd statistics witn DSLR subs
« Reply #2 on: 2016 July 12 12:11:07 »
Hi!

Thanks a lot! Clear and thorough ...:) Now I understand.

Best,

Magnus