fastwater.otm_gpl.selafin module¶
Contains the class Selafin
- class fastwater.otm_gpl.selafin.Selafin(file_name)[source]¶
Bases:
object(DOXYGEN parsing) Class Selafin
- @brief
Read and create Selafin files with python
- @details
The idea is to be able to set float_type and float_type_size from outside when we start to write a selafinfiles. This will make it possible to do some kind of converters
- @history
switch between big/little endian
switch to double precission only for float
- @TODO
changes where only tested for simple reading, writing must still be done
get_series was not tested
all appen and put functions must be tested
needs some intensive testing
Intialisation of the class
@param file_name (string) Name of the file
- append_core_vars_slf(varsor)[source]¶
Write variable informations
@param varsor (list) List of value for each variable
- datetime = array([1972, 7, 13, 17, 24, 27])¶
- get_series(nodes, vars_indexes=None, showbar=True)[source]¶
Return the value for a list of nodes on variables given in vars_indexes for each time step
@param nodes (list) list of nodes for which to extract data @param vars_indexes (list) List of variables to extract data for @param showbar (boolean) If True display a showbar for the progress
- get_values(time)[source]¶
Get values for all variables for a give time step If alter_values were set it applies modification
- get_variables_at(frame, vars_indexes)[source]¶
Get values for a given time step and a list of variables
@param frame (int) Time step to extract @param vars_indexes (list) List of variable indices
@return (np.array) array containg the values for each variable
- put_content(file_name, showbar=True)[source]¶
Write content of the object into a Serafin file
@param file_name (string) Name of the serafin file @param showbar (boolean) If True displays a showbar