Coverage for python/gsfit/database_readers/st40_spider_mdsplus/setup_isoflux_sensors.py: 0%

8 statements  

« prev     ^ index     » next       coverage.py v7.15.0, created at 2026-07-07 13:12 +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 read from the database 

22 :param settings: Dictionary containing the JSON settings read from the `settings` directory 

23 

24 **This method is specific to ST40's ASTRA stored on MDSplus.** 

25 

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

27 """ 

28 

29 # Initialise the Isoflux Rust class 

30 isoflux = Isoflux() 

31 

32 return isoflux