Sigma0 colour ramp: how is "max" assigned? P96 value? P97 value?

I’m working with TSX Stripmap SLC and CSK HIMAGE SLC data. My general workflow is very simple:

Read - Calibration - Speckle Filter - Terrain Correction - Write

I am evaluating different speckle filter types, window sizes & filter parameters to select the best option for my application. I use both linear and dB Sigma0.

When displaying Sigma0 S1TBX uses the standard black-grey-white colour ramp. My question is this, how does S1TBX calculate/assign the “Max:” assigned to the white on the colour ramp?

For my data the “Max:” ranges between a P96 value and a P97 value. It varies (as-in from P96 to P97) for SAR images of the same scene. It also varies (as-in from P96 to P97) for the same SAR image with different filters applied. I realise the intensity range is different for each one of these images - but I am unable find to a statistical link to the “Max:” value that S1TBX assigns?

Here is a snapshot of the stats on my Sigma0 (subscene) data in linear scale:

Minimum value: 6.0790397e-05
Maximum value: 39.405239
Range: 39.405178
Mean value: 0.0396978
Standard deviation: 0.198055
P75 = 0.0372
P80 = 0.0467
P85 = 0.0604
P90 = 0.0822

Assigned “Max:” value in the Colour Ramp = 0.153987268 which is equivalent to a P96.2 value.

I hope my question is stated clearly and I have provided enough information.