Provides the utilities required to load output files from Pegasus++.
This module provides: - PegasusSpectralData: A class for holding the data loaded from a spectra file - _load_spectra: A function for loading spectra files
- class pegasustools.loading_spectra.PegasusSpectralData(file_path, n_prp=200, n_prl=400, max_w_prp=4.0, max_w_prl=4.0)¶
Bases:
objectHolds all the data loaded when loading a spectra file.
Stores the time data in a private variable accessible via a getter and stores the spectra data in a numpy array named data
- property meshblock_locations: DataFrame¶
Get meshblock locations DataFrame.
- Returns:
The location data for each meshblock. Keys are: - x1min - x1max - x2min - x2max - x3min - x3max
- Return type:
pl.DataFrame
- reduce_spectra()¶
Reduce the spectra.
Creates two new member variables, spectra_prl and spectra_prp, with the parallel and perpendicular averaged spectrum. Depends on max_w_prp, max_w_prl, n_prp, and n_prl being set correctly.
- Return type:
- property time: float32¶
Get the simulation time of the spectra file.
- Returns:
The time in the spectra file
- Return type:
np.float32