Wasatch.NET 2.4.14
.NET application driver for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Attributes | Package Functions | Properties | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
WasatchNET.HOCTSpectrometer Class Reference
Inheritance diagram for WasatchNET.HOCTSpectrometer:
[legend]
Collaboration diagram for WasatchNET.HOCTSpectrometer:
[legend]

Classes

class  OctUsb
 

Public Member Functions

override void close ()
 
override ushort[] getFrame ()
 
override double[] getSpectrum (bool forceNew=false)
 Take a single complete spectrum, including any configured scan averaging, boxcar, dark subtraction, inversion, binning, and optionally relative intensity correction.
 
- Public Member Functions inherited from WasatchNET.Spectrometer
void cancelCurrentAcquisition ()
 
virtual void changeSPITrigger (bool edge, bool firmwareThrow)
 
virtual void close ()
 
double[] correctRamanIntensity (double[] spectrum)
 Performs SRM correction on the given spectrum using the ROI and coefficients on EEPROM. Non-ROI pixels are not corrected. If ROI or relative intensity coefficients appear invalid, original spectrum is returned.
 
void dontCache (Opcodes op)
 
bool eraseStorage ()
 
void flushReaders ()
 
ushort getDAC_UNUSED ()
 
virtual ushort[] getFrame ()
 
virtual double[] getSpectrum (bool forceNew=false)
 Take a single complete spectrum, including any configured scan averaging, boxcar, dark subtraction, inversion, binning, and optionally relative intensity correction.
 
byte[] getStorage (UInt16 page)
 
UntetheredCaptureStatus getUntetheredCaptureStatus ()
 
bool haveCache (Opcodes op)
 
virtual bool loadFromJSON (string pathname)
 
virtual bool reconnect ()
 
virtual void regenerateWavelengths ()
 
bool resetFPGA ()
 
bool sendFeedback (UInt16 sequence)
 
bool sendSWTrigger ()
 
bool setDFUMode ()
 Put the ARM microcontroller into DFU mode for firmware update.
 
virtual bool setLaserPowerPercentage (float perc)
 
void useCache (Opcodes op)
 
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.
 

Protected Attributes

object frameLock = new object()
 
object lineLock = new object()
 
- Protected Attributes inherited from WasatchNET.Spectrometer
bool accessoryEnabled_ = false
 
object acquisitionLock = new object()
 synchronizes getSpectrum, integrationTimeMS, scanAveraging, dark and boxcarHalfWidth
 
object adcLock = new object()
 
bool areaScanEnabled_ = false
 
uint boxcarHalfWidth_
 
bool currentAcquisitionCancelled
 
double[] dark_
 
bool detectorTECEnabled_
 
float detectorTECSetpointDegC_ = UNINITIALIZED_TEMPERATURE_DEG_C
 
ushort detectorTECSetpointRaw_
 
uint integrationTimeMS_
 
bool lampEnabled_ = false
 
bool laserEnabled_
 
bool laserHasFired_
 
UInt64 laserModulationPeriod_
 
UInt64 laserModulationPulseWidth_
 
float laserPowerSetpointMW_ = 0
 
byte laserTemperatureSetpointRaw_
 
Logger logger = Logger.getInstance()
 
double[] reference_
 
uint scanAveraging_ = 1
 
TRIGGER_SOURCE triggerSource_ = TRIGGER_SOURCE.INTERNAL
 

Package Functions

 HOCTSpectrometer (UsbRegistry usbReg, int index=0)
 
override bool open ()
 
- Package Functions inherited from WasatchNET.Spectrometer
byte[] getCmd (Opcodes opcode, int len, ushort wIndex=0, int fullLen=0)
 Execute a request-response control transaction using the given opcode.
 
byte[] getCmd2 (Opcodes opcode, int len, ushort wIndex=0, int fakeBufferLengthARM=0)
 Execute a request-response transfer with a "second-tier" request.
 
virtual bool open ()
 
bool sendCmd (Opcodes opcode, ushort wValue=0, ushort wIndex=0, byte[] buf=null)
 send a single control transfer command (response not checked)
 
bool sendCmd2 (Opcodes opcode, ushort wIndex=0, byte[] buf=null)
 send a single 2nd-tier control transfer command (response not checked)
 
 Spectrometer (UsbRegistry usbReg)
 

Properties

CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource() [get, set]
 
override float detectorGain [get, set]
 Maps to an FPGA register inside the spectrometer used to scale pixels read from the ADC to optimize dynamic range.
 
override float detectorGainOdd [get, set]
 (InGaAs-only) Companion property to detectorGain, which on InGaAs detectors applies only to even-numbered pixels.
 
override 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.
 
override short detectorOffsetOdd [get, set]
 (InGaAs-only) Companion property to detectorOffset, which on InGaAs detectors applies only to even-numbered pixels.
 
override bool detectorTECEnabled [get, set]
 
override ushort detectorTECSetpointRaw [get, set]
 
override float detectorTemperatureDegC [get]
 
override float excitationWavelengthNM [get, set]
 
override string firmwareRevision [get]
 
override string fpgaRevision [get]
 
Task FrameProcess = null [get, set]
 
override bool highGainModeEnabled [get, set]
 
override uint integrationTimeMS [get, set]
 Current integration time in milliseconds.
 
override bool isARM [get]
 
override bool isInGaAs [get]
 
override bool laserEnabled [get, set]
 Whether the laser has been REQUESTED TO FIRE by the software and firmware.
 
override ushort laserTemperatureRaw [get]
 Synonym for primaryADC.
 
int sampleLine [get, set]
 
override string serialNumber [get]
 spectrometer serial number
 
override 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).
 
- Properties inherited from WasatchNET.Spectrometer
virtual bool accessoryEnabled [get, set]
 Determines whether or not the Gen1.5 accessory connector's features can be used.
 
int acquireCount = 0 [get, protected set]
 Allows application to track how many ACQUIRE_SPECTRUM commands have been sent to the spectrometer (including throwaways and retries).
 
uint? acquisitionTimeoutMS [get, set]
 Convenience accessor to set an explicit acquisition timeout.

 
uint acquisitionTimeoutRelativeMS [set]
 Allows the NEXT acquisition timeout to be set relative to "now" as an offiset in milliseconds.
 
DateTime? acquisitionTimeoutTimestamp = null [get, set]
 Allows the NEXT acquisition timeout to be set to an explicit objective future timestamp.
 
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).
 
ushort adcRaw [get]
 
virtual bool areaScanEnabled [get, set]
 Configure detector for 2D image mode.
 
bool autoTrigger [get, set]
 Whether the driver should automatically send a software trigger on calls to getSpectrum() when triggerSource is set to INTERNAL. (defaults true)
 
virtual bool batteryCharging [get]
 
virtual float batteryPercentage [get]
 
uint batteryStateRaw [get]
 
virtual 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).
 
virtual bool continuousAcquisitionEnable [get, set]
 After the first trigger is received, no further triggers are required; spectrometer will enter free-running mode.
 
virtual byte continuousFrames [get, set]
 When not using "continous acquisitions" with external triggers, how many spectra to acquire per trigger event.
 
virtual double[] dark [get, set]
 Perform automatic dark subtraction by setting this property to an acquired dark spectrum; leave "null" to disable.
 
virtual float detectorGain [get, set]
 Maps to an FPGA register inside the spectrometer used to scale pixels read from the ADC to optimize dynamic range.
 
virtual float detectorGainOdd [get, set]
 (InGaAs-only) Companion property to detectorGain, which on InGaAs detectors applies only to even-numbered pixels.
 
virtual 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.
 
virtual 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]
 
virtual UInt16 detectorStartLine [get, set]
 
virtual UInt16 detectorStopLine [get, set]
 
virtual bool detectorTECEnabled [get, set]
 
virtual float detectorTECSetpointDegC [get, set]
 
virtual ushort detectorTECSetpointRaw [get, set]
 
double detectorTemperatureCacheTimeMS = 1000 [get, set]
 
virtual float detectorTemperatureDegC [get]
 
virtual ushort detectorTemperatureRaw [get]
 
EEPROM eeprom [get, protected set]
 configuration settings stored in the spectrometer's EEPROM
 
bool errorOnTimeout = true [get, set]
 Whether an ERROR should be logged on a timeout event (default true)
 
virtual float excitationWavelengthNM [get, set]
 
FeatureIdentification featureIdentification [get, set]
 metadata inferred from the spectrometer's USB PID
 
virtual string firmwareRevision [get]
 
FPGAOptions fpgaOptions [get, private set]
 set of compilation options used to compile the FPGA firmware in this spectrometer
 
virtual string fpgaRevision [get]
 
FRAM fram [get, protected set]
 
virtual bool hasLaser [get]
 
bool hasMarker [get, set]
 Some spectrometers send a start-of-frame marker in the first pixel of the spectrum.
 
bool hasSecondaryADC = false [get, set]
 This should be replaced with an FGPACompilationFlag or EEPROM field at some point.
 
virtual bool highGainModeEnabled [get, set]
 
HORIZONTAL_BINNING horizontalBinning [get, set]
 
string id [get]
 couples serial number with channel position
 
virtual uint integrationTimeMS [get, set]
 Current integration time in milliseconds.
 
virtual bool isARM [get]
 
bool isGen15 [get]
 Whether the spectrometer uses a "Gen 1.5" accessory connector.
 
virtual bool isInGaAs [get]
 
bool isOCT = false [get, protected set]
 Optical Coherence Tomography (OCT) spectrometers differ from "standard" spectrometers in several respects, such as producing both 2D and 3D imagery.
 
bool isSiG [get]
 
bool isSPI = false [get, protected set]
 Whether the spectrometer uses Serial Peripheral Interface (as opposed to USB for instance).
 
bool isStroker = false [get, protected set]
 Stroker is a legacy board firmware with older PID (not 0x1000, 0x2000 or 0x4000), doesn't conform to Feature Identification Device (FID) Protocol, and lacking an EEPROM.
 
virtual 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.
 
virtual bool laserEnabled [get, set]
 Whether the laser has been REQUESTED TO FIRE by the software and firmware.
 
virtual bool laserFiring [get]
 Whether the laser is ACTUALLY FIRING, according to the laser driver and laser interlock board.
 
virtual 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]
 
virtual 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.
 
virtual UInt64 laserModulationPulseWidth [get, set]
 When defining the laser modulation duty cycle, the length (width) of the period during which the laser is enabled.
 
virtual LaserPowerResolution laserPowerResolution = LaserPowerResolution.LASER_POWER_RESOLUTION_1000 [get, set]
 
virtual float laserPowerSetpointMW [get, set]
 Use this to set the laser output power in milliWatts.
 
bool laserRampingEnabled [get, set]
 disabled to deconflict area scan
 
virtual float laserTemperatureDegC [get]
 convert the raw laser temperature reading into degrees centigrade
 
virtual ushort laserTemperatureRaw [get]
 Synonym for primaryADC.
 
virtual byte laserTemperatureSetpointRaw [get, set]
 FACTORY ONLY.
 
double[] lastSpectrum [get, protected set]
 Useful if you lost the results of getSpectrum, or if you want to peek into ongoing multi-acquisition tasks like scan averaging or optimization.
 
uint lineLength [get]
 
int linesPerFrame [get, protected set]
 
string model [get]
 spectrometer model
 
bool multiChannelSelected [get, set]
 Multichannel convenience accessor (default false)
 
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]
 
double[] pixelAxis [get]
 convenience accesor for pixel axis (lazy-loaded), for parallelism with wavelengths and wavenumbers
 
uint pixels [get, protected set]
 how many pixels does the spectrometer have (spectrum length)
 
ushort primaryADC [get]
 
bool ramanIntensityCorrectionEnabled [get, set]
 Whether to correct the y-axis using SRM-derived correction factors, stored as coefficients on the spectrometer.
 
virtual double[] reference [get, set]
 Simplify reference-based techniques (absorbance, reflectance, transmission etc) by allowing a reference to be stored with the Spectrometer, similar to dark.

 
virtual uint scanAveraging [get, set]
 How many acquisitions to average together (0 or 1 for no averaging). (default 1)
 
bool scanAveragingIsContinuous [get, set]
 Whether the "scanAveraging" property should automatically configure continuousAcquisitionEnable and continuousFrames. (default false)
 
virtual 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.
 
byte selectedADC [get, set]
 
virtual string serialNumber [get]
 spectrometer serial number
 
int shiftedMarkerCount = 0 [get, private set]
 For spectrometer firmware providing "start of spectrum markers", provides a count of how many INCORRECT markers were found in the MOST RECENT spectrum.
 
int spectrumCount = 0 [get, protected set]
 Allows application to track how many successful (non-null) calls have been made to getSpectrum (whether averaged or otherwise).
 
bool throwawayADCRead = true [get, set]
 Whether the driver should automatically perform a throwaway ADC read when changing the selected ADC. (defaults true)
 
bool throwawayAfterIntegrationTime [get, set]
 Whether the driver should automatically generate a throwaway "stability" measurement after changing integration time. (defaults false)
 
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]
 
virtual 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).
 
string uniqueKey [get, set]
 
bool untetheredAcquisitionEnabled = false [get, set]
 Untethered operation requires an argument to ACQUIRE, and polls before reading spectrum.
 
bool useReadoutMutex [get, set]
 Whether to synchronize all spectral reads with a class-level (static) mutex.

 
double[] wavelengths [get, protected set]
 pre-populated array of wavelengths (nm) by pixel, generated from eeprom.wavecalCoeffs
 
double[] wavenumbers [get, protected set]
 pre-populated array of Raman shifts in wavenumber (1/cm) by pixel, generated from wavelengths[] and excitationNM
 
- Properties inherited from WasatchNET.ISpectrometer
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
 

Private Member Functions

void collectFrames (CancellationToken CT)
 

Private Attributes

bool commsOpen = false
 
ushort[] lastFrame
 
int sampleLine_ = 100
 

Static Private Attributes

const int ONE_BILLION = 1000000000
 

Additional Inherited Members

- Public Types inherited from WasatchNET.Spectrometer
enum  LaserPowerResolution { LASER_POWER_RESOLUTION_100 , LASER_POWER_RESOLUTION_1000 , LASER_POWER_RESOLUTION_MANUAL }
 When setting laser power as a percentage (see setLaserPowerPercentage), this enum determines the possible resolution (granularity) of the selectable power. More...
 
enum  UntetheredCaptureStatus {
  IDLE = 0 , DARK = 1 , WARMUP = 2 , SAMPLE = 3 ,
  PROCESSING = 4 , ERROR = 5
}
 
- Public Attributes inherited from WasatchNET.Spectrometer
int acquisitionMaxRetries = 2
 If a call to Spectrometer.getSpectrum() fails, how many internal (within WasatchNET) retries should be attempted (includes re-sending an ACQUIRE opcode).
 
int delayAfterBulkEndpointErrorMS = 100
 If there is an error reading one of the bulk endpoints, pause this many milliseconds in hopes of the bus resetting itself (does not automatically retry).
 
bool fastAreaScan = false
 
float lastDetectorTemperatureDegC = UNINITIALIZED_TEMPERATURE_DEG_C
 A cached value of the last-measured detector temperature. This is automatically updated following spectral reads if readTemperatureAfterSpectrum is set.
 
int multiChannelPosition = -1
 If the spectrometer is deployed in a multi-channel configuration, this provides a place to store an integral position in the Spectrometer object. (defaults to -1, an invalid position)
 
bool readTemperatureAfterSpectrum = false
 If enabled, Wasatch.NET will automatically read the detector temperature following every successful call to getSpectrum(). That temperature can then be read from lastDetectorTemperatureDegC, without inducing any spectrometer communications.
 
- Static Public Attributes inherited from WasatchNET.Spectrometer
const byte DEVICE_TO_HOST = 0xc0
 
const byte HOST_TO_DEVICE = 0x40
 
const int LEGACY_VERTICAL_PIXELS = 70
 for Stroker Area Scan
 
const ushort SPECTRUM_START_MARKER = 0xffff
 
const float UNINITIALIZED_TEMPERATURE_DEG_C = -999
 
- Protected Member Functions inherited from WasatchNET.Spectrometer
void correctBadPixels (ref double[] spectrum)
 If a spectrometer has bad_pixels configured in the EEPROM, then average over them in the driver.
 
virtual double[] getAreaScanLightweight ()
 
virtual double[] getSpectrumRaw (bool skipTrigger=false)
 just the bytes, ma'am
 
- Package Attributes inherited from WasatchNET.Spectrometer
Dictionary< Opcodes, byte > cmd = OpcodeHelper.getInstance().getDict()
 
bool shuttingDown = false
 
SpectrometerUptime uptime
 

Constructor & Destructor Documentation

◆ HOCTSpectrometer()

WasatchNET.HOCTSpectrometer.HOCTSpectrometer ( UsbRegistry  usbReg,
int  index = 0 
)
inlinepackage

Member Function Documentation

◆ close()

override void WasatchNET.HOCTSpectrometer.close ( )
inlinevirtual

Reimplemented from WasatchNET.Spectrometer.

◆ collectFrames()

void WasatchNET.HOCTSpectrometer.collectFrames ( CancellationToken  CT)
inlineprivate

◆ getFrame()

override ushort[] WasatchNET.HOCTSpectrometer.getFrame ( )
inlinevirtual

Reimplemented from WasatchNET.Spectrometer.

◆ getSpectrum()

override double[] WasatchNET.HOCTSpectrometer.getSpectrum ( bool  forceNew = false)
inlinevirtual

Take a single complete spectrum, including any configured scan averaging, boxcar, dark subtraction, inversion, binning, and optionally relative intensity correction.

Parameters
forceNewnot used in base class (provided for specialized subclasses)
Returns
The acquired spectrum as an array of doubles

Reimplemented from WasatchNET.Spectrometer.

◆ open()

override bool WasatchNET.HOCTSpectrometer.open ( )
inlinepackagevirtual

Reimplemented from WasatchNET.Spectrometer.

Member Data Documentation

◆ commsOpen

bool WasatchNET.HOCTSpectrometer.commsOpen = false
private

◆ frameLock

object WasatchNET.HOCTSpectrometer.frameLock = new object()
protected

◆ lastFrame

ushort [] WasatchNET.HOCTSpectrometer.lastFrame
private

◆ lineLock

object WasatchNET.HOCTSpectrometer.lineLock = new object()
protected

◆ ONE_BILLION

const int WasatchNET.HOCTSpectrometer.ONE_BILLION = 1000000000
staticprivate

◆ sampleLine_

int WasatchNET.HOCTSpectrometer.sampleLine_ = 100
private

Property Documentation

◆ _cancellationTokenSource

CancellationTokenSource WasatchNET.HOCTSpectrometer._cancellationTokenSource = new CancellationTokenSource()
getsetprotected

◆ detectorGain

override float WasatchNET.HOCTSpectrometer.detectorGain
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.

Implements WasatchNET.ISpectrometer.

◆ detectorGainOdd

override float WasatchNET.HOCTSpectrometer.detectorGainOdd
getset

(InGaAs-only) Companion property to detectorGain, which on InGaAs detectors applies only to even-numbered pixels.

Implements WasatchNET.ISpectrometer.

◆ detectorOffset

override short WasatchNET.HOCTSpectrometer.detectorOffset
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.

Implements WasatchNET.ISpectrometer.

◆ detectorOffsetOdd

override short WasatchNET.HOCTSpectrometer.detectorOffsetOdd
getset

(InGaAs-only) Companion property to detectorOffset, which on InGaAs detectors applies only to even-numbered pixels.

Implements WasatchNET.ISpectrometer.

◆ detectorTECEnabled

override bool WasatchNET.HOCTSpectrometer.detectorTECEnabled
getset

◆ detectorTECSetpointRaw

override ushort WasatchNET.HOCTSpectrometer.detectorTECSetpointRaw
getset

◆ detectorTemperatureDegC

override float WasatchNET.HOCTSpectrometer.detectorTemperatureDegC
get

◆ excitationWavelengthNM

override float WasatchNET.HOCTSpectrometer.excitationWavelengthNM
getset

◆ firmwareRevision

override string WasatchNET.HOCTSpectrometer.firmwareRevision
get

◆ fpgaRevision

override string WasatchNET.HOCTSpectrometer.fpgaRevision
get

◆ FrameProcess

Task WasatchNET.HOCTSpectrometer.FrameProcess = null
getsetprotected

◆ highGainModeEnabled

override bool WasatchNET.HOCTSpectrometer.highGainModeEnabled
getset

◆ integrationTimeMS

override uint WasatchNET.HOCTSpectrometer.integrationTimeMS
getset

Current integration time in milliseconds.

Implements WasatchNET.ISpectrometer.

◆ isARM

override bool WasatchNET.HOCTSpectrometer.isARM
get

◆ isInGaAs

override bool WasatchNET.HOCTSpectrometer.isInGaAs
get

◆ laserEnabled

override bool WasatchNET.HOCTSpectrometer.laserEnabled
getset

Whether the laser has been REQUESTED TO FIRE by the software and firmware.

Implements WasatchNET.ISpectrometer.

◆ laserTemperatureRaw

override ushort WasatchNET.HOCTSpectrometer.laserTemperatureRaw
get

Synonym for primaryADC.

selectedADC primaryADC

Implements WasatchNET.ISpectrometer.

◆ sampleLine

int WasatchNET.HOCTSpectrometer.sampleLine
getset

◆ serialNumber

override string WasatchNET.HOCTSpectrometer.serialNumber
get

spectrometer serial number

Implements WasatchNET.ISpectrometer.

◆ triggerSource

override TRIGGER_SOURCE WasatchNET.HOCTSpectrometer.triggerSource
getset

Whether acquisitions are triggered "internally" (via the ACQUIRE opcode sent by software) or "externally" (via an electrical signal wired to the accessory connector).

Implements WasatchNET.ISpectrometer.


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