-
Notifications
You must be signed in to change notification settings - Fork 62
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
base: master
Are you sure you want to change the base?
LasBasler User Presets #1328
Changes from 4 commits
40c4caf
6ce08bd
b2a90da
cf3fc9c
81cbeae
0cd8c7f
3344788
20839a4
e2b19f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 | ||
--------------- | ||
- Adds long_names to signals in LasBasler detector class | ||
- Adds UserPresetSelector and UserPresetDefaultSe signals to the class | ||
|
||
New Devices | ||
----------- | ||
- N/A | ||
|
||
Bugfixes | ||
-------- | ||
- N/A | ||
|
||
Maintenance | ||
----------- | ||
- N/A | ||
|
||
Contributors | ||
------------ | ||
- aberges-SLAC |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -502,6 +502,64 @@ def _auto_configure(self): | |
def _auto_configure(self, value): | ||
self.configure(self._conf_d) | ||
|
||
# Handle UserPresets configuration | ||
default_preset = Cpt(EpicsSignal, 'UserSetDefaultSe_RBV', write_pv='UserSetDefaultSe', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did they really leave off the 't' in 'Set', or is this a typo? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The property name is actually |
||
kind='config', | ||
doc='Default Preset to use on startup. See UserSetSelector' | ||
' for more options') | ||
user_preset = Cpt(EpicsSignal, 'UserSetSelector_RBV', write_pv='UserSetSelector', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dumb question: if these are called "User Sets", why are we calling them presets here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mainly because I hear folks call them "presets" vs. "user sets". I think the official vendor documentation calls them "User Sets". I felt that something like |
||
kind='config', | ||
doc='Current User Preset to save/load') | ||
save_preset = Cpt(EpicsSignal, 'UserSetSave.PROC', kind='config', | ||
doc='Save current settings into selected user preset') | ||
set_metadata(save_preset, dict(variety='command-proc', value=1)) | ||
load_preset = Cpt(EpicsSignal, 'UserSetLoad.PROC', kind='config', | ||
doc='Load current settings into selected user preset') | ||
set_metadata(load_preset, dict(variety='command-proc', value=1)) | ||
|
||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
# Add some long_names | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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_preset.long_name = 'Default Preset' | ||
self.user_preset.long_name = 'Current Preset' | ||
self.save_preset.long_name = 'Save Preset' | ||
self.load_preset.long_name = 'Load Preset' | ||
|
||
|
||
class LasBaslerNF(LasBasler): | ||
""" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: these should be prefaced with the name of the device(s) that was modified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I did?
LasBasler
is the device class that is edited, the otherBaslerNF
andBaslerFF
classes subclass it.