pingwyn.clip
- pingwyn.clip(obj, min=0.05, max=0.95, relative=True)
Clip data to cut off extreme values.
- Parameters:
obj (pingwyn.Curve or pingwyn.Grid or pingwyn.Image or pingwyn.Profile) – The data object to clip
min (float, optional) – 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.
max (float, optional) – 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.
relative (bool, optional) – 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.
- Returns:
An object with the same type as obj with clipped values.
- Return type:
pingwyn.Curve or pingwyn.Grid or pingwyn.Image or pingwyn.Profile