ENLIGHTEN
Cross-platform desktop GUI for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
MultiWaveCal.MultiWaveCal Class Reference

This plugin is provided to demonstrate EEPROM Subformat 5, which allows a multi-wavelength calibration to be stored in the spectrometer for use with dual-wavelength gratings. More...

Inheritance diagram for MultiWaveCal.MultiWaveCal:
[legend]
Collaboration diagram for MultiWaveCal.MultiWaveCal:
[legend]

Public Member Functions

 combo_callback (self)
 
 get_configuration (self)
 End backwards compatible object-returning wrappers #####.
 
 process_request (self, request)
 
- Public Member Functions inherited from EnlightenPlugin.EnlightenPluginBase
 __init__ (self, ctl)
 
 connect (self)
 Do whatever you have to do to prepare for processing measurements.
 
 disconnect (self)
 Called when ENLIGHTEN is shutting down.
 
 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

dict cache = {}
 
- 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
 

Additional Inherited Members

- Protected Attributes inherited from EnlightenPlugin.EnlightenPluginBase
 _config = None
 
list _fields = []
 

Detailed Description

This plugin is provided to demonstrate EEPROM Subformat 5, which allows a multi-wavelength calibration to be stored in the spectrometer for use with dual-wavelength gratings.

The main purpose of this plugin is to provide a pull-down combobox allowing the user to select which calibration (including vertical ROI) to use in the spectrometer. This allows the user to switch back and forth between 785nm and 633nm ROIs, automatically updating the "active" set of dependent calibrations, including:

  • vertical ROI (start/stop lines)
  • horizontal ROI (start/stop pixels)
  • wavelength calibration
  • excitation wavelength (for computing wavenumber axis)
  • Raman Intensity Calibration
  • auto-binning mode

As a visual aid, the plugin also offers an optional second graph which shows both excitations (633nm and 785nm) overlaied.

Since only one calibration can be in effect at one time, the extra graph displays "cached" data for the unselected excitation. This requires the user to build-up the dual-wavelength spectrum by physically switching input fibers (or external laser sources), and toggling the plugin when the second set of calibrations should be used.

It is instructive to view the dual graphs from an emission or Raman source in pixel, wavelength and wavenumber axes, as each will overlap differently.

Note that ENLIGHTEN's "Save" function is unaffected by the second graph, and still only saves the "live" spectrum in the upper graph.

For posterity, these were the key settings on the test unit (WP-00860):

  • 633/638nm
    • vertical ROI (700, 875)
    • wavecal 593.1948 0.1359748 -2.853866e-05 6.422492e-09 -6.287138e-13 coeffs [593.19482421875, 0.13597479462623596, -2.8538659535115585e-05, 6.422491871660441e-09, -6.287138236242551e-13]
  • 785nm
    • vertical ROI (275, 475)
    • wavecal 755.2945 0.1831673 -5.324801e-05 1.981370e-08 -3.651564e-12

Note that only 2 calibrations are currently supported (the "originals" on EEPROM pages 0-6, and a second on page 7), so unique calibrations for 633nm and 638nm are not supported at this time.

Member Function Documentation

◆ combo_callback()

MultiWaveCal.MultiWaveCal.combo_callback ( self)

◆ get_configuration()

MultiWaveCal.MultiWaveCal.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.

Returns
an EnlightenPluginConfiguration

Reimplemented from EnlightenPlugin.EnlightenPluginBase.

◆ process_request()

MultiWaveCal.MultiWaveCal.process_request ( self,
request )

Member Data Documentation

◆ cache

dict MultiWaveCal.MultiWaveCal.cache = {}

The documentation for this class was generated from the following file: