Provides the utilities required to load NBF files from Pegasus++.
This module provides: - PegasusNBFData: A class for holding the data loaded from a NBF file - _load_nbf: A function for loading NBF files
- class pegasustools.loading_nbf.PegasusNBFData(file_path)¶
Bases:
objectHolds all the data loaded when loading a NBF file.
It stores all the header data into private variables that are accessible via getters and stores the data arrays in a dictionary named data which is indexed via the variable field names in the NBF file.
- Parameters:
file_path (
Path)
- property big_endian: bool¶
Get the endianness of the NBF file.
- Returns:
The endianness of the NBF file. True if the data is big endian, False otherwise.
- Return type:
- property num_meshblocks: int¶
Get the number of mesh blocks in the NBF file.
- Returns:
The number of mesh blocks in the NBF file.
- Return type:
- property num_variables: int¶
Get the number of variables in the NBF file.
- Returns:
The number of variables/fields in the NBF file.
- Return type:
- property time: float64¶
Get the simulation time of the NBF file.
- Returns:
The time in the NBF file
- Return type:
np.float64