pingwyn.core.clip

Clip data to cut off extreme values.

param obj:

The data object to clip

type obj:

pingwyn.Curve or pingwyn.Grid or pingwyn.Image or pingwyn.Profile

param min:

The minimum cutoff to clip data. Data lower than this value will be set to this value. If relative is True, this value is considered a fraction. Otherwise, it is an actual data value. Default: 0.05.

type min:

float, optional

param max:

The minimum cutoff to clip data. Data higher than this value will be set to this value. If relative is True, this value is considered a fraction. Otherwise, it is an actual data value. Default: 0.95.

type max:

float, optional

param relative:

If this flag is set to True, the min and max values are considered as fractions or percentages. For the default values, the top and bottom 5% of values will be clipped. If this flag is set to False, the min and max values are considered as actual data values, i.e. in the correct units and order of magnitude. Default: True.

type relative:

bool, optional

returns:

An object with the same type as obj with clipped values.

rtype:

pingwyn.Curve or pingwyn.Grid or pingwyn.Image or pingwyn.Profile