trspectrometer.plugins package¶
Plugins¶
The plugins package is a directory tree containing python modules which may be dynamically loaded by the TRSpectrometer application.
The modules are loaded automatically if the module name is included in the load list within the
[plugins] section of the configuration file. For example
[plugins]
# List of plugin modules to load
load = ["aligncam", "acquisition"]
will act similar to an from plugins import aligncam, acquisition statement.
Note that module-level code is executed on import, allowing the module to perform arbitrary actions. This may be used to extend the functionality of the application, such as adding additional menu items or user interface elements. By default, the application does no further actions on the module other than the import.
Hardware Plugins¶
A “hardware plugin” is a normal plugin module, but must also:
Implement a
init()method to connect to and initialise the device(s).Implement a
close()method to disconnect from devices and free any used resources.Implement a
statuspanelproperty to return a QWidget class type (not an instance of the class!) to display device status information in the hardware status panel. This may beNoneif no panel is required.Add a reference to itself to the
hardware.modulesdictionary, for example usinghardware.modules[__name__] = sys.modules[__name__].
Calling of the plugin’s init() and close() methods will be handled automatically,
as will creation and display of the statuspanel if provided.
Subpackages¶
- trspectrometer.plugins.acquisition package
- trspectrometer.plugins.aligncam package
- trspectrometer.plugins.chopper package
- trspectrometer.plugins.delay package
DelayDelay.close()Delay.delay_to_encoder()Delay.encoder_to_delay()Delay.get_acceleration()Delay.get_delay()Delay.get_encoder_count()Delay.get_target()Delay.get_velocity()Delay.home()Delay.increment_delay()Delay.is_initialised()Delay.is_moving()Delay.max_delay()Delay.min_delay()Delay.min_increment()Delay.set_acceleration()Delay.set_delay()Delay.set_velocity()Delay.stop()Delay.descriptionDelay.status
DelayStatusPanelstatuspaneladd_change_callback()close()init()remove_change_callback()devices- Submodules
- trspectrometer.plugins.detector package
DetectorDetector.close()Detector.get_exposure()Detector.get_exposure_limits()Detector.get_grating()Detector.get_gratings()Detector.get_max_value()Detector.get_pixel_wavelengths()Detector.get_triggermode()Detector.get_triggermodes()Detector.get_wavelength()Detector.get_wavelength_limits()Detector.is_initialised()Detector.register_acquisition_callback()Detector.register_spectrum_callback()Detector.set_exposure()Detector.set_grating()Detector.set_triggermode()Detector.set_wavelength()Detector.start()Detector.stop()Detector.unregister_acquisition_callback()Detector.unregister_spectrum_callback()Detector.description
DetectorStatusPanelstatuspaneladd_change_callback()close()init()remove_change_callback()devices- Submodules
- trspectrometer.plugins.interface package
- trspectrometer.plugins.repratemenu package
- trspectrometer.plugins.scope package
- trspectrometer.plugins.zylaalign package