pyrk.inp.validation module¶
-
pyrk.inp.validation.
validate_g
(valname, val, llim)[source]¶ Raises errors if the value is less than the lower limit (llim) or if it is of the wrong type
Parameters: - valname (string) – the name of the value being validated
- val (should be a number (or pint.Quantity)) – the value to be validated
- llim (the same type as val) – the lower limit of acceptable value for val
-
pyrk.inp.validation.
validate_ge
(valname, val, llim)[source]¶ Raises errors if the value is less than the lower limit (llim) or if it is of the wrong type
Parameters: - valname (string) – the name of the value being validated
- val (should be a number (or pint.Quantity)) – the value to be validated
- llim (the same type as val) – the lower limit of acceptable value for val
-
pyrk.inp.validation.
validate_le
(valname, val, ulim)[source]¶ Raises errors if the value is greater than the upper limit (ulim) or if it is of the wrong type
Parameters: - valname (string) – the name of the value being validated
- val (should be a number (or pint.Quantity)) – the value to be validated
- ulim (the same type as val) – the upper limit of acceptable value for val
-
pyrk.inp.validation.
validate_not_none
(valname, val)[source]¶ Checks that val is not None
Parameters:
-
pyrk.inp.validation.
validate_num
(valname, val)[source]¶ Checks that val is a number
Parameters: - valname (string) – the name of the value being validated
- val (should be a number (or pint.Quantity)) – the value to be validated