Hi Juan,

Incorrect Statistics after Pixelmath, see below.

PI 1.8.6.1457

macOS 10.14.3

Thanks,

Mike

Please download this

frame.

Launch PI.

Open Statistics process, select 16-bit, normalized on, open Options, check all available metrics, Save, OK.

Open light_01_c, select light_01_c view in Statistics, copy Statistics results, values listed below.

Apply Pixelmath "$T + median($T)" to frame with "Rescale results" option off.

Note that this is a location change and not a scale change.

Copy Statistics results, values listed below.

Note that values "median" did not change, and values "avgDev", "MAD", "sqrt(BWMV)", and "sqrt(PBMV)" did change.

These changes are suspect given a strict change in location.

Save the resulting frame as light_01_c_location and open this frame in a new window.

Select light_01_c_location view in Statistics.

Copy Statistics results, values listed below.

Note that light_01_c_location values differ from the light_01_c post Pixelmath values, and appear to be equal to expected values (ie median is doubled and scale metrics are invariant (up to some apparent roundoff error)).

Also that Sn and Qn did not suffer from this problem.

Although I have not tested this, and I could be mistaken, I am worried that ImageStatistics Core JavaScript object might suffer a similar bug across an image change within a script.

light_01_c pre Pixelmath:

K

count (%) 99.99933

count (px) 2082062

mean 481.672

modulus 1002871438.753

norm 1002871438.753

sumOfSquares 41379490.289

meanOfSquares 19.874

**median 336.139**variance 1070453.545

stdDev 1034.627

**avgDev 297.668****MAD 176.344****sqrt(BWMV) 208.955****sqrt(PBMV) 209.696**Sn 175.286

Qn 168.396

minimum 3.050

maximum 56862.308

minimumPos 1341, 1057

maximumPos 1651, 142

light_01_c post Pixelmath:

K

count (%) 100.00000

count (px) 2082076

mean 817.808

modulus 1702738966.855

norm 1702738966.855

sumOfSquares 55256990.093

meanOfSquares 26.539

**median 336.139**variance 1070447.914

stdDev 1034.625

**avgDev 603.676****MAD 498.358****sqrt(BWMV) 527.862****sqrt(PBMV) 510.238**Sn 175.288

Qn 168.398

minimum 336.139

maximum 57198.448

minimumPos 237, 131

maximumPos 1651, 142

light_01_c_location:

K

count (%) 100.00000

count (px) 2082076

mean 817.808

modulus 1702738966.855

norm 1702738966.855

sumOfSquares 55256990.093

meanOfSquares 26.539

**median 672.277**variance 1070447.914

stdDev 1034.625

**avgDev 297.669****MAD 176.345****sqrt(BWMV) 208.957****sqrt(PBMV) 209.700**Sn 175.288

Qn 168.398

minimum 336.139

maximum 57198.448

minimumPos 237, 131

maximumPos 1651, 142