Spectrometer

From SweepMe! Wiki
Revision as of 08:53, 19 September 2024 by Afischer (talk | contribs) (→‎Instrument driver specifics)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Spectrometer is a Module to interface spectrometer devices. It allows for loading corresponding Device Classes.


Features

  • The module calculates the total intensity by summing over all values of the intensities using numpy function trapz:
total_intensity = np.trapz(y = self.spectrum, x = self.wavelengths)
  • The peak wavelength related to the point of highest intensity is calculated.
  • CIE coordinates are calculated based on the CIE standard from 1931 [1] in case the measured spectrum covers the wavelength range from 360 nm to 830 nm.
  • Take reference spectrum reads a spectrum during initialize(), i.e. before all measurements start. The reference spectrum is subtracted from all spectra being measured. The integration time must be constant during the measurement.
  • Automatic integration time: Depending on the Device Class, the integration time is automatically found. However, this feature depends on either the spectrometer or the Device Class. Please check the description of the Device Class whether this feature is supported. A maximum integration must be given. Otherwise, very long integration times might be applied during finding the optimum conditions.


Usage

The Spectrometer module comes with a Sweep section where you can define a Sweep mode and a Sweep value. The default is None as Sweep mode. It means that the instrument is configured with parameters given in the Options section and no variation is done. Some instrument drivers support the variation of parameters such as the integration time. In thin case you can select a Sweep mode like Integration time in s. If you do so, you also need to select a Sweep value which defines the origin for the value variation. The default selection is the Sweep editor that is attached as second tab to the Spectometer module. Here, you can define a variation. The Spectrometer module then sweeps through all values and takes a spectrum for each value.


Instrument driver specifics

  • Instrument drivers must return wavelengths and spectrum during call() as first and second value
  • Instrument drivers need a function read_Wavelengths() which returns a list of wavelengths
  • Most spectrometer cannot be connected by GPIB or COM port, but have to be interfaced via a dll library. In such a case, the Device Class has to provide all ports using the function
def find_Ports(self):
    
    ports = ... # insert your code to generate a list of strings with all possible port names
    
    return ports

GUI related keys

The following keys can be used in device classes to set or retrieve values of the modules GUI fields.

IntegrationTime

Average

Filter

Shutter

Trigger

TriggerDelay

TriggerTimeout

IntegrationTimeAutomatic

IntegrationTimeMax

SaturationMinimum

SaturationMaximum

ReferenceStart

ReferenceFile

ReferenceCustom