Merge branch 'main' into dev/reject-non-readable
Build on RHEL9 / build (push) Successful in 2m48s
Build on RHEL8 / build (push) Successful in 3m23s
Run tests using data on local RHEL8 / build (push) Successful in 4m31s

This commit is contained in:
Erik Fröjdh
2026-09-17 10:59:47 +02:00
committed by GitHub
4 changed files with 26 additions and 6 deletions
+6 -3
View File
@@ -5,9 +5,12 @@ def load_calibration(fname, hg0=False):
"""
Load calibration data from a file.
Parameters:
fname (str): Path to the calibration file.
hg0 (bool): If True, load HG0 calibration data instead of G0.
Parameters
----------
fname : str
Path to the calibration file.
hg0 : bool
If True, load HG0 calibration data instead of G0.
"""
gains = 3
+18 -1
View File
@@ -73,10 +73,27 @@ py::array_t<T> pybind_calculate_pedestal_g0(
}
void bind_calibration(py::module &m) {
py::options options;
options.disable_function_signatures();
m.def("apply_calibration", &pybind_apply_calibration<double>,
py::arg("raw_data").noconvert(), py::kw_only(),
py::arg("pd").noconvert(), py::arg("cal").noconvert(),
py::arg("n_threads") = 4);
py::arg("n_threads") = 4,
R"(
Apply the calibration to the raw data and return the result as a 3D array of doubles.
Parameters
----------
raw_data : array_like
3D array of shape ``(frames, rows, cols)``.
pd : array_like
Pedestal array.
cal : array_like
Calibration array.
n_threads : int, optional
Number of threads to use. Defaults to 4.
)");
m.def("apply_calibration", &pybind_apply_calibration<float>,
py::arg("raw_data").noconvert(), py::kw_only(),