ibex_bluesky_core.devices.dae
Low-level bluesky device interface to the DAE.
Members
Device representing the full interface to the ISIS data acquisition electronics. |
|
Device that wraps a signal and checks the result of a set. |
|
The run state. |
- class ibex_bluesky_core.devices.dae.BeginRunEx(dae_prefix: str, name: str = '')[source]
Bases:
StandardReadable,Movable[BeginRunExBits]Set up write-only signal for
BEGINRUNEX.- set(value: BeginRunExBits) None[source]
Start a run with the specified behaviour flags.
See also
BeginRunExBitsfor a description of the behaviour flags.
- class ibex_bluesky_core.devices.dae.BeginRunExBits(value)[source]
Bases:
IntFlagBit-flags for
BeginRunEx.These flags control behaviour such as beginning in ‘paused’ mode.
- BEGIN_DELAYED = 2
Allow ‘delayed’ begin commands.
- BEGIN_PAUSED = 1
Begin a run in the ‘paused’ state.
- NONE = 0
Begin a run in the standard way.
- class ibex_bluesky_core.devices.dae.Dae(prefix: str, name: str = 'DAE')[source]
Bases:
StandardReadableDevice representing the full interface to the ISIS data acquisition electronics.
Warning
This class exposes underlying DAE functionality behaviour to bluesky, but has no configured behaviour. A raw
Daeobject is therefore unsuitable for use in a scan.To use the DAE in a scan, use a subclass such as
SimpleDae.- async trigger_and_get_specdata(detectors: ndarray[tuple[Any, ...], dtype[int32 | int64]] | slice | None = None) ndarray[tuple[Any, ...], dtype[int32]][source]
Get a correctly-shaped spectrum-data array.
This array will have shape (
num_spectra,num_time_channels).If detectors is a slice or an array, the number of detectors will be given by that slice or array. If detectors is None, all detectors, including the “junk” detector 0, will be included.
The number of spectra will be determined by the current DAE TCB settings. The returned array will not include the “junk” time-channel 0.
- Parameters:
detectors – a numpy array or slice describing detectors to get data from. Default is all detectors. Pass
np.array([1])to select detector 1.
- class ibex_bluesky_core.devices.dae.DaeCheckingSignal(datatype: type[T], prefix: str)[source]
Bases:
StandardReadable,Movable[T],Generic[T]Device that wraps a signal and checks the result of a set.
This ensures that the DAE has accepted a configuration change, ensuring that runs are not accidentally started in an unwanted configuration if the DAE does not accept new settings.
- Parameters:
datatype – The datatype of the signal.
prefix – The PV address of the signal.
- class ibex_bluesky_core.devices.dae.DaeControls(dae_prefix: str, name: str = '')[source]
Bases:
StandardReadableDAE run controls, for example to begin and end runs.
- abort_run: SignalX
Abort the current run (does not save data files).
- begin_run: SignalX
Begin a run.
- begin_run_ex: BeginRunEx
Begin a run, with options.
- end_run: SignalX
End a run.
- pause_run: SignalX
Pause the current run.
- recover_run: SignalX
Recover a previously-aborted run.
- resume_run: SignalX
Resume the current run.
- save_run: SignalX
Save a data file for the current run (equivalent to update & store).
- store_run: SignalX
Write data currently in-memory in the ICP to a data file.
- update_run: SignalX
Ensure that data in the DAE has been downloaded to the ICP.
- class ibex_bluesky_core.devices.dae.DaeEventMode(dae_prefix: str, name: str = '')[source]
Bases:
StandardReadableDAE event mode statistics.
- class ibex_bluesky_core.devices.dae.DaeMonitor(dae_prefix: str, name: str = '')[source]
Bases:
StandardReadableDAE monitor statistics and diagnostics.
- class ibex_bluesky_core.devices.dae.DaePeriod(dae_prefix: str, name: str = '')[source]
Bases:
StandardReadableDAE statistics and diagnostics for the current DAE period.
- class ibex_bluesky_core.devices.dae.DaePeriodSettings(dae_prefix: str, name: str = '')[source]
Bases:
StandardReadable,Locatable[DaePeriodSettingsData],Movable[DaePeriodSettingsData]DAE hardware period settings.
See also
DaePeriodSettingsDatafor options.- async locate() Location[DaePeriodSettingsData][source]
Retrieve the current DAE hardware period settings.
- set(value: DaePeriodSettingsData) None[source]
Set the current DAE hardware period settings.
- class ibex_bluesky_core.devices.dae.DaePeriodSettingsData(*, periods_settings: list[SinglePeriodSettings] | None = None, periods_soft_num: int | None = None, periods_type: PeriodType | None = None, periods_src: PeriodSource | None = None, periods_file: str | None = None, periods_seq: int | None = None, periods_delay: int | None = None)[source]
Bases:
objectData class for specifying hardware period settings.
- periods_settings: list[SinglePeriodSettings] | None = None
Explicit hardware period settings.
- periods_src: PeriodSource | None = None
Whether to get period settings from file or explicitly-set parameters.
- periods_type: PeriodType | None = None
Type of DAE periods in use.
- class ibex_bluesky_core.devices.dae.DaeSettings(dae_prefix: str, name: str = '')[source]
Bases:
StandardReadable,Locatable[DaeSettingsData],Movable[DaeSettingsData]DAE settings interface.
See also
DaeSettingsDatafor options.- async locate() Location[DaeSettingsData][source]
Retrieve the current DAE settings.
- set(value: DaeSettingsData) None[source]
Change any modified DAE settings.
- class ibex_bluesky_core.devices.dae.DaeSettingsData(*, wiring_filepath: str | None = None, detector_filepath: str | None = None, spectra_filepath: str | None = None, mon_spect: int | None = None, mon_from: int | None = None, mon_to: int | None = None, timing_source: DaeTimingSource | None = None, smp_veto: bool | None = None, ts2_veto: bool | None = None, hz50_veto: bool | None = None, ext0_veto: bool | None = None, ext1_veto: bool | None = None, ext2_veto: bool | None = None, ext3_veto: bool | None = None, fermi_veto: bool | None = None, fermi_delay: int | None = None, fermi_width: int | None = None, muon_ms_mode: bool | None = None, muon_cherenkov_pulse: int | None = None, veto_0_name: str | None = None, veto_1_name: str | None = None, veto_2_name: str | None = None, veto_3_name: str | None = None)[source]
Bases:
objectData class for general DAE settings.
All settings accept
None, which means this setting will not be changed from the current setting.- timing_source: DaeTimingSource | None = None
Dae timing source.
- class ibex_bluesky_core.devices.dae.DaeSpectra(dae_prefix: str, *, spectra: int, period: int, name: str = '')[source]
Bases:
StandardReadableInterface to a single DAE spectrum.
- async read_counts() ndarray[tuple[Any, ...], dtype[float32]][source]
Read a correctly-sized array of counts.
- async read_counts_per_time() ndarray[tuple[Any, ...], dtype[float32]][source]
Read a correctly-sized array of counts divided by bin width.
- async read_spectrum_dataarray() DataArray[source]
Get a
scipp.DataArraycontaining the current data from this spectrum.Variances are set to the counts - i.e. the standard deviation is \(\sqrt{N}\), which is typical for counts data.
Data is returned along dimension “tof”, which has bin-edge coordinates and units set from the units of the underlying PVs.
- class ibex_bluesky_core.devices.dae.DaeTCBSettings(dae_prefix: str, name: str = '')[source]
Bases:
StandardReadable,Locatable[DaeTCBSettingsData],Movable[DaeTCBSettingsData]DAE time channel settings.
See also
DaeTCBSettingsDatafor options.- async locate() Location[DaeTCBSettingsData][source]
Retrieve and convert the current XML to DaeTCBSettingsData.
- set(value: DaeTCBSettingsData) None[source]
Set any changes in the TCB settings to the XML.
- class ibex_bluesky_core.devices.dae.DaeTCBSettingsData(*, tcb_tables: dict[int, TimeRegime] | None = None, tcb_file: str | None = None, time_unit: TCBTimeUnit | None = None, tcb_calculation_method: TCBCalculationMethod | None = None)[source]
Bases:
objectDAE TCB (time channel binning) settings.
All values accept
None, which means do not change that setting from its current value.- tcb_calculation_method: TCBCalculationMethod | None = None
TCB source (file or explicit tables).
- tcb_tables: dict[int, TimeRegime] | None = None
TCB tables.
A dictionary of time-regime numbers (as
intkeys) toTimeRegimevalues.
- time_unit: TCBTimeUnit | None = None
TCB time unit (usually μs for neutron instruments, ns for muon instruments).
- class ibex_bluesky_core.devices.dae.DaeTimingSource(value)[source]
Bases:
EnumThe DAE timing source.
See also
DAE Timing Sources in the IBEX user manual.
- INTERNAL_TEST_CLOCK = 1
Timing pulse from the internal test clock.
- ISIS = 0
Timing pulse from the ISIS accelerator.
- ISIS_FIRST_TS1 = 5
ISIS timing, but only counting on the first TS1 pulse after the ‘missing’ TS2 pulse.
- ISIS_TS1_ONLY = 6
ISIS timing, but only counting TS1 pulses.
- MUON_CHERENKOV = 3
Cherenkov pulse timing (muon instruments only)
- MUON_MS = 4
MS pulse timing (muon instruments only)
- SMP = 2
Timing source from a ‘secondary master pulse’ (usually a chopper).
- class ibex_bluesky_core.devices.dae.PeriodSource(value)[source]
Bases:
EnumThe period setup source, whether to use parameters or file.
- FILE = 1
Specify DAE period settings using a file.
- PARAMETERS = 0
Specify DAE period settings using explicit parameters.
- class ibex_bluesky_core.devices.dae.PeriodType(value)[source]
Bases:
EnumDAE period type.
- HARDWARE_DAE = 1
Hardware periods (internal DAE control).
- HARDWARE_EXTERNAL = 2
Hardware periods (external signal control).
- SOFTWARE = 0
Software periods.
- class ibex_bluesky_core.devices.dae.RunstateEnum(value)[source]
Bases:
StrictEnumThe run state.
- ABORTING = 'ABORTING'
Aborting state.
- BEGINNING = 'BEGINNING'
Beginning state.
- CHANGING = 'CHANGING'
Changing state.
- ENDING = 'ENDING'
Ending state.
- PAUSED = 'PAUSED'
Paused state.
- PAUSING = 'PAUSING'
Pausing state.
- PROCESSING = 'PROCESSING'
Processing state.
- RESUMING = 'RESUMING'
Resuming state.
- RUNNING = 'RUNNING'
Running state.
- SAVING = 'SAVING'
Saving state.
- SETUP = 'SETUP'
Setup (idle) state.
- STORING = 'STORING'
Storing state.
- UPDATING = 'UPDATING'
Updating state.
- VETOING = 'VETOING'
Vetoing state (running blocked by hardware signal).
- WAITING = 'WAITING'
Waiting state (running blocked by run control).
- class ibex_bluesky_core.devices.dae.SinglePeriodSettings(*, type: int | None = None, frames: int | None = None, output: int | None = None, label: str | None = None)[source]
Bases:
objectData class for the settings on a single hardware period.
- class ibex_bluesky_core.devices.dae.TCBCalculationMethod(value)[source]
Bases:
EnumCalculation method for DAE TCB settings.
- SPECIFY_PARAMETERS = 0
Explicitly-specified TCB settings.
- USE_TCB_FILE = 1
TCB settings from file.
- class ibex_bluesky_core.devices.dae.TCBTimeUnit(value)[source]
Bases:
EnumTime unit for DAE TCB settings.
- MICROSECONDS = 0
Microsecond TCB unit (neutron instruments).
- NANOSECONDS = 1
Nanosecond TCB unit (muon instruments).
- class ibex_bluesky_core.devices.dae.TimeRegime(rows: dict[int, TimeRegimeRow])[source]
Bases:
objectA single DAE Time regime.
- rows: dict[int, TimeRegimeRow]
Dictionary with keys representing row number and
TimeRegimeRowvalues.
- class ibex_bluesky_core.devices.dae.TimeRegimeMode(value)[source]
Bases:
EnumTime Regime Mode options for a single row.
- BLANK = 0
Blank (unused) time regime.
- DT = 1
dT = Cspacing.
- DTDIVT = 2
dT/T = Cspacing.
- DTDIVT2 = 3
dT/T**2 = Cspacing.
- SHIFTED = 4
‘Shifted’ mode.