diff --git a/src/ibex_bluesky_core/devices/dae/dae_spectra.py b/src/ibex_bluesky_core/devices/dae/dae_spectra.py index 3378fc3..5a042bb 100644 --- a/src/ibex_bluesky_core/devices/dae/dae_spectra.py +++ b/src/ibex_bluesky_core/devices/dae/dae_spectra.py @@ -56,7 +56,7 @@ def __init__(self, dae_prefix: str, *, spectra: int, period: int, name: str = "" int, f"{dae_prefix}SPEC:{period}:{spectra}:YC.NORD" ) - self.stddev, self._stddev_setter = soft_signal_r_and_setter(NDArray[float32], [0.0]) + self.stddev, self._stddev_setter = soft_signal_r_and_setter(NDArray[float32], []) super().__init__(name=name) @@ -85,7 +85,7 @@ async def read_counts_per_time(self) -> NDArray[float32]: async def read_counts_uncertainties(self) -> NDArray[float32]: """Read a correctly-sized array of uncertainties for each count.""" - return await self._read_sized(self.stddev, self.counts_size) # type: ignore + return await self._read_sized(self.stddev, self.counts_size) # type: ignore ??????? async def read_spectrum_dataarray(self) -> sc.DataArray: """Get a scipp DataArray containing the current data from this spectrum. diff --git a/src/ibex_bluesky_core/devices/simpledae/reducers.py b/src/ibex_bluesky_core/devices/simpledae/reducers.py index 77568fe..587db01 100644 --- a/src/ibex_bluesky_core/devices/simpledae/reducers.py +++ b/src/ibex_bluesky_core/devices/simpledae/reducers.py @@ -2,7 +2,7 @@ import asyncio from abc import ABCMeta, abstractmethod -from typing import TYPE_CHECKING, Collection, Sequence, Tuple +from typing import TYPE_CHECKING, Collection, Sequence import numpy as np import scipp as sc @@ -91,11 +91,6 @@ def additional_readable_signals(self, dae: "SimpleDae") -> list[Device]: self.det_counts, self.intensity, self.denominator(dae), - ] - - def additional_readable_signals_uncertainties(self, dae: "SimpleDae") -> list[Device]: - """Publish interesting signals derived or used by this reducer, including respective uncertainties.""" - return [ self.det_counts_stddev, self.intensity_stddev, ] @@ -186,11 +181,6 @@ def additional_readable_signals(self, dae: "SimpleDae") -> list[Device]: self.det_counts, self.mon_counts, self.intensity, - ] - - def additional_readable_signals_uncertainties(self, dae: "SimpleDae") -> list[Device]: - """Publish interesting signals derived or used by this reducer, including respective uncertainties.""" - return [ self.det_counts_stddev, self.mon_counts_stddev, self.intensity_stddev, diff --git a/tests/devices/simpledae/test_reducers.py b/tests/devices/simpledae/test_reducers.py index 3b6ea88..5f046cd 100644 --- a/tests/devices/simpledae/test_reducers.py +++ b/tests/devices/simpledae/test_reducers.py @@ -75,7 +75,7 @@ async def test_scalar_normalizer_publishes_uncertainties( simpledae: SimpleDae, good_frames_reducer: GoodFramesNormalizer, ): - readables = good_frames_reducer.additional_readable_signals_uncertainties(simpledae) + readables = good_frames_reducer.additional_readable_signals(simpledae) assert good_frames_reducer.intensity_stddev in readables assert good_frames_reducer.det_counts_stddev in readables @@ -213,7 +213,7 @@ async def test_monitor_normalizer_publishes_raw_and_normalized_count_uncertainti simpledae: SimpleDae, monitor_normalizer: MonitorNormalizer, ): - readables = monitor_normalizer.additional_readable_signals_uncertainties(simpledae) + readables = monitor_normalizer.additional_readable_signals(simpledae) assert monitor_normalizer.intensity_stddev in readables assert monitor_normalizer.det_counts_stddev in readables assert monitor_normalizer.mon_counts_stddev in readables