diff --git a/src/ibex_bluesky_core/devices/dae.py b/src/ibex_bluesky_core/devices/dae.py index b0c4b82..d4e484b 100644 --- a/src/ibex_bluesky_core/devices/dae.py +++ b/src/ibex_bluesky_core/devices/dae.py @@ -43,13 +43,14 @@ def __init__(self, prefix: str, name: str = "DAE") -> None: with self.add_children_as_readables(): self.good_uah: SignalR[float] = epics_signal_r(float, f"{dae_prefix}GOODUAH") self.count_rate: SignalR[float] = epics_signal_r(float, f"{dae_prefix}COUNTRATE") + self.m_events: SignalR[float] = epics_signal_r(float, f"{dae_prefix}MEVENTS") + self.sim_mode : SignalR[bool] = epics_signal_r(bool, f"{dae_prefix}SIM_MODE") self.neutron_proton_ratio: SignalR[float] = epics_signal_r(float, f"{dae_prefix}NPRATIO") self.good_frames: SignalR[int] = epics_signal_r(int, f"{dae_prefix}GOODFRAMES") self.raw_frames: SignalR[int] = epics_signal_r(int, f"{dae_prefix}RAWFRAMES") self.total_counts: SignalR[int] = epics_signal_r(int, f"{dae_prefix}TOTALCOUNTS") - self.period_good_frames: SignalR[int] = epics_signal_r( int, f"{dae_prefix}GOODFRAMES_PD" ) @@ -64,10 +65,26 @@ def __init__(self, prefix: str, name: str = "DAE") -> None: self.num_time_channels: SignalR[int] = epics_signal_r(int, f"{dae_prefix}NUMTIMECHANNELS") self.num_spectra: SignalR[int] = epics_signal_r(int, f"{dae_prefix}NUMSPECTRA") + # TODO move this out to subdevice? self.period_run_duration: SignalR[int] = epics_signal_r(int, f"{dae_prefix}RUNDURATION_PD") self.period_good_frames: SignalR[int] = epics_signal_r(int, f"{dae_prefix}GOODFRAMES_PD") self.period_raw_frames: SignalR[int] = epics_signal_r(int, f"{dae_prefix}RAWFRAMES_PD") self.period_good_uah: SignalR[float] = epics_signal_r(float, f"{dae_prefix}GOODUAH_PD") + self.period_type: SignalR[str] = epics_signal_r(str, f"{dae_prefix}PERIODTYPE") + self.period_sequence: SignalR[int] = epics_signal_r(int, f"{dae_prefix}PERIODSEQ") + + # TODO hmm are we only going to show 1 of these or more? + # TODO move this out to subdevice? + self.monitor_spectrum: SignalR[int] = epics_signal_r(int, f"{dae_prefix}MONITORCOUNTS") + self.monitor_counts: SignalR[int] = epics_signal_r(int, f"{dae_prefix}MONITORSPECTRUM") + self.monitor_to: SignalR[float] = epics_signal_r(float, f"{dae_prefix}MONITORTO") + self.monitor_from: SignalR[float] = epics_signal_r(float, f"{dae_prefix}MONITORFROM") + + # TODO move this out to subdevice? + self.event_mode_fraction: SignalR[float] = epics_signal_r(float, f"{dae_prefix}EVENTMODEFRACTION") + self.event_mode_buf_used: SignalR[float] = epics_signal_r(float, f"{dae_prefix}EVENTMODEBUFUSED") + self.event_mode_file_size: SignalR[float] = epics_signal_r(float, f"{dae_prefix}EVENTMODEFILEMB") + self.event_mode_data_rate: SignalR[float] = epics_signal_r(float, f"{dae_prefix}EVENTMODEDATARATE") self.beam_current: SignalR[float] = epics_signal_r(float, f"{dae_prefix}BEAMCURRENT") self.total_uamps: SignalR[float] = epics_signal_r(float, f"{dae_prefix}TOTALUAMPS") @@ -81,6 +98,10 @@ def __init__(self, prefix: str, name: str = "DAE") -> None: self.users: SignalRW = isis_epics_signal_rw(str, f"{dae_prefix}_USERNAME") self.rb_number: SignalRW = isis_epics_signal_rw(str, f"{dae_prefix}_RBNUMBER") + # TODO move these out to period subdevice + self.period_num: SignalRW = isis_epics_signal_rw(int, f"{dae_prefix}PERIOD") + self.number_of_periods: SignalRW = isis_epics_signal_rw(int, f"{dae_prefix}NUMPERIODS") + self.spectra_1_period_1_x: SignalR[np.typing.NDArray[np.float32]] = epics_signal_r( np.typing.NDArray[np.float32], f"{prefix}DAE" f":SPEC:1:1:X" ) @@ -88,6 +109,7 @@ def __init__(self, prefix: str, name: str = "DAE") -> None: with self.add_children_as_readables(ConfigSignal): # add configurable pvs here ie. wiring tables, spectra number, etc. - stuff that'll change the shape of # other signals self. + pass self.controls: DaeControls = DaeControls(dae_prefix)