ibex_bluesky_core.devices.polarisingdae
Specialised DAE interface for polarisation measurements.
Members
Initialise a DualRunDae. |
|
Create a Polarising DAE which uses wavelength binning and calculates polarisation. |
- class ibex_bluesky_core.devices.polarisingdae.DualRunDae(*, prefix: str, name: str = 'DAE', controller: TController_co, waiter: TWaiter_co, reducer_final: TPReducer_co, reducer_up: TMWBReducer_co, reducer_down: TMWBReducer_co, movable: Movable[float], movable_states: list[float])[source]
Bases:
Dae,Triggerable,AsyncStageable,Generic[TController_co,TWaiter_co,TPReducer_co,TMWBReducer_co]Initialise a DualRunDae.
- Parameters:
prefix – the PV prefix of the instrument being controlled.
name – A friendly name for this DAE object.
controller – A DAE control strategy, defines how the DAE begins and ends data acquisition Pre-defined strategies in the ibex_bluesky_core.devices.controllers module
waiter – A waiting strategy, defines how the DAE waits for an acquisition to be complete Pre-defined strategies in the ibex_bluesky_core.devices.waiters module
reducer_final – A data reduction strategy. It will be triggered once after the two runs.
reducer_up – A data reduction strategy. Triggers once after the first run completes.
reducer_down – A data reduction strategy. Triggers once after the second run completes.
movable – A device which will be changed at the start of the first run and between runs.
movable_states – A tuple of two floats, the states to set at the start and between runs.
- class ibex_bluesky_core.devices.polarisingdae.MultiWavelengthBandNormalizer(prefix: str, detector_spectra: Sequence[int], monitor_spectra: Sequence[int], sum_wavelength_bands: list[Callable[[Collection[DaeSpectra]], Awaitable[Variable | DataArray]]])[source]
Bases:
Reducer,StandardReadableInit.
- Parameters:
prefix – the PV prefix of the instrument to get spectra from (e.g. IN:DEMO:)
detector_spectra – a sequence of spectra numbers (detectors) to sum.
monitor_spectra – a sequence of spectra numbers (monitors) to sum.
sum_wavelength_bands – takes a sequence of summing functions, each of which takes spectra objects and returns a scipp scalar describing the detector intensity.
- class ibex_bluesky_core.devices.polarisingdae.PolarisationReducer(intervals: list[Variable], reducer_up: MultiWavelengthBandNormalizer, reducer_down: MultiWavelengthBandNormalizer)[source]
Bases:
Reducer,StandardReadableInit.
- Parameters:
intervals – a sequence of scipp describing the wavelength intervals over which to calculate polarisation.
reducer_up – A data reduction strategy, defines the post-processing on raw DAE data. Used to retrieve intensity values from the up-spin state.
reducer_down – A data reduction strategy, defines the post-processing on raw DAE data. Used to retrieve intensity values from the down-spin state.
- ibex_bluesky_core.devices.polarisingdae.polarising_dae(*, det_pixels: list[int], frames: int, movable: Movable[float], movable_states: list[float], intervals: list[Variable], total_flight_path_length: Variable, periods: bool = True, monitor: int = 1, save_run: bool = False) DualRunDae[Controller, Waiter, PolarisationReducer, MultiWavelengthBandNormalizer][source]
Create a Polarising DAE which uses wavelength binning and calculates polarisation.
This is a different version of monitor_normalising_dae, with a more complex set of strategies. While already normalising using a monitor and waiting for frames, it requires a movable device to be provided and will change the movable between two neutron states between runs. It uses wavelength-bounded binning, and on completion of the two runs will calculate polarisation.
- Parameters:
det_pixels – list of detector pixel to use for scanning.
frames – number of frames to wait for.
movable – A device which can be used to change the neutron state between runs.
movable_states – A tuple of two floats, the neutron states to be set between runs.
intervals – list of wavelength intervals to use for binning.
total_flight_path_length – total flight path length of the neutron beam from monitor to detector.
periods – whether or not to use software periods.
monitor – the monitor spectra number.
save_run – whether or not to save the run of the DAE.