mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-07-28 04:42:51 +02:00
added std to PedestalTrackingHistogram
This commit is contained in:
@@ -119,6 +119,30 @@ void define_pedestal_tracking_pixel_histogram_bindings(py::module &m) {
|
||||
containing the current cached pedestal mean.
|
||||
)")
|
||||
|
||||
.def(
|
||||
"pedestal_std",
|
||||
[](const PedestalTrackingPixelHistogram &self) {
|
||||
// pedestal_std() flushes + locks + memcpys; do all of
|
||||
// that without the GIL, only reacquire to wrap into a
|
||||
// numpy array.
|
||||
NDArray<PedestalTrackingPixelHistogram::AxisType, 2> *ptr =
|
||||
nullptr;
|
||||
{
|
||||
py::gil_scoped_release release;
|
||||
ptr = new NDArray<PedestalTrackingPixelHistogram::AxisType,
|
||||
2>(self.pedestal_std());
|
||||
}
|
||||
return return_image_data(ptr);
|
||||
},
|
||||
R"(
|
||||
Snapshot the per-pixel pedestal std stitched together
|
||||
from all shards.
|
||||
|
||||
Returns:
|
||||
A 2D numpy array (rows x cols, dtype: float64)
|
||||
containing the current cached pedestal std.
|
||||
)")
|
||||
|
||||
.def(
|
||||
"fill_async",
|
||||
[](PedestalTrackingPixelHistogram &self,
|
||||
|
||||
Reference in New Issue
Block a user