|
ENLIGHTEN
Cross-platform desktop GUI for Wasatch Photonics spectrometers
|
Public Member Functions | |
| add_to_library (self) | |
| colorize_button_field (self, field_name, active, tooltip) | |
| It's kind of fascinating that this actually works. | |
| configure_fields (self) | |
| disconnect (self) | |
| Called when ENLIGHTEN is shutting down. | |
| factory_callback (self, measurement, event) | |
| get_configuration (self) | |
| End backwards compatible object-returning wrappers #####. | |
| get_default_library_dir (self) | |
| get_library_dir_from_ini (self) | |
| process_request (self, request) | |
| select_library_callback (self) | |
| Callback for when user clicks "Select Library" button. | |
| set_library_dir (self, path) | |
| soft_install_matching_library (self) | |
| If ~/EnlightenSpectra/MatchingLibrary does not exist, populate it from the distribution plugins/Raman/MatchingLibrary. | |
| wrapped (self, s) | |
| Manual word-wrap to prevent column from becoming so wide we can't see or disable buttons. | |
Public Member Functions inherited from EnlightenPlugin.EnlightenPluginBase | |
| __init__ (self, ctl) | |
| connect (self) | |
| Do whatever you have to do to prepare for processing measurements. | |
| field (self, **kwargs) | |
| get_axis (self, processed_reading=None) | |
| get_axis_name (self) | |
| get_axis_short_name (self) | |
| get_configuration_obj (self) | |
| End functional-plugins backend ####. | |
| get_plugin_field (self, name) | |
| get the associated enlighten.Plugins.PluginFieldWidget (which IS a QWidget, mind you) | |
| get_widget_from_name (self, name) | |
| get the associated QLabel, QSpinBox, etc | |
| log (self, *msgs) | |
| Begin functional-plugins backend ###. | |
| output (self, name, value) | |
| plot (self, y, x=None, title=None, color=None) | |
| When plotting on the main scope graph the (co)domain matches that existing graph. | |
| process_request_obj (self, request) | |
| to_graph (self, x) | |
| Undo to_pixel conversion, and set point back to currently selected graph X-Axis. | |
| to_pixel (self, x, domain=None) | |
| domain is an array where the index corresponds to a detector pixel number. | |
| update_visibility (self) | |
| Something has happened which might cause the plugin to wish to refresh its visible state – perhaps a new spectrometer was connected. | |
| wavelength_to_pixel (self, wavelength) | |
| wavenumber_to_pixel (self, wavenumber) | |
Public Attributes | |
| bool | add_next_to_library = False |
| factory_callback | |
| bool | laser_warning_issued = False |
| library_dir = None | |
| dict | metadata_cache = {} |
| pearson = Pearson(self) | |
Public Attributes inherited from EnlightenPlugin.EnlightenPluginBase | |
| auto_enable = None | |
| bool | block_enlighten = False |
| ctl = ctl | |
| error_message = None | |
| bool | has_other_graph = False |
| bool | is_blocking = False |
| bool | lock_enable = False |
| logfile = os.path.join(common.get_default_data_dir(), 'plugin.log') | |
| marquee_message = None | |
| dict | metadata = {} |
| bool | multi_devices = False |
| name = None | |
| dict | outputs = {} |
| dict | overrides = {} |
| bool | process_requests = True |
| dict | series = {} |
| list | signals = [] |
| bool | streaming = True |
| table = None | |
| x_axis_label = None | |
| y_axis_label = None | |
Static Public Attributes | |
| str | SECTION = "Plugin.Matching.LibraryMatching" |
Additional Inherited Members | |
Protected Attributes inherited from EnlightenPlugin.EnlightenPluginBase | |
| _config = None | |
| list | _fields = [] |
| LibraryMatching.LibraryMatching.add_to_library | ( | self | ) |
| LibraryMatching.LibraryMatching.colorize_button_field | ( | self, | |
| field_name, | |||
| active, | |||
| tooltip ) |
It's kind of fascinating that this actually works.
Note that get_plugin_field returns a PluginFieldWidget, NOT the actual QPushButton. However, PluginFieldWidget extends QWidget, which has a layout, and that layout contains (in this case) a QPushButton. Applying the tooltip and CSS to the parent widget apparently updates the subordinate widget through the 'parent' relationship.
| LibraryMatching.LibraryMatching.configure_fields | ( | self | ) |
| LibraryMatching.LibraryMatching.disconnect | ( | self | ) |
Called when ENLIGHTEN is shutting down.
Release any resources you have. The next time you're needed, there will be a new call to connect().
Reimplemented from EnlightenPlugin.EnlightenPluginBase.
| LibraryMatching.LibraryMatching.factory_callback | ( | self, | |
| measurement, | |||
| event ) |
| LibraryMatching.LibraryMatching.get_configuration | ( | self | ) |
End backwards compatible object-returning wrappers #####.
Can be called BEFORE or AFTER connect. Should be idempotent. Ideally should return same object on multiple calls, but at least should be "equivalent" objects.
Reimplemented from EnlightenPlugin.EnlightenPluginBase.
| LibraryMatching.LibraryMatching.get_default_library_dir | ( | self | ) |
| LibraryMatching.LibraryMatching.get_library_dir_from_ini | ( | self | ) |
| LibraryMatching.LibraryMatching.process_request | ( | self, | |
| request ) |
Reimplemented from EnlightenPlugin.EnlightenPluginBase.
| LibraryMatching.LibraryMatching.select_library_callback | ( | self | ) |
Callback for when user clicks "Select Library" button.
Since this is triggered by a GUI button click, it occurs on a GUI thread and therefore can create and call widgets.
| LibraryMatching.LibraryMatching.set_library_dir | ( | self, | |
| path ) |
| LibraryMatching.LibraryMatching.soft_install_matching_library | ( | self | ) |
If ~/EnlightenSpectra/MatchingLibrary does not exist, populate it from the distribution plugins/Raman/MatchingLibrary.
If it already exists, leave it alone.
| LibraryMatching.LibraryMatching.wrapped | ( | self, | |
| s ) |
Manual word-wrap to prevent column from becoming so wide we can't see or disable buttons.
Make this more elegant when we have time (try to break at space, comma, semi-colon, hyphen etc within 5-char "window" of maxlen, etc).
| bool LibraryMatching.LibraryMatching.add_next_to_library = False |
| LibraryMatching.LibraryMatching.factory_callback |
| bool LibraryMatching.LibraryMatching.laser_warning_issued = False |
| LibraryMatching.LibraryMatching.library_dir = None |
| dict LibraryMatching.LibraryMatching.metadata_cache = {} |
| LibraryMatching.LibraryMatching.pearson = Pearson(self) |
|
static |