Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LasBasler User Presets #1328

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
31 changes: 31 additions & 0 deletions docs/source/upcoming_release_notes/1327-LasBasler_User_Presets.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
1327 LasBasler User Presets
#################

API Breaks
----------
- N/A

Library Features
----------------
- N/A

Device Features
---------------
- LasBasler: Adds long_names to signals
- LasBasler: Adds `save_setting` and `load_setting` signals for saving and loading settings

New Devices
-----------
- N/A

Bugfixes
--------
- N/A

Maintenance
-----------
- N/A

Contributors
------------
- aberges-SLAC
58 changes: 58 additions & 0 deletions pcdsdevices/areadetector/detectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,64 @@ def _auto_configure(self):
def _auto_configure(self, value):
self.configure(self._conf_d)

# Handle UserPresets configuration
default_setting = Cpt(EpicsSignal, 'UserSetDefaultSe_RBV', write_pv='UserSetDefaultSe',
kind='config',
doc='Default User Set to use on startup. See UserSetSelector'
' for more options')
user_setting = Cpt(EpicsSignal, 'UserSetSelector_RBV', write_pv='UserSetSelector',
kind='config',
doc='Current User Set to save/load')
save_setting = Cpt(EpicsSignal, 'UserSetSave.PROC', kind='config',
doc='Save current settings into selected User Set')
set_metadata(save_setting, dict(variety='command-proc', value=1))
load_setting = Cpt(EpicsSignal, 'UserSetLoad.PROC', kind='config',
doc='Load current settings into selected User Set')
set_metadata(load_setting, dict(variety='command-proc', value=1))

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Add some long_names
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are all of these long name updates just a ride-along update for readability, or are they related to the user set stuff somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both. Ride-along for better general readability and also for clarity on the newly added signals.

self.reset.long_name = 'Reset'
self.packet_size.long_name = 'Packet Size'
self.enet_bw.long_name = 'eNet Bandwidth'
self.manufacturer.long_name = 'Manufacturer'
self.camera_model.long_name = 'Camera Model'
self.sensor_size_x.long_name = 'Sensor Size (X)'
self.sensor_size_y.long_name = 'Sensor Size (Y)'
self.data_type.long_name = 'Data Type'
self.exposure.long_name = 'Exposure (s)'
self.gain.long_name = 'Gain'
self.num_images.long_name = 'Number of Images'
self.image_mode.long_name = 'Image Mode'
self.trigger_mode.long_name = 'Trigger Mode'
self.acquisition_period.long_name = 'Acquisition Period'
self.bin_x.long_name = 'Software Bin X'
self.bin_y.long_name = 'Software Bin Y'
self.region_start_x.long_name = 'Region Start (X)'
self.region_size_x.long_name = 'Region Size (X)'
self.region_start_y.long_name = 'Region Start (Y)'
self.region_size_y.long_name = 'Region Size (Y)'
self.acquire.long_name = 'Set Acquire'
self.acquire_rbv.long_name = 'Acquire State'
self.image_counter.long_name = 'Image Counter'
self.event_code.long_name = 'Event Code'
self.event_rate.long_name = 'Event Rate'
self.stats_enable.long_name = 'Enable Stats'
self.centroid_x.long_name = 'Centroid (X)'
self.centroid_y.long_name = 'Centroid (Y)'
self.sigma_x.long_name = 'Sigma (X)'
self.sigma_y.long_name = 'Sigma (Y)'
self.centroid_threshold.long_name = 'Centroid Threshold'
self.centroid_enable.long_name = 'Enable Centroid'
self.target_x.long_name = 'Target X'
self.target_y.long_name = 'Target Y'
self.auto_configure.long_name = 'Auto-configure'
self.default_setting.long_name = 'Default Preset'
self.user_setting.long_name = 'Current User Set'
self.save_setting.long_name = 'Save User Set'
self.load_setting.long_name = 'Load User Set'


class LasBaslerNF(LasBasler):
"""
Expand Down
Loading