coconut_tools.read_dat_files¶
Reads physical simulation data from a formatted text file.
Functions
|
Read physical simulation data from a formatted text file. |
- coconut_tools.read_dat_files.read_data(filename, reduced=False, extended=False)[source]¶
Read physical simulation data from a formatted text file.
The file contains grids (colatitude, longitude), then blocks for the fields. When reduced is True, only reads vr, number_density, temperature, Br.
- Parameters:
filename (str) – Path to the file to be read.
reduced (bool, optional) – If True, only read vr, number_density, temperature, Br. Default is False.
extended (bool, optional) – If True, also read the radius value. Default is False.
- Returns:
date (str), r (Optional[float]), clt (np.ndarray), lon (np.ndarray), vr (np.ndarray) in km/s, vlon (Optional[np.ndarray]) in km/s, vclt (Optional[np.ndarray]) in km/s, density (np.ndarray) in m^-3, br (np.ndarray) in T (or whatever unit the file provides), bclt (Optional[np.ndarray]), blon (Optional[np.ndarray]), temp (np.ndarray) in K
- Return type:
tuple