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

10 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 

7from shapely.geometry import LineString 

8from st40_database import GetData 

9 

10if TYPE_CHECKING: 

11 from . import DatabaseReader 

12 

13 

14def setup_isoflux_sensors( 

15 self: "DatabaseReader", 

16 pulseNo: int, 

17 settings: dict[str, typing.Any], 

18 times_to_reconstruct: npt.NDArray[np.float64], 

19) -> Isoflux: 

20 """ 

21 This method initialises the Rust `Isoflux` class. 

22 

23 :param pulseNo: Pulse number, used to read from the database 

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

25 

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

27 

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

29 """ 

30 

31 # Initialise the Isoflux Rust class 

32 isoflux = Isoflux() 

33 

34 return isoflux