miscfuncs¶
Miscellaneous Functions
-
pypetrophysics.miscfuncs.dec_perc_convert(input_value, input_units)¶ Convert from decimal to percent or percent to decimal.
Parameters: - input_value (float) – Value to be converted.
- input_units (string) – Units of the input value. Enter either “percent” or “decimal”
Returns: Returns converted value in percent or decimal.
Return type: float
-
pypetrophysics.miscfuncs.limit_vals(input_value, low_limit, high_limit)¶ Apply limits to an input value.
Parameters: - input_value (float) – Input value.
- low_limit (float) – Low limit. If value falls below this limit it will be set to this value.
- high_limit (float) – High limit. If value falls above this limit it will be set to this value.
Returns: Returns input value unless it falls above or below the entered limits.
Return type: float