Coverage for python/gsfit/database_readers/mock_st40_mdsplus/setup_isoflux_sensors.py: 0%
8 statements
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-14 15:25 +0000
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-14 15:25 +0000
1import typing
2from typing import TYPE_CHECKING
4import numpy as np
5import numpy.typing as npt
6from gsfit_rs import Isoflux
8if TYPE_CHECKING:
9 from . import DatabaseReader
12def setup_isoflux_sensors(
13 self: "DatabaseReader",
14 pulseNo: int,
15 settings: dict[str, typing.Any],
16 times_to_reconstruct: npt.NDArray[np.float64],
17) -> Isoflux:
18 """
19 This method initialises the Rust `Isoflux` class.
21 :param pulseNo: Pulse number, used to select which mocked MDSplus tree to read
22 :param settings: Dictionary containing the JSON settings read from the `settings` directory
23 :param times_to_reconstruct: Times to reconstruct the equilibrium
25 **This method is specific to a mock of ST40's experimental MDSplus database.**
27 The mock only stores magnetics, so an empty `Isoflux` class is returned.
29 See `python/gsfit/database_readers/interface.py` for more details on how a new database_reader should be implemented.
30 """
32 # Initialise the Isoflux Rust class
33 isoflux = Isoflux()
35 return isoflux