Spectrometer: Difference between revisions

From SweepMe! Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
Spectrometer is a [[Modules|Module]] to interface spectrometer devices. It allows for loading corresponding [[Device Classes]].
Spectrometer is a [[Modules|Module]] to interface spectrometer devices. It allows for loading corresponding [[Device Class|Device Classes]].




=== Features ===
=== Features ===


* calculates the total intensity by summing over all values of the intensities using numpy function trapz:  
 
 
* The module calculates the total intensity by summing over all values of the intensities using numpy function trapz:  
{{syntaxhighlight|lang=python|code=


total_intensity = np.trapz(y = self.spectrum, x = self.wavelengths)  
total_intensity = np.trapz(y = self.spectrum, x = self.wavelengths)  


* CIE coordinates are calculated based on the CIE standard from 1931 [https://en.wikipedia.org/wiki/CIE_1931_color_space]
}}
 
* The peak wavelength of highest intensity is calculated.
 
* CIE coordinates are calculated based on the CIE standard from 1931 [https://en.wikipedia.org/wiki/CIE_1931_color_space] in case the measured spectrum covers the wavelength range from 360 nm to 830 nm.
 
* Boxcar smoothing can be used to reduce the noise of a spectrum which is done prior calculating total intensity, the peak wavelength, and the CIE coordinates.
 
* 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.
 
 
 
=== Device Classes specifics ===


* Take reference spectrum
* Device Class must return wavelengths and spectrum during [[call]] as first and second value


=== Device Classes ===
* Device Class needs a function read_Wavelengths() which returns a list of wavelengths

Revision as of 22:25, 6 May 2018

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 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.
  • Boxcar smoothing can be used to reduce the noise of a spectrum which is done prior calculating total intensity, the peak wavelength, and the CIE coordinates.
  • 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.


Device Classes specifics

  • Device Class must return wavelengths and spectrum during call as first and second value
  • Device Class needs a function read_Wavelengths() which returns a list of wavelengths