pyrokinetics.kinetics.imas.KineticsReaderIMAS#
- class pyrokinetics.kinetics.imas.KineticsReaderIMAS[source]#
Bases:
FileReaderClass that can read IMAS core_profile h5 files and return
Kineticsobjects. Users are not recommended to instantiate this class directly, and should instead use the functionsread_kineticsorKinetics.read_from_file. Keyword arguments passed to those functions will be forwarded to this class.IMAS core_profiles do not contain information about the minor radius, so it is necessary to pass an
Equilibrium` object to ``read_from_file. This contains the mapping from \(\psi_\text{N} \rightarrow r/a\).See also
KineticsClass representing a 1D profiles of species data
read_kinteicsRead a kinetics file, return an
Kinetics.
- __init__()#
Methods
__init__()read_from_file(filename[, time_index, time, eq])verify_file_type(filename)Quickly verify that we're looking at a IMAS file without processing
Attributes
- file_type: ClassVar[str] = 'IMAS'#
- read_from_file(filename, time_index=-1, time=None, eq=None)[source]#
- Parameters:
filename (
Pathlike) – Path to IMAS HDF5 filetime (
Optional[float]) – The time, in seconds, at which kinetics data should be taken. Data will be drawn from the time closest to the provided value. Users should only provide one oftimeortime_index. If neither is provided, data is drawn at the last time stamp.time_index (
Optional[int]) – As an alternative to providing the time directly, users may provide the index of the desired time stamp.eq (
Equilibrium) –Equilibriumobject containing the mapping from \(psi_\text{N} \rightarrow r/a\)
- Return type:
Kinetics