Author Topic: Statistics displays wrong values when the whole image is white (1.0)  (Read 4376 times)

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Hi,
There is a bug in "Statistics".
WHATEVER process you use which creates a white image (where all Pixels are set to 1.0)
Statistics displays pixel values 0.0  instead of 1.0

Using the Readout Cursor it correctly displays the Pixel values 1.0

Gerald

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
The statistics process should probably have a toggle setting "Ignore saturated pixels or 0 pixels", instead of silently ignoring them.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Hi Gerald,

The values displayed are not wrong. The Statistics tool excludes pure black and white pixels by default, as these pixels carry no information on a representable image.

In the next version we have included an "unclipped" option to disable automatic clipping; see the attached screenshot. Of course this option is disabled by default, so 0/1 pixel samples continue being excluded by default.

Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline kwiechen

  • PixInsight Addict
  • ***
  • Posts: 186
Is it possible to exclude 0 and 1 pixels from PJSR Image.mean() and PixelMath's mean() functions and others too?

Best regards,

Kai

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Is it possible to exclude 0 and 1 pixels from PJSR Image.mean() and PixelMath's mean() functions and others too?

Sure. Use the following properties:

Number Image.rangeClipHigh
Number Image.rangeClipLow
Boolean Image.rangeClippingEnabled


to define range clipping bounds and enable/disable range clipping for a particular image.

As for PixelMath, the next version distributed with core version 1.8.3 comes with a special symbol initialization function that allows you to access view properties such as Mean, Median, StdDev, MAD, etc, in both clipped and unclipped versions. As of version 1.8.2, only clipped statistics are available through the mean($T), median($T), etc.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline kwiechen

  • PixInsight Addict
  • ***
  • Posts: 186
Juan,

thank you for the info. This is a handy feature to obtain information about a pixel subset in the image.

Best regards,

Kai 

Offline kwiechen

  • PixInsight Addict
  • ***
  • Posts: 186
PS this works nicely! Can't wait for more PJSR documentation and integrated C++ support .......

Best regards,

Kai