spyfit.io.sfit4.read_table

spyfit.io.sfit4.read_table(filename, var_name='', dims=(), index_cols=True)

Read (labeled) tabular data in SFIT4 output ascii files.

Use this function to load ‘out.k_matrix’, ‘out.g_matrix’, ‘out.kb_matrix’, ‘out.sa_matrix’, ‘out.sainv_matrix’ and ‘out.shat_matrix’.

Parameters:

filename : str

Name or path to the file.

var_name : str

Name chosen for the tabular variable. If empty (default), the name is set from filename.

dims : tuple

Name of the dimension(s) of the table. If empty (default), (‘rows’, ‘cols’) is set.

Returns:

dataset : dict

A CDM-structured dictionary.