Skip to content

Commit

Permalink
more signals
Browse files Browse the repository at this point in the history
  • Loading branch information
rerpha committed Aug 14, 2024
1 parent 7be520a commit c7d2ca3
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/ibex_bluesky_core/devices/dae.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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")
Expand All @@ -81,13 +98,18 @@ 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"
)

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)
Expand Down

0 comments on commit c7d2ca3

Please sign in to comment.