spyfit.io.sfit4.read_matrix¶
-
spyfit.io.sfit4.
read_matrix
(filename, var_name='', dims='')¶ Read a single matrix (or a single vector) in SFIT4 output ascii files.
Use this function to load ‘out.ak_matrix’ and ‘out.seinv_vector’.
Parameters: filename : str
Name or path to the file.
var_name : str
Name chosen for the matrix/vector variable. If empty (default), the name is set from filename.
dims : tuple or str
Name of the dimension(s) of the matrix/vector. If empty (default), ‘x’ or (‘x’, ‘y’) is set.
Returns: dataset : dict
A CDM-structured dictionary.