Coverage for python/gsfit/database_readers/freegsnke/setup_isoflux_sensors.py: 100%

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 freegsnke.equilibrium_update import Equilibrium as FreeGsnkeEquilibrium 

7from gsfit_rs import Isoflux 

8from shapely.geometry import LineString 

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 time: npt.NDArray[np.float64], 

20 freegsnke_eqs: list[FreeGsnkeEquilibrium], 

21) -> Isoflux: 

22 """ 

23 This method initialises the Rust `Isoflux` class. 

24 

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

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

27 :param time: Measured time vector 

28 :param freegsnke_eqs: List of FreeGSNKE equilibrium objects, one for each time-slice 

29 

30 **This method is specific to FreeGSNKE.** 

31 

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

33 """ 

34 

35 # Initialise the Isoflux Rust class 

36 isoflux = Isoflux() 

37 

38 # TODO: Implement this method 

39 

40 return isoflux