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

9 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 Pressure 

7from st40_database import GetData 

8 

9if TYPE_CHECKING: 

10 from . import DatabaseReader 

11 

12 

13def setup_pressure_sensors( 

14 self: "DatabaseReader", 

15 pulseNo: int, 

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

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

18) -> Pressure: 

19 """ 

20 This method initialises the Rust `Pressure` class. 

21 

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

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

24 

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

26 

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

28 """ 

29 

30 # Initialise the Pressure Rust class 

31 pressure = Pressure() 

32 

33 return pressure