|
Wasatch.NET 2.4.14
.NET application driver for Wasatch Photonics spectrometers
|
This interface is provided for COM clients (Delphi etc) who seem to find it useful. I don't know that .NET users would find much benefit in it. More...
Public Member Functions | |
| void | close () |
| double[] | getSpectrum (bool forceNew) |
| Take a single complete spectrum, including any configured scan averaging, boxcar and dark subtraction. | |
| bool | reconnect () |
| void | regenerateWavelengths () |
| bool | setDFUMode () |
| Put the ARM microcontroller into DFU mode for firmware update. | |
| bool | setLaserPowerPercentage (float perc) |
| Set laser power to the specified percentage. | |
Properties | |
| bool | accessoryEnabled [get, set] |
| Determines whether or not the Gen1.5 accessory connector's features can be used. | |
| ushort | actualFrames [get] |
| How many frames have been read since last power cycle (has overflow) | |
| uint | actualIntegrationTimeUS [get] |
| Return integration time + clock-out time (and laser pulse time if externally triggered). | |
| bool | areaScanEnabled [get, set] |
| Configure detector for 2D image mode. | |
| bool | batteryCharging [get] |
| float | batteryPercentage [get] |
| uint | batteryStateRaw [get] |
| uint | boxcarHalfWidth [get, set] |
| Perform post-acquisition high-frequency smoothing by averaging together "n" pixels to either side of each acquired pixel; zero to disable (default). | |
| bool | continuousAcquisitionEnable [get, set] |
| After the first trigger is received, no further triggers are required; spectrometer will enter free-running mode. | |
| byte | continuousFrames [get, set] |
| When not using "continous acquisitions" with external triggers, how many spectra to acquire per trigger event. | |
| double[] | dark [get, set] |
| Perform automatic dark subtraction by setting this property to an acquired dark spectrum; leave "null" to disable. | |
| float | detectorGain [get, set] |
| Maps to an FPGA register inside the spectrometer used to scale pixels read from the ADC to optimize dynamic range. | |
| float | detectorGainOdd [get, set] |
| (InGaAs-only) Companion property to detectorGain, which on InGaAs detectors applies only to even-numbered pixels. | |
| short | detectorOffset [get, set] |
| Maps to an FPGA register inside the spectrometer used to offset the pixels (dark baseline) read from the ADC to optimize dynamic range. | |
| short | detectorOffsetOdd [get, set] |
| (InGaAs-only) Companion property to detectorOffset, which on InGaAs detectors applies only to even-numbered pixels. | |
| ushort | detectorSensingThreshold [get, set] |
| bool | detectorSensingThresholdEnabled [get, set] |
| bool | detectorTECEnabled [get, set] |
| float | detectorTECSetpointDegC [get, set] |
| ushort | detectorTECSetpointRaw [get, set] |
| double | detectorTemperatureCacheTimeMS [get, set] |
| float | detectorTemperatureDegC [get] |
| ushort | detectorTemperatureRaw [get] |
| EEPROM | eeprom [get] |
| configuration settings stored in the spectrometer's EEPROM | |
| float | excitationWavelengthNM [get, set] |
| FeatureIdentification | featureIdentification [get] |
| metadata inferred from the spectrometer's USB PID | |
| string | firmwareRevision [get] |
| FPGAOptions | fpgaOptions [get] |
| set of compilation options used to compile the FPGA firmware in this spectrometer | |
| string | fpgaRevision [get] |
| bool | hasLaser [get] |
| bool | hasSecondaryADC [get, set] |
| This should be replaced with an FGPACompilationFlag or EEPROM field at some point. | |
| bool | highGainModeEnabled [get, set] |
| uint | integrationTimeMS [get, set] |
| Current integration time in milliseconds. | |
| bool | isARM [get] |
| bool | isGen15 [get] |
| bool | isInGaAs [get] |
| bool | isSiG [get] |
| bool | isSPI [get] |
| bool | lampEnabled [get, set] |
| Whether the lamp attached via Gen 1.5 attachment has been requested to be turned on by the software and firmware. | |
| bool | laserEnabled [get, set] |
| Whether the laser has been REQUESTED TO FIRE by the software and firmware. | |
| bool | laserFiring [get] |
| Whether the laser is ACTUALLY FIRING, according to the laser driver and laser interlock board. | |
| bool | laserInterlockEnabled [get] |
| True if the laser can fire (interlock circuit is CLOSED), false if the laser cannot fire (interlock circuit is OPEN). | |
| UInt64 | laserModulationDuration [get, set] |
| If you only want the laser to be modulated for a portion of each acquisition (rare), how long in microseconds should the laser be modulated during each integration. | |
| bool | laserModulationEnabled [get, set] |
| bool | laserModulationLinkedToIntegrationTime [get, set] |
| UInt64 | laserModulationPeriod [get, set] |
| When defining the laser modulation duty cycle, the length (period) of the duty cycle in microsec. | |
| UInt64 | laserModulationPulseDelay [get, set] |
| If you want the laser modulation to start part-way through an acquisition, this defines the delay in microseconds from the beginning of the integration until laser modulation begins. | |
| UInt64 | laserModulationPulseWidth [get, set] |
| When defining the laser modulation duty cycle, the length (width) of the period during which the laser is enabled. | |
| Spectrometer.LaserPowerResolution | laserPowerResolution [get, set] |
| bool | laserRampingEnabled [get, set] |
| float | laserTemperatureDegC [get] |
| convert the raw laser temperature reading into degrees centigrade | |
| ushort | laserTemperatureRaw [get] |
| Synonym for primaryADC. | |
| byte | laserTemperatureSetpointRaw [get, set] |
| FACTORY ONLY. | |
| uint | lineLength [get] |
| string | model [get] |
| spectrometer model | |
| bool | optActualIntegrationTime [get] |
| bool | optAreaScan [get] |
| Whether area scan mode is supported. | |
| bool | optCFSelect [get] |
| Internal firmware name for the highGainModeEnabled feature available on InGaAs detectors. | |
| FPGA_DATA_HEADER | optDataHeaderTag [get] |
| bool | optHorizontalBinning [get] |
| FPGA_INTEG_TIME_RES | optIntegrationTimeResolution [get] |
| FPGA_LASER_CONTROL | optLaserControl [get] |
| FPGA_LASER_TYPE | optLaserType [get] |
| uint | pixels [get] |
| how many pixels does the spectrometer have (spectrum length) | |
| ushort | primaryADC [get] |
| bool | ramanIntensityCorrectionEnabled [get, set] |
| uint | scanAveraging [get, set] |
| How many acquisitions to average together (zero for no averaging) | |
| ushort | secondaryADC [get] |
| This is provided for spectrometers with a secondary ADC connected to an external laser, photodiode or what-have-you. Attempts to read it on spectrometers where it has not been configured can result in indeterminate behavior; therefore, hasSecondaryADC is provided to allow callers to selectively enable this function if they believe they are using supported hardware. | |
| string | serialNumber [get] |
| spectrometer serial number | |
| uint | triggerDelay [get, set] |
| A configurable delay from when an inbound trigger signal is received by the spectrometer, until the triggered acquisition actually starts. | |
| EXTERNAL_TRIGGER_OUTPUT | triggerOutput [get, set] |
| TRIGGER_SOURCE | triggerSource [get, set] |
| Whether acquisitions are triggered "internally" (via the ACQUIRE opcode sent by software) or "externally" (via an electrical signal wired to the accessory connector). | |
| double[] | wavelengths [get] |
| pre-populated array of wavelengths (nm) by pixel, generated from eeprom.wavecalCoeffs | |
| double[] | wavenumbers [get] |
| pre-populated array of Raman shifts in wavenumber (1/cm) by pixel, generated from wavelengths[] and excitationNM | |
This interface is provided for COM clients (Delphi etc) who seem to find it useful. I don't know that .NET users would find much benefit in it.
| void WasatchNET.ISpectrometer.close | ( | ) |
| double[] WasatchNET.ISpectrometer.getSpectrum | ( | bool | forceNew | ) |
Take a single complete spectrum, including any configured scan averaging, boxcar and dark subtraction.
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.HOCTSpectrometer, WasatchNET.MockSpectrometer, WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
| bool WasatchNET.ISpectrometer.reconnect | ( | ) |
Implemented in WasatchNET.MockSpectrometer, and WasatchNET.Spectrometer.
| void WasatchNET.ISpectrometer.regenerateWavelengths | ( | ) |
Implemented in WasatchNET.Spectrometer.
| bool WasatchNET.ISpectrometer.setDFUMode | ( | ) |
Put the ARM microcontroller into DFU mode for firmware update.
Will not work on FX2. Cannot be "undone" from software (power-cycle the spectrometer to reset out of DFU mode). Not recommended for the faint of heart.
Implemented in WasatchNET.Spectrometer.
| bool WasatchNET.ISpectrometer.setLaserPowerPercentage | ( | float | perc | ) |
Set laser power to the specified percentage.
| perc | value from 0 to 1.0 |
The "fake" buffers being send with the commands relate to a legacy bug in which some firmware mistakenly checked the "payload length" rather than "wValue" for their key parameter. It would be good to document which firmware versions exhibit this behavior, so we do not propogate an inefficient and unnecessary patch to newer models which do not require it.
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.MockSpectrometer, WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
|
getset |
Determines whether or not the Gen1.5 accessory connector's features can be used.
Implemented in WasatchNET.Spectrometer.
|
get |
How many frames have been read since last power cycle (has overflow)
Implemented in WasatchNET.Spectrometer.
|
get |
Return integration time + clock-out time (and laser pulse time if externally triggered).
Implemented in WasatchNET.Spectrometer.
|
getset |
Configure detector for 2D image mode.
Not supported on all spectrometers.
Wasatch spectrometers normally "vertically bins" pixel columns on the detector, outputting the spectrum as a one-dimensional array of intensities by pixel.
For production alignment, an "area scan" imaging mode is provided to output each row on the detector as a separate line, so client software can reconstruct a 2D image of the light patterns spread across the detector. In this mode, the intensity value of the first pixel of each line is overwritten by the row index, to ensure the 2D image is received and displayed correctly.
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.MockSpectrometer, and WasatchNET.Spectrometer.
|
get |
|
get |
|
get |
Implemented in WasatchNET.Spectrometer.
|
getset |
Perform post-acquisition high-frequency smoothing by averaging together "n" pixels to either side of each acquired pixel; zero to disable (default).
Implemented in WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
|
getset |
After the first trigger is received, no further triggers are required; spectrometer will enter free-running mode.
Implemented in WasatchNET.Spectrometer.
|
getset |
When not using "continous acquisitions" with external triggers, how many spectra to acquire per trigger event.
Implemented in WasatchNET.Spectrometer.
|
getset |
Perform automatic dark subtraction by setting this property to an acquired dark spectrum; leave "null" to disable.
Implemented in WasatchNET.Spectrometer.
|
getset |
Maps to an FPGA register inside the spectrometer used to scale pixels read from the ADC to optimize dynamic range.
Not normally changed by customer code. Values are normally read from the EEPROM and written back to the spectrometer's FPGA by the driver at initialization.
Altering this value may degrade spectrometer performance.
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.HOCTSpectrometer, WasatchNET.MockSpectrometer, WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
|
getset |
(InGaAs-only) Companion property to detectorGain, which on InGaAs detectors applies only to even-numbered pixels.
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.HOCTSpectrometer, WasatchNET.MockSpectrometer, WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
|
getset |
Maps to an FPGA register inside the spectrometer used to offset the pixels (dark baseline) read from the ADC to optimize dynamic range.
Not normally changed by customer code. Values are normally read from the EEPROM and written back to the spectrometer's FPGA by the driver at initialization.
Altering this value may degrade spectrometer performance.
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.HOCTSpectrometer, WasatchNET.MockSpectrometer, WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
|
getset |
(InGaAs-only) Companion property to detectorOffset, which on InGaAs detectors applies only to even-numbered pixels.
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.HOCTSpectrometer, WasatchNET.MockSpectrometer, WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
|
getset |
Implemented in WasatchNET.Spectrometer.
|
getset |
Implemented in WasatchNET.Spectrometer.
|
getset |
|
getset |
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
|
getset |
|
getset |
Implemented in WasatchNET.Spectrometer.
|
get |
|
get |
Implemented in WasatchNET.Spectrometer.
|
get |
configuration settings stored in the spectrometer's EEPROM
Implemented in WasatchNET.Spectrometer.
|
getset |
|
get |
metadata inferred from the spectrometer's USB PID
Implemented in WasatchNET.Spectrometer.
|
get |
|
get |
set of compilation options used to compile the FPGA firmware in this spectrometer
Implemented in WasatchNET.Spectrometer.
|
get |
|
get |
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
|
getset |
This should be replaced with an FGPACompilationFlag or EEPROM field at some point.
Implemented in WasatchNET.Spectrometer.
|
getset |
|
getset |
Current integration time in milliseconds.
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.HOCTSpectrometer, WasatchNET.MockSpectrometer, WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
|
get |
|
get |
Implemented in WasatchNET.Spectrometer.
|
get |
|
get |
Implemented in WasatchNET.Spectrometer.
|
get |
Implemented in WasatchNET.Spectrometer.
|
getset |
Whether the lamp attached via Gen 1.5 attachment has been requested to be turned on by the software and firmware.
Implemented in WasatchNET.Spectrometer.
|
getset |
Whether the laser has been REQUESTED TO FIRE by the software and firmware.
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.HOCTSpectrometer, WasatchNET.MockSpectrometer, WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
|
get |
Whether the laser is ACTUALLY FIRING, according to the laser driver and laser interlock board.
Requires FeatureMask.HAS_INTERLOCK_FEEDBACK.
Implemented in WasatchNET.Spectrometer.
|
get |
True if the laser can fire (interlock circuit is CLOSED), false if the laser cannot fire (interlock circuit is OPEN).
Requires FeatureMask.HAS_INTERLOCK_FEEDBACK.
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.MockSpectrometer, WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
|
getset |
If you only want the laser to be modulated for a portion of each acquisition (rare), how long in microseconds should the laser be modulated during each integration.
Value is in microseconds, range 40bit.
It is unclear from documentation if, at the end of this duration, the LASER turns off (zero power), or MODULATION turns off (i.e. reverts to full power).
Implemented in WasatchNET.Spectrometer.
|
getset |
Implemented in WasatchNET.Spectrometer.
|
getset |
Implemented in WasatchNET.Spectrometer.
|
getset |
When defining the laser modulation duty cycle, the length (period) of the duty cycle in microsec.
Warning: Laser modulation commands are normally internally set by the function setLaserPowerPercentage().
Value is in microseconds, range 40bit.</remarks>
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.MockSpectrometer, WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
|
getset |
If you want the laser modulation to start part-way through an acquisition, this defines the delay in microseconds from the beginning of the integration until laser modulation begins.
Warning: Laser modulation commands are normally internally set by the function setLaserPowerPercentage().
Value is in microseconds, range 40bit.
It is unclear from documentation whether MODULATION starts after the given delay, or the LASER is enabled after the delay.
Implemented in WasatchNET.Spectrometer.
|
getset |
When defining the laser modulation duty cycle, the length (width) of the period during which the laser is enabled.
Warning: Laser modulation commands are normally internally set by the function setLaserPowerPercentage().
Value is in microseconds, range 40bit.
Example: if period was 100us, and pulseWidth was 20us, then the laser would fire 1/5 of the time and therefore operating
at 20% power.
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.MockSpectrometer, and WasatchNET.Spectrometer.
|
getset |
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
|
getset |
Not supported on all spectrometers. Firmware status uncertain.
It is unclear how this relates to FPGA_LASER_CONTROL.RAMPING.
Implemented in WasatchNET.Spectrometer.
|
get |
convert the raw laser temperature reading into degrees centigrade
https://www.ipslasers.com/data-sheets/SM-TO-56-Data-Sheet-IPS.pdf
Laser temperature conversion doesn't use EEPROM coeffs at all. Most Wasatch Raman systems use an IPS Wavelength-Stabilized TO-56 laser, which internally uses a Betatherm 10K3CG3 thermistor.
The official conversion from thermistor resistance (in ohms) to degC is:
1 / ( C1
273.15
Where: C1 = 0.00113 C2 = 0.000234 C3 = 8.78e-8
Early Dash / ENLIGHTEN implementations used a simpler curve-fit which yielded nearly identical performance.
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.MockSpectrometer, WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
|
get |
Synonym for primaryADC.
selectedADC primaryADC
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.HOCTSpectrometer, WasatchNET.MockSpectrometer, WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
|
getset |
FACTORY ONLY.
WARNING: raising this value above 63 will "increase temperature AND volatility", while lowering this value below 63 will "decrease temperature WHILE increasing volatility".
During factory turning of the potentiometer on the laser driver controller board, this function is used to temporarily offset the TEC DAC setpoint from its default power-up value of 63.
End-users should not adjust this value at runtime, as the potentiometer has already been locked-down at a point optimized for laser power stability over temperature; any changes to this value from the default value of 63 will only increase the chances of power instability, including mode-hopping and hysteresis effects.
See RamanSpecCal's LaserTemperatureTest documentation for additional information.
Note that input values will automatically be capped at 7-bit (0, 127), the operative range of the laser TEC DAC.
Also note that although this property includes the word "temperature" because the setpoint relates to and will change the laser's central temperature, you cannot set a specific temperature setpoint in degC, as the final temperature is generated in hardware as a combination of the DAC setpoint value and the physical potentiometer.
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.MockSpectrometer, WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
|
get |
Implemented in WasatchNET.Spectrometer.
|
get |
spectrometer model
Implemented in WasatchNET.Spectrometer.
|
get |
Implemented in WasatchNET.Spectrometer.
|
get |
Whether area scan mode is supported.
Implemented in WasatchNET.Spectrometer.
|
get |
Internal firmware name for the highGainModeEnabled feature available on InGaAs detectors.
Implemented in WasatchNET.Spectrometer.
|
get |
Implemented in WasatchNET.Spectrometer.
|
get |
Implemented in WasatchNET.Spectrometer.
|
get |
Implemented in WasatchNET.Spectrometer.
|
get |
Implemented in WasatchNET.Spectrometer.
|
get |
Implemented in WasatchNET.Spectrometer.
|
get |
how many pixels does the spectrometer have (spectrum length)
Implemented in WasatchNET.Spectrometer.
|
get |
Implemented in WasatchNET.Spectrometer.
|
getset |
Implemented in WasatchNET.Spectrometer.
|
getset |
How many acquisitions to average together (zero for no averaging)
Implemented in WasatchNET.Spectrometer.
|
get |
This is provided for spectrometers with a secondary ADC connected to an external laser, photodiode or what-have-you. Attempts to read it on spectrometers where it has not been configured can result in indeterminate behavior; therefore, hasSecondaryADC is provided to allow callers to selectively enable this function if they believe they are using supported hardware.
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.MockSpectrometer, WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
|
get |
spectrometer serial number
Implemented in WasatchNET.HOCTSpectrometer, WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
|
getset |
A configurable delay from when an inbound trigger signal is received by the spectrometer, until the triggered acquisition actually starts.
Default value is 0us.
Unit is in 0.5 microseconds (500ns), so value of 25 would represent 12.5us.
Value is 24bit, so max value is 16777216 (8.388608 sec).
As part of triggering, only currently supported on ARM.
Implemented in WasatchNET.Spectrometer.
|
getset |
Implemented in WasatchNET.Spectrometer.
|
getset |
Whether acquisitions are triggered "internally" (via the ACQUIRE opcode sent by software) or "externally" (via an electrical signal wired to the accessory connector).
Implemented in WasatchNET.BoulderSpectrometer, WasatchNET.HOCTSpectrometer, WasatchNET.MockSpectrometer, WasatchNET.Spectrometer, and WasatchNET.SPISpectrometer.
|
get |
pre-populated array of wavelengths (nm) by pixel, generated from eeprom.wavecalCoeffs
see Util.generateWavelengths
Implemented in WasatchNET.Spectrometer.
|
get |
pre-populated array of Raman shifts in wavenumber (1/cm) by pixel, generated from wavelengths[] and excitationNM
see Util.wavelengthsToWavenumbers
Implemented in WasatchNET.Spectrometer.