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

1import typing 

2from typing import TYPE_CHECKING 

3 

4import numpy as np 

5import numpy.typing as npt 

6from gsfit_rs import Isoflux 

7 

8if TYPE_CHECKING: 

9 from . import DatabaseReader 

10 

11 

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. 

20 

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 

24 

25 **This method is specific to a mock of ST40's experimental MDSplus database.** 

26 

27 The mock only stores magnetics, so an empty `Isoflux` class is returned. 

28 

29 See `python/gsfit/database_readers/interface.py` for more details on how a new database_reader should be implemented. 

30 """ 

31 

32 # Initialise the Isoflux Rust class 

33 isoflux = Isoflux() 

34 

35 return isoflux