pyemu.pst.pst_controldata
This module contains several class definitions for obseure parts of the PEST control file: ControlData (’* control data’), RegData (’* regularization’) and SvdData (’* singular value decomposition’). These classes are automatically created and appended to Pst instances; users shouldn’t need to deal with these classes explicitly
Module Contents
Classes
an object that encapsulates the regularization section |
|
encapsulates the singular value decomposition |
|
an object that encapsulates the control data section |
Attributes
lambda function for string formatting str types into 20-char widths |
|
lambda function for string formatting str types into 50-char widths |
|
lambda function for string formatting int types into 10-char widths |
|
lambda function for string formatting float types into 15-char widths |
|
- pyemu.pst.pst_controldata.SFMT
lambda function for string formatting str types into 20-char widths
- pyemu.pst.pst_controldata.SFMT_LONG
lambda function for string formatting str types into 50-char widths
- pyemu.pst.pst_controldata.IFMT
lambda function for string formatting int types into 10-char widths
- pyemu.pst.pst_controldata.FFMT
lambda function for string formatting float types into 15-char widths
- pyemu.pst.pst_controldata.CONTROL_DEFAULT_LINES
- pyemu.pst.pst_controldata.CONTROL_VARIABLE_LINES
- pyemu.pst.pst_controldata.CONTROL_VARIABLES_UNUSED
- pyemu.pst.pst_controldata.REG_VARIABLE_LINES
- pyemu.pst.pst_controldata.REG_DEFAULT_LINES
- class pyemu.pst.pst_controldata.RegData
Bases:
object
an object that encapsulates the regularization section of the PEST control file
- write(f)
write the regularization section to an open file handle
- Parameters:
f (file handle) – open file handle for writing
- write_keyword(f)
write the regularization section to an open file handle using the keyword-style format
- Parameters:
f (file handle) – open file handle for writing
- class pyemu.pst.pst_controldata.SvdData(**kwargs)
Bases:
object
encapsulates the singular value decomposition section of the PEST control file
- Parameters:
kwargs (dict) – optional keyword arguments
- write_keyword(f)
write an SVD section to a file handle using keyword-style format
- Args:
f (file handle): open file handle for writing
- write(f)
write an SVD section to a file handle
- Parameters:
f (file handle) – open file handle for writing
- parse_values_from_lines(lines)
parse values from lines of the SVD section of a PEST control file
- Parameters:
lines ([strs]) – the raw ASCII lines from the control file
- class pyemu.pst.pst_controldata.ControlData
Bases:
object
- an object that encapsulates the control data section
of the PEST control file
Notes
This class works hard to protect the variables in the control data section. It type checks attempts to change values to make sure the type being passed matches the expected type of the attribute.
- property formatted_values
list the entries and current values in the control data section
- Returns:
formatted_values for the control data entries
- Return type:
pandas.Series
- __setattr__(key, value)
Implement setattr(self, name, value).
- __getattr__(item)
- static get_dataframe()
get a generic (default) control section as a dataframe
- Returns:
a dataframe of control data information
- Return type:
pandas.DataFrame
- static _parse_value(value)
- parse_values_from_lines(lines, iskeyword=False)
cast the string lines for a pest control file into actual inputs
- Parameters:
lines ([str]) – raw ASCII lines from pest control file
- copy()
- write_keyword(f)
write the control data entries to an open file handle using keyword-style format.
- Parameters:
f (file handle) – open file handle to write to
Notes
only writes values that have been accessed since instantiation
- write(f)
write control data section to a file
- Parameters:
f (file handle) – open file handle to write to