Coverage for python/gsfit/database_readers/freegs/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 freegs 

5import numpy as np 

6import numpy.typing as npt 

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 freegs_eqs: list[freegs.equilibrium.Equilibrium], 

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 freegs_eqs: List of FreeGS equilibrium objects, one for each time-slice 

29 

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

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 return isoflux