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

Main application controller class for ENLIGHTEN. More...

Public Member Functions

 __init__ (self, app, log_queue, log_level="INFO", max_memory_growth=0, max_thumbnails=500, run_sec=0, serial_number=None, stylesheet_path=None, set_all_dfu=False, form=None, splash=None, window_state=None, start_batch=False, plugin=None, password=None)
 All of the parameters are normally set via command-line arguments in Enlighten.py.
 
AcquiredReading acquire_reading (self, Spectrometer spec)
 Poll the spectrometer thread (WasatchDeviceWrapper) for a SpectrometerResponse.
 
 app_state (self)
 
None attempt_reading (self, spec)
 Attempt to acquire a reading from the thread response queue, process and render data in the GUI.
 
 bind_gui_signals (self)
 
 bind_shortcuts (self)
 Set up application-wide shortcut keys (called AFTER business object creation).
 
 check_ready_initialize (self)
 Check if an identified spectrometer succeeded in returning settings With this complete, initialize and start operating the spec.
 
 clear_response_errors (self, spec)
 Reset the cached errors for a connected spec.
 
 close (self, event_arg_str)
 
 configure_control_palette (self)
 This is an experiment to see if we can easily add "collapse/expand" button to each widget in the Control Palette.
 
 connect_new (self, other_device_id=None)
 If there are any visible spectrometers that ENLIGHTEN has not yet connected to, try to connect to them.
 
 create_signals (self)
 Add Qt signal handlers to the Controller instance.
 
 current_spectrometer (self)
 
 disconnect_device (self, spec=None, closing=False)
 
 disconnect_features (self)
 tell any features supporting disconnect events that we have disconnected the current spectrometer
 
bool display_response_error (self, Spectrometer spec, str response_error)
 
 generate_x_axis (self, spec=None, settings=None, unit=None, cropped=True)
 Graph.current_x_axis is not per-spectrometer, therefore:
 
 get_last_processed_reading (self)
 
 graph_alternating_pixels_callback (self)
 
 header (self, s)
 can't be in LoggingFeature unless log was a parameter...
 
 initialize_new_device (self, device)
 This method is called in two very different circumstances:
 
 open_log (self)
 
 perform_fpga_reset (self, spec=None)
 
 populate_thumbnail_column (self)
 Create the required widget and layout configuration for adding newly saved entries from the scope capture interface.
 
 process_hardware_strip (self)
 
 process_hardware_strip_reading (self, spec, reading)
 
 process_reading (self, reading, spec=None, dark=None, ref=None, settings=None)
 
 process_status_message (self, msg, spec)
 Used to handle StatusMessage objects received from spectrometer threads (as opposed to the Readings we normally receive).
 
 refresh_scope_graphs (self)
 
 reprocess (self, measurement)
 Called by Measurements.create_from_file if save_options.load_raw.
 
 save_current_spectra (self, label=None)
 This is a GUI method (used as a callback) to generate one Measurement from the most-recent ProcessedReading of EACH connected spectrometer.
 
 set_curve_data (self, curve, y, x=None, label=None)
 Lightweight wrapper over pyqtgraph.PlotCurveItem.setData.
 
 set_from_ini_file (self)
 Load per-spectrometer settings keyed on serial_number (not general ENLIGHTEN settings like sound).
 
 setup_bus_listener (self)
 Poll the USB bus periodically for new connection events (including devices connected at application launch).
 
 setup_hardware_strip_listener (self)
 
 setup_main_event_loops (self)
 Create and start the timer to tick our event loop.
 
 swap_alternating_pixels_callback (self)
 Doesn't seem any point in tracking state on this?
 
 tick_acquisition (self)
 This polls every spectrometer's worker thread at 10Hz (or less) to receive the latest Reading from their Queue.
 
 tick_bus_listener (self)
 If a device is listed on the bus, and it is not currently connected, attempt to make a connection.
 
 tick_status (self)
 
 update_checkBox (self, sn, widget, name)
 
 update_doubleSpinBox (self, sn, widget, name)
 
 update_feature_visibility (self)
 Something has occurred which prompts us to update any Business Object whose visibility / exposed features depends on global application state (including whether we're in Expert mode or not).
 
 update_gain_and_offset (self, force=False)
 
 update_hardware_window (self)
 
 update_lineEdit (self, sn, widget, name)
 We're reading (not loading, but getting values from) a newly-connected spectrometer's portion of the .ini file so that local user configuration can override the EEPROM etc.
 
 update_scope_graphs (self, reading=None)
 
 update_spinBox (self, sn, widget, name)
 
 update_wavecal (self, coeffs=None)
 This gets called if the user has edited the EEPROM fields (coeff or excitation).
 

Public Attributes

 accessory_control = True) if hotplug else feature.display()
 Business Objects.
 
 acquisition_timer
 
 ambient_temperature
 
 app = app
 
 area_scan
 Business Objects.
 
 auto_raman
 Business Objects.
 
 baseline_correction
 
 batch_collection = True
 
 boxcar
 Business Objects.
 
 bus = WasatchBus()
 
 bus_timer
 
 business_objects = BusinessObjects(self)
 
 close
 
 control_exit_signal = ControlClose()
 creating control_exit_signal as a QObject with an "exit" signal
 
 dark_feature = False
 Business Objects.
 
 detector_temperature
 
bool dialog_open = False
 
 edc
 Business Objects.
 
int exit_code = 0
 confirm we have no runaway resources
 
 external_trigger
 Business Objects.
 
 form = form
 
 gain_db_feature
 Business Objects.
 
 graph
 Business Objects.
 
 graph_alternating_pixels_callback
 move to StripChartFeature
 
 hard_strip_timer = QtCore.QTimer()
 
bool has_connected = False
 Business Objects.
 
 high_gain_mode
 Business Objects.
 
 horiz_roi
 
 integration_time_feature = 2000)
 backup eeprom
 
 kia_feature
 
 laser_control
 Business Objects.
 
 laser_temperature
 Business Objects.
 
 laser_watchdog
 Business Objects.
 
 log_level = log_level
 
 log_queue = log_queue
 
 logging_feature
 
 max_memory_growth = max_memory_growth
 
 max_thumbnails = max_thumbnails
 
 other_device_ids = set()
 Populate Placeholders.
 
 password = password
 
 perform_fpga_reset
 
 pixel_calibration
 
 plugin = plugin
 Business Objects.
 
 plugin_controller
 Business Objects.
 
 process_hardware_strip
 
 raman_intensity_correction
 Business Objects.
 
 raman_shift_correction
 Business Objects.
 
 reference_feature
 Business Objects.
 
 richardson_lucy
 Business Objects.
 
 run_sec = run_sec
 
 seen_errors = defaultdict(lambda: defaultdict(int))
 Create startup Business Objects.
 
 serial_number_desired = serial_number
 
 set_all_dfu = set_all_dfu
 
dict shortcuts = {}
 
bool shutting_down = False
 Lifecycle.
 
int spec_timeout = 30
 
 splash = splash
 
bool start_batch = start_batch
 Business Objects.
 
 start_time = datetime.datetime.now()
 
 status_indicators
 Business Objects.
 
 status_timer
 
 stylesheet_path = stylesheet_path
 
 swap_alternating_pixels_callback
 move to StripChartFeature
 
 thumbnail_render_curve
 
 thumbnail_render_graph = pyqtgraph.PlotWidget(name="Measurement Thumbnail Renderer")
 
 tick_acquisition = QtCore.QTimer()
 
 tick_bus_listener = QtCore.QTimer()
 
 tick_status = QtCore.QTimer()
 
 update_hardware_window
 move to StripChartFeature
 
 vcr_controls
 Business Objects.
 
str window_state = window_state
 

Static Public Attributes

int ACQUISITION_TIMER_SLEEP_MS = 100
 
int BUS_TIMER_SLEEP_MS = 1000
 attempt connection to the first untried (not connected, not in-process) device on the list
 
int MAX_MISSED_READINGS = 2
 
int SPEC_ERROR_MAX_RETRY = 3
 
int SPEC_RESET_MAX_RETRY = 3
 
int STATUS_TIMER_SLEEP_MS = 250
 Tick laser status.
 
bool USE_ERROR_DIALOG = False
 

Detailed Description

Main application controller class for ENLIGHTEN.

This class is still way bigger than it should be, but it's gradually coming under control.

  • most feature logic has been extracted into "business objects" which own and configure their own GUI widgets and internal state

Constructor & Destructor Documentation

◆ __init__()

enlighten.Controller.Controller.__init__ ( self,
app,
log_queue,
log_level = "INFO",
max_memory_growth = 0,
max_thumbnails = 500,
run_sec = 0,
serial_number = None,
stylesheet_path = None,
set_all_dfu = False,
form = None,
splash = None,
window_state = None,
start_batch = False,
plugin = None,
password = None )

All of the parameters are normally set via command-line arguments in Enlighten.py.

Member Function Documentation

◆ acquire_reading()

AcquiredReading enlighten.Controller.Controller.acquire_reading ( self,
Spectrometer spec )

Poll the spectrometer thread (WasatchDeviceWrapper) for a SpectrometerResponse.

See also
wasatch.WasatchDeviceWrapper.acquire_data
wasatch.WasatchDevice.acquire_data
Todo
eventually move to AcquisitionFeature
Returns
one of three things:
  1. AcquiredReading(reading=Reading) with an actual Reading (could still contain an error etc), or
  2. AcquiredReading(disconnect=True) if it all went sidewides, or
  3. None if it's neither good nor bad and no action should be taken (keepalive etc)

◆ app_state()

enlighten.Controller.Controller.app_state ( self)

◆ attempt_reading()

None enlighten.Controller.Controller.attempt_reading ( self,
spec )

Attempt to acquire a reading from the thread response queue, process and render data in the GUI.

◆ bind_gui_signals()

enlighten.Controller.Controller.bind_gui_signals ( self)

◆ bind_shortcuts()

enlighten.Controller.Controller.bind_shortcuts ( self)

Set up application-wide shortcut keys (called AFTER business object creation).

Normally the assignment of widget callbacks are encapsulated within associated Business Objects (e.g. Ctrl-D within DarkFeature). However, it seems helpful to have all of these consolidated in one place to ensure uniqueness.

Note the "Help" for this feature is currently in ui.HelpFeature.

◆ check_ready_initialize()

enlighten.Controller.Controller.check_ready_initialize ( self)

Check if an identified spectrometer succeeded in returning settings With this complete, initialize and start operating the spec.

◆ clear_response_errors()

enlighten.Controller.Controller.clear_response_errors ( self,
spec )

Reset the cached errors for a connected spec.

Right now this is only called by eeprom editor after writing a new eeprom.

◆ close()

enlighten.Controller.Controller.close ( self,
event_arg_str )

◆ configure_control_palette()

enlighten.Controller.Controller.configure_control_palette ( self)

This is an experiment to see if we can easily add "collapse/expand" button to each widget in the Control Palette.

If it worked, we'd move it to a ui.ControlPalette class.

<widget class="QScrollArea" name="controlWidget_scrollArea"> <widget class="QWidget" name="controlWidget_inner"> <layout class="QVBoxLayout" name="controlWidget_inner_vbox"> /* iterate this */
<widget class="QFrame" name="frame_FactoryMode_Options"> /* finding these */ <layout class="QVBoxLayout" name="verticalLayout_24"> <widget class="QLabel" name="label_hardware_capture_control"> /* place button to right of these */ <property name="text"> <string>Hardware Capture Control</string>
</property>

◆ connect_new()

enlighten.Controller.Controller.connect_new ( self,
other_device_id = None )

If there are any visible spectrometers that ENLIGHTEN has not yet connected to, try to connect to them.

Only connect one device per pass; let bus_listener kick-off and call connect_new() again if more remain.

Note that this method gets called whether there are any spectrometers on the bus or not, and whether any or all of them have already connected or not.

Parameters
other_device_idcan point to a BLEDevice from BLEManager, TCPDevice from Network.WISP plugin, etc

◆ create_signals()

enlighten.Controller.Controller.create_signals ( self)

Add Qt signal handlers to the Controller instance.

◆ current_spectrometer()

enlighten.Controller.Controller.current_spectrometer ( self)
Todo
DEPRECATE

◆ disconnect_device()

enlighten.Controller.Controller.disconnect_device ( self,
spec = None,
closing = False )

◆ disconnect_features()

enlighten.Controller.Controller.disconnect_features ( self)

tell any features supporting disconnect events that we have disconnected the current spectrometer

◆ display_response_error()

bool enlighten.Controller.Controller.display_response_error ( self,
Spectrometer spec,
str response_error )
Returns
True if:
  1. the device can stay connected (includes log views), or
  2. there's already a dialog open, or
  3. we've already prompted the user about this error on this spectrometer. False if:
  1. the user said to disconnect
  2. ENLIGHTEN was not configured to use the error dialogs

◆ generate_x_axis()

enlighten.Controller.Controller.generate_x_axis ( self,
spec = None,
settings = None,
unit = None,
cropped = True )

Graph.current_x_axis is not per-spectrometer, therefore:

  • pixels: overlapped and left-justified
  • wavelengths: partially overlapped / non-congruent (cool)
  • wavenumbers: mostly-overlapped, jagged left-edge

    Todo
    move this to Spectrometer? Graph?

If you pass in a specific spectrometer, it uses the settings (wavecal & excitation) from THAT spectrometer. Otherwise, if you pass in a specific SpectrometerSettings object (say from a saved/loaded Measurement), it uses that. Otherwise it uses the current spectrometer.

This function ONLY crops the x-axis if specifically asked to (and able to).

Todo
need to update for DetectorRegions

◆ get_last_processed_reading()

enlighten.Controller.Controller.get_last_processed_reading ( self)

◆ graph_alternating_pixels_callback()

enlighten.Controller.Controller.graph_alternating_pixels_callback ( self)

◆ header()

enlighten.Controller.Controller.header ( self,
s )

can't be in LoggingFeature unless log was a parameter...

◆ initialize_new_device()

enlighten.Controller.Controller.initialize_new_device ( self,
device )

This method is called in two very different circumstances:

  • by Controller.connect_new(), when we connect to a new spectrometer
    • this is considered a "hotplug" event
    • this includes when a previously dropped/disconnected spectrometer reattaches / re-enumerates
  • by Multispec, when the user manually changes the "currently selected spectrometer" select-box on the GUI (frequent)

The method itself determines the calling case by inferring a "hotplug" variable from whether the passed device was already connected or not.

Probably we should split this function into two:

  • move 'hotplug' logic to initialize_newly_connected_device()
  • leave rest in initialize_gui_from_current_device()
  • have hotplug function call initialize_gui() at end

◆ open_log()

enlighten.Controller.Controller.open_log ( self)

◆ perform_fpga_reset()

enlighten.Controller.Controller.perform_fpga_reset ( self,
spec = None )

◆ populate_thumbnail_column()

enlighten.Controller.Controller.populate_thumbnail_column ( self)

Create the required widget and layout configuration for adding newly saved entries from the scope capture interface.

This generates a HIDDEN graph (it'll be "underneath" the displayed stackedWidget of saved spectra), which is nonetheless actively used when generating thumbnails of new traces.

This could probably be moved into MeasurementFactory, the sole user of these widgets.

◆ process_hardware_strip()

enlighten.Controller.Controller.process_hardware_strip ( self)
Todo
move to StripChartFeature

So, it's worth noting that the data we collect for the Factory view seems to be coming from here, which only updates from the "latest" reading at 1Hz, regardless of integration time or incoming data rate.

We could probably be more event-driven and "timely" than this, but on the other hand these metrics probably don't need to be updated at especially high frequencies...this seems okay for now.

◆ process_hardware_strip_reading()

enlighten.Controller.Controller.process_hardware_strip_reading ( self,
spec,
reading )

◆ process_reading()

enlighten.Controller.Controller.process_reading ( self,
reading,
spec = None,
dark = None,
ref = None,
settings = None )
Todo
split into "update graphs" and "post-processing"

Requested order of operations, per Michael Matthews:

  • Remove excess data points (vertical or horizontal areas of interest)
  • Scan Averaging
    • snap usable dark
  • Subtract Dark
  • Correction for detector non-linearity* (when enabled)
  • Correct for stray light* (when enabled)
  • Correct for intensity* (when enabled, per your suggested OoO)
  • Apply Boxcar Smoothing
  • Baseline removal / fluorescence removal, etc
  • Laser X-Axis shift
  • X-Axis Interpolation (when enabled)
  • Requires Dark Corrected Spectra
Reprocessing loaded spectra

If no Spectrometer is passed in, use the current one. Therefore, reprocessed spectra will use the SpectrometerState and SpectrometerApplicationState associated with the current Spectrometer. However, we do try to re-use the SpectrometerSettings instantiated when we reloaded the measurement.

Of particular note are dark and reference, which can be manually passed-in for reprocessed measurements if found in input file. Likewise, we pass in the loaded Settings object so that the x-axis can be generated from the correct wavecal, pixel count, as well as the correct cropped ROI.

Keywords to help people find this function:

  • update graphs
  • perform processing
  • post-process
  • apply business logic

◆ process_status_message()

enlighten.Controller.Controller.process_status_message ( self,
msg,
spec )

Used to handle StatusMessage objects received from spectrometer threads (as opposed to the Readings we normally receive).

These are not common in the current architecture. These were used initially to provide progress updates to the GUI when loading long series of I2C overrides to the IMX before firmware encapsulated sensor control.

Parameters
msg- presumably a StatusMessage from a spectrometer process

◆ refresh_scope_graphs()

enlighten.Controller.Controller.refresh_scope_graphs ( self)

◆ reprocess()

enlighten.Controller.Controller.reprocess ( self,
measurement )

Called by Measurements.create_from_file if save_options.load_raw.

This takes the loaded raw, dark and reference, and re-feeds them back through process_reading, along with the loaded Settings object containing wavecal, pixel count etc. This will display the re-processed spectrum on screen, then return the new ProcessedReading object. We pass that back to the caller, who will update the new ProcessedReading into the originally loaded Measurement, update the measurement_id / timestamps, generate the thumbnail and re-save.

Parameters
measurement(Input) Measurement
Returns
new ProcessedReading

◆ save_current_spectra()

enlighten.Controller.Controller.save_current_spectra ( self,
label = None )

This is a GUI method (used as a callback) to generate one Measurement from the most-recent ProcessedReading of EACH connected spectrometer.

Originally there was no thought of Measurements "knowing" what view was in use when they were created. However, we (currently) only want the ID button to show up on Raman measurements, so...let's see where this goes.

◆ set_curve_data()

enlighten.Controller.Controller.set_curve_data ( self,
curve,
y,
x = None,
label = None )

Lightweight wrapper over pyqtgraph.PlotCurveItem.setData.

Checks for case where x[0] is higher than x[1] (happens with a default wavecal of [0, 1, 0, 0] and positive excitation in wavenumber space). Also traps for unequal array lengths, etc.

Todo
merge into Graph.set_data (calling it is a start)
Returns
True if graph was updated

◆ set_from_ini_file()

enlighten.Controller.Controller.set_from_ini_file ( self)

Load per-spectrometer settings keyed on serial_number (not general ENLIGHTEN settings like sound).


called from initialize_new_device

◆ setup_bus_listener()

enlighten.Controller.Controller.setup_bus_listener ( self)

Poll the USB bus periodically for new connection events (including devices connected at application launch).

◆ setup_hardware_strip_listener()

enlighten.Controller.Controller.setup_hardware_strip_listener ( self)
Todo
move to StripChartFeature

◆ setup_main_event_loops()

enlighten.Controller.Controller.setup_main_event_loops ( self)

Create and start the timer to tick our event loop.

◆ swap_alternating_pixels_callback()

enlighten.Controller.Controller.swap_alternating_pixels_callback ( self)

Doesn't seem any point in tracking state on this?

◆ tick_acquisition()

enlighten.Controller.Controller.tick_acquisition ( self)

This polls every spectrometer's worker thread at 10Hz (or less) to receive the latest Reading from their Queue.

To be clear, that means that ENLIGHTEN cannot read more than 10 spectra per second from a spectrometer, even though Wasatch spectrometers have "scan rates" many times that.

This is because ENLIGHTEN was designed as a real-time data VIEWING program, not a real-time DATA ANALYSIS or COLLECTION program. For data analysis, in which you are generating statistics on every spectra generated by the spectrometer, you would need to run at a faster rate.
In this case, all we're trying to do is graph "the latest" spectrum from the spectrometer, and for that 10Hz seems fine.

Note that when multiple spectrometers are connected, we actually poll a little slower.

Also note that we're still not really polling at 10Hz...we're starting each new polling cycle 100ms after the last one finished, and it's possible that some cycles (especially if using blocking plugins) may take many milliseconds to complete.

◆ tick_bus_listener()

enlighten.Controller.Controller.tick_bus_listener ( self)

If a device is listed on the bus, and it is not currently connected, attempt to make a connection.

◆ tick_status()

enlighten.Controller.Controller.tick_status ( self)

◆ update_checkBox()

enlighten.Controller.Controller.update_checkBox ( self,
sn,
widget,
name )

◆ update_doubleSpinBox()

enlighten.Controller.Controller.update_doubleSpinBox ( self,
sn,
widget,
name )

◆ update_feature_visibility()

enlighten.Controller.Controller.update_feature_visibility ( self)

Something has occurred which prompts us to update any Business Object whose visibility / exposed features depends on global application state (including whether we're in Expert mode or not).

This is called by PageNavigation.set_view_common, for instance when changing Operation Mode (Ranam, Non-Raman, Expert) or View (Scope, Settings, Hardware, Logging, Factory) or Technique (Raman, Emission, Absorbance, Transmission/Reflectance), etc.

This is also called when connecting / disconnecting spectrometers.

It also helps to "re-hide" pyqtgraph curves which had been previously hidden, but then erroneously re-show themselves when a curve is removed from the chart. (I'm assuming that pyqtgraph bug hasn't been fixed?)

IMHO we should give self.bus_obj an iterable list of all business objects, all of which should extend EnlightenBusinessObject or whatever, with overridable methods update_visibility, post_init (to be fired after all Business Objects are instantiated), etc.

◆ update_gain_and_offset()

enlighten.Controller.Controller.update_gain_and_offset ( self,
force = False )
Parameters
forceThere was a time when production FID spectrometers were not being assigned gain and offset values in their EEPROMs. Therefore EEPROM values were considered suspicious (offset in particular was unreliable). So we don't want to just push possibly-invalid EEPROM defaults downstream. However, we do want to allow explicit changes via the EEPROMEditor and .ini files to be pushed down. So the EEPROMEditor sends the "force" parameter.

◆ update_hardware_window()

enlighten.Controller.Controller.update_hardware_window ( self)

◆ update_lineEdit()

enlighten.Controller.Controller.update_lineEdit ( self,
sn,
widget,
name )

We're reading (not loading, but getting values from) a newly-connected spectrometer's portion of the .ini file so that local user configuration can override the EEPROM etc.

As we read in values, we update the associated widget on the EEPROMEditor.

Normally, calling setText() on a QLineEdit would trigger a textChanged event, such that follow-through actions would automatically follow (like updating the associated EEPROM field, recalculating the wavecal, etc).

However, we have deliberately DISABLED the textChanged event on lineEdit widgets in the EEPROMEditor, because they have a nasty habit of responding to EVERY KEYPRESS when editing coefficients (creating bizarre behavior and errors on typos).

Therefore, for now, we hacked EEPROMEditor.bind_lineEdit such that it stores a reference to each lineEdit widget's EEPROMEditor callback function in the widget itself, in an attribute called enlighten_trigger.

We can assume that the EEPROMEditor itself was instantiated and bound at application startup time, long before any spectrometer connected and caused us to parse its .ini settings, so we can safely assume that this trigger callback is available to this function.

So in conclusion, after an outside agency (like this .ini function) reaches into the EEPROMEditor and changes the values of lineEdit widgets owned by it, we then call that widget's enlighten_trigger() callback to tell the EEPROMEditor to "do whatever you would normally do after a user manually edited that field and pressed return."

◆ update_scope_graphs()

enlighten.Controller.Controller.update_scope_graphs ( self,
reading = None )

◆ update_spinBox()

enlighten.Controller.Controller.update_spinBox ( self,
sn,
widget,
name )

◆ update_wavecal()

enlighten.Controller.Controller.update_wavecal ( self,
coeffs = None )

This gets called if the user has edited the EEPROM fields (coeff or excitation).

Basically, update the Settings object if new versions were passed; then recompute wavelengths and wavenumbers no matter what, and sync excitations.

Member Data Documentation

◆ accessory_control

enlighten.Controller.Controller.accessory_control = True) if hotplug else feature.display()

Business Objects.

◆ acquisition_timer

enlighten.Controller.Controller.acquisition_timer

◆ ACQUISITION_TIMER_SLEEP_MS

int enlighten.Controller.Controller.ACQUISITION_TIMER_SLEEP_MS = 100
static

◆ ambient_temperature

enlighten.Controller.Controller.ambient_temperature

◆ app

enlighten.Controller.Controller.app = app

◆ area_scan

enlighten.Controller.Controller.area_scan

Business Objects.

◆ auto_raman

enlighten.Controller.Controller.auto_raman

Business Objects.

◆ baseline_correction

enlighten.Controller.Controller.baseline_correction

◆ batch_collection

enlighten.Controller.Controller.batch_collection = True

◆ boxcar

enlighten.Controller.Controller.boxcar

Business Objects.

◆ bus

enlighten.Controller.Controller.bus = WasatchBus()

◆ bus_timer

enlighten.Controller.Controller.bus_timer

◆ BUS_TIMER_SLEEP_MS

enlighten.Controller.Controller.BUS_TIMER_SLEEP_MS = 1000
static

attempt connection to the first untried (not connected, not in-process) device on the list

◆ business_objects

enlighten.Controller.Controller.business_objects = BusinessObjects(self)

◆ close

enlighten.Controller.Controller.close

◆ control_exit_signal

enlighten.Controller.Controller.control_exit_signal = ControlClose()

creating control_exit_signal as a QObject with an "exit" signal

◆ dark_feature

enlighten.Controller.Controller.dark_feature = False

Business Objects.

◆ detector_temperature

enlighten.Controller.Controller.detector_temperature

◆ dialog_open

bool enlighten.Controller.Controller.dialog_open = False

◆ edc

enlighten.Controller.Controller.edc

Business Objects.

◆ exit_code

enlighten.Controller.Controller.exit_code = 0

confirm we have no runaway resources

◆ external_trigger

enlighten.Controller.Controller.external_trigger

Business Objects.

◆ form

enlighten.Controller.Controller.form = form

◆ gain_db_feature

enlighten.Controller.Controller.gain_db_feature

Business Objects.

◆ graph

enlighten.Controller.Controller.graph

Business Objects.

◆ graph_alternating_pixels_callback

enlighten.Controller.Controller.graph_alternating_pixels_callback

move to StripChartFeature

◆ hard_strip_timer

enlighten.Controller.Controller.hard_strip_timer = QtCore.QTimer()

◆ has_connected

bool enlighten.Controller.Controller.has_connected = False

Business Objects.

Change to Raman if first connected device is Raman

◆ high_gain_mode

enlighten.Controller.Controller.high_gain_mode

Business Objects.

◆ horiz_roi

enlighten.Controller.Controller.horiz_roi

◆ integration_time_feature

enlighten.Controller.Controller.integration_time_feature = 2000)

backup eeprom

display firmware

update EEPROM Editor

update integration time & gain

◆ kia_feature

enlighten.Controller.Controller.kia_feature

◆ laser_control

enlighten.Controller.Controller.laser_control

Business Objects.

◆ laser_temperature

enlighten.Controller.Controller.laser_temperature

Business Objects.

◆ laser_watchdog

enlighten.Controller.Controller.laser_watchdog

Business Objects.

◆ log_level

enlighten.Controller.Controller.log_level = log_level

◆ log_queue

enlighten.Controller.Controller.log_queue = log_queue

◆ logging_feature

enlighten.Controller.Controller.logging_feature

◆ max_memory_growth

enlighten.Controller.Controller.max_memory_growth = max_memory_growth

◆ MAX_MISSED_READINGS

int enlighten.Controller.Controller.MAX_MISSED_READINGS = 2
static

◆ max_thumbnails

enlighten.Controller.Controller.max_thumbnails = max_thumbnails

◆ other_device_ids

enlighten.Controller.Controller.other_device_ids = set()

Populate Placeholders.

Events and Timers

Application Business Objects

◆ password

enlighten.Controller.Controller.password = password

◆ perform_fpga_reset

enlighten.Controller.Controller.perform_fpga_reset

◆ pixel_calibration

enlighten.Controller.Controller.pixel_calibration

◆ plugin

enlighten.Controller.Controller.plugin = plugin

Business Objects.

Change to Raman if first connected device is Raman

Batch Collection should kick-off on the FIRST connected spectrometer

Connect to plugin if requested (first connected spectrometer only)

◆ plugin_controller

enlighten.Controller.Controller.plugin_controller

Business Objects.

◆ process_hardware_strip

enlighten.Controller.Controller.process_hardware_strip

◆ raman_intensity_correction

enlighten.Controller.Controller.raman_intensity_correction

Business Objects.

◆ raman_shift_correction

enlighten.Controller.Controller.raman_shift_correction

Business Objects.

◆ reference_feature

enlighten.Controller.Controller.reference_feature

Business Objects.

◆ richardson_lucy

enlighten.Controller.Controller.richardson_lucy

Business Objects.

◆ run_sec

enlighten.Controller.Controller.run_sec = run_sec

◆ seen_errors

enlighten.Controller.Controller.seen_errors = defaultdict(lambda: defaultdict(int))

Create startup Business Objects.

◆ serial_number_desired

enlighten.Controller.Controller.serial_number_desired = serial_number

◆ set_all_dfu

enlighten.Controller.Controller.set_all_dfu = set_all_dfu

◆ shortcuts

dict enlighten.Controller.Controller.shortcuts = {}

◆ shutting_down

bool enlighten.Controller.Controller.shutting_down = False

Lifecycle.

Tick plug-ins

Tick KIA

◆ SPEC_ERROR_MAX_RETRY

int enlighten.Controller.Controller.SPEC_ERROR_MAX_RETRY = 3
static

◆ SPEC_RESET_MAX_RETRY

int enlighten.Controller.Controller.SPEC_RESET_MAX_RETRY = 3
static

◆ spec_timeout

int enlighten.Controller.Controller.spec_timeout = 30

◆ splash

enlighten.Controller.Controller.splash = splash

◆ start_batch

bool enlighten.Controller.Controller.start_batch = start_batch

Business Objects.

Change to Raman if first connected device is Raman

Batch Collection should kick-off on the FIRST connected spectrometer

◆ start_time

enlighten.Controller.Controller.start_time = datetime.datetime.now()

◆ status_indicators

enlighten.Controller.Controller.status_indicators

Business Objects.

◆ status_timer

enlighten.Controller.Controller.status_timer

◆ STATUS_TIMER_SLEEP_MS

enlighten.Controller.Controller.STATUS_TIMER_SLEEP_MS = 250
static

Tick laser status.

Tick plug-ins

Tick KIA

◆ stylesheet_path

enlighten.Controller.Controller.stylesheet_path = stylesheet_path

◆ swap_alternating_pixels_callback

enlighten.Controller.Controller.swap_alternating_pixels_callback

move to StripChartFeature

◆ thumbnail_render_curve

enlighten.Controller.Controller.thumbnail_render_curve
Initial value:
= self.thumbnail_render_graph.plot(
data,
pen=self.gui.make_pen(widget="thumbnail"),
name="Thumbnail Renderer")

◆ thumbnail_render_graph

enlighten.Controller.Controller.thumbnail_render_graph = pyqtgraph.PlotWidget(name="Measurement Thumbnail Renderer")

◆ tick_acquisition

enlighten.Controller.Controller.tick_acquisition = QtCore.QTimer()

◆ tick_bus_listener

enlighten.Controller.Controller.tick_bus_listener = QtCore.QTimer()

◆ tick_status

enlighten.Controller.Controller.tick_status = QtCore.QTimer()

◆ update_hardware_window

enlighten.Controller.Controller.update_hardware_window

move to StripChartFeature

◆ USE_ERROR_DIALOG

bool enlighten.Controller.Controller.USE_ERROR_DIALOG = False
static

◆ vcr_controls

enlighten.Controller.Controller.vcr_controls

Business Objects.

◆ window_state

str enlighten.Controller.Controller.window_state = window_state

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