mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-10-11 16:00:25 +02:00
Merge branch 'main' into dev/reject-non-readable
This commit is contained in:
+1
-1
@@ -36,7 +36,7 @@ add_custom_target(
|
||||
docs
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
|
||||
COMMAND
|
||||
${SPHINX_EXECUTABLE} -a -b html
|
||||
${SPHINX_EXECUTABLE} -W -a -b html
|
||||
-Dbreathe_projects.aare=${CMAKE_CURRENT_BINARY_DIR}/xml -c "${SPHINX_BUILD}"
|
||||
${SPHINX_BUILD}/src ${SPHINX_BUILD}/html
|
||||
COMMENT "Generating documentation with Sphinx")
|
||||
|
||||
@@ -3,7 +3,7 @@ ClusterFile
|
||||
===========
|
||||
|
||||
The :func:`ClusterFile` factory is the main interface for reading and writing
|
||||
cluster files. Use ``mode="r"`` to read, ``mode="w"`` to truncate and
|
||||
cluster files. Use ``mode="r"`` to read, ``mode="w"`` to truncate and
|
||||
write, or ``mode="a"`` to append.
|
||||
|
||||
The format does not store the cluster dimensions, value type, coordinate type,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user