37#ifndef AseqSpectrometer_h
38#define AseqSpectrometer_h
42#include "RemoteBridgeOscilloscope.h"
63 const std::string& hwname,
64 const std::string& color,
70 AddStream(Unit::UNIT_COUNTS,
"RawCounts", Stream::STREAM_TYPE_ANALOG);
71 AddStream(Unit::UNIT_COUNTS,
"FlattenedCounts", Stream::STREAM_TYPE_ANALOG);
72 AddStream(Unit::UNIT_W_M2_NM,
"AbsoluteIrradiance", Stream::STREAM_TYPE_ANALOG);
118 virtual void Start()
override;
120 virtual void Stop()
override;
129 virtual int64_t GetIntegrationTime()
override;
130 virtual void SetIntegrationTime(int64_t t)
override;
166 static std::vector<SCPIInstrumentModel> GetDriverSupportedModels()
170 {
"lr1", {{ SCPITransportType::TRANSPORT_TWINLAN,
"localhost:5025:5026" }}}
174 static std::string GetDriverNameInternal();
Helper class for creating output streams.
Definition AseqSpectrometer.h:50
StreamIndex
Indexes of output streams.
Definition AseqSpectrometer.h:77
@ STREAM_RAW_COUNTS
Raw counts without any corrections applied.
Definition AseqSpectrometer.h:79
@ STREAM_FLATTENED_COUNTS
Flattened counts after dark frame subtraction and sensor response correction.
Definition AseqSpectrometer.h:82
@ STREAM_ABSOLUTE_IRRADIANCE
Absolute irradiance (if the spectrometer is calibrated with absolute data)
Definition AseqSpectrometer.h:85
AseqSpectrometerChannel(Oscilloscope *scope, const std::string &hwname, const std::string &color, size_t index)
Initialize the channel.
Definition AseqSpectrometer.h:61
Driver for Aseq Instruments LR1/HR1 spectrometers via the scopehal-aseq-bridge server.
Definition AseqSpectrometer.h:95
virtual Oscilloscope::TriggerMode PollTrigger() override
Checks the curent trigger status.
Definition AseqSpectrometer.cpp:254
virtual OscilloscopeChannel * GetExternalTrigger() override
Returns the external trigger input channel, if we have one.
Definition AseqSpectrometer.cpp:173
uint32_t GetInstrumentTypesForChannel(size_t i) const override
Returns a bitfield describing the set of instrument types that a given channel supports.
Definition AseqSpectrometer.cpp:147
virtual unsigned int GetInstrumentTypes() const override
Returns a bitfield describing the set of instrument types that this instrument supports.
Definition AseqSpectrometer.cpp:142
virtual void Start() override
Starts the instrument in continuous trigger mode.
Definition AseqSpectrometer.cpp:196
virtual void Stop() override
Stops triggering.
Definition AseqSpectrometer.cpp:214
virtual std::vector< uint64_t > GetSampleDepthsNonInterleaved() override
Get the legal memory depths for this scope in all-channels mode.
Definition AseqSpectrometer.cpp:166
float m_irrcoeff
Global scaling factor for irradiance calibration.
Definition AseqSpectrometer.h:144
std::vector< float > m_irrcal
Irradiance calibration (if available) for each spectral bin.
Definition AseqSpectrometer.h:141
virtual void FlushConfigCache() override
Instruments are allowed to cache configuration settings to reduce round trip queries to the device.
Definition AseqSpectrometer.cpp:236
SpectrometerDarkFrameChannel * m_darkframe
Dark frame input.
Definition AseqSpectrometer.h:157
virtual void ForceTrigger() override
Forces a single acquisition as soon as possible.
Definition AseqSpectrometer.cpp:222
virtual bool AcquireData() override
Pull data from the instrument.
Definition AseqSpectrometer.cpp:263
virtual void PushTrigger() override
Pushes changes made to m_trigger to the instrument.
Definition AseqSpectrometer.cpp:241
virtual void PullTrigger() override
Updates m_trigger with any changes made from the instrument side.
Definition AseqSpectrometer.cpp:245
int64_t m_integrationTime
Integration time, in femtoseconds.
Definition AseqSpectrometer.h:160
channelids
Channel indexes.
Definition AseqSpectrometer.h:148
@ CHAN_DARKFRAME
Dark frame correction input.
Definition AseqSpectrometer.h:153
@ CHAN_SPECTRUM
Spectral output.
Definition AseqSpectrometer.h:150
virtual uint64_t GetSampleRate() override
Gets the current sampling rate (in Hz) of this scope.
Definition AseqSpectrometer.cpp:178
virtual void StartSingleTrigger() override
Arms the trigger for a single acquistion.
Definition AseqSpectrometer.cpp:205
std::vector< float > m_flatcal
Flatness calibration coefficient for each spectral bin.
Definition AseqSpectrometer.h:138
virtual uint64_t GetSampleDepth() override
Gets the current sample depth of this scope.
Definition AseqSpectrometer.cpp:183
std::vector< float > m_wavelengths
Wavelength (in picometers) at each spectral bin.
Definition AseqSpectrometer.h:135
virtual bool IsTriggerArmed() override
Checks if the trigger is currently armed.
Definition AseqSpectrometer.cpp:249
virtual void SetSampleRate(uint64_t rate) override
Sets the sample rate of the scope, in Hz.
Definition AseqSpectrometer.cpp:192
virtual void SetSampleDepth(uint64_t depth) override
Sets the sample depth of the scope.
Definition AseqSpectrometer.cpp:188
Simple edge trigger.
Definition EdgeTrigger.h:44
virtual size_t AddStream(Unit yunit, const std::string &name, Stream::StreamType stype, uint8_t flags=0)
Adds a new data stream to the channel.
Definition InstrumentChannel.cpp:125
virtual void ClearStreams()
Clears out any existing streams.
Definition InstrumentChannel.cpp:113
A single channel on an oscilloscope.
Definition OscilloscopeChannel.h:49
Generic representation of an oscilloscope, logic analyzer, or spectrum analyzer.
Definition Oscilloscope.h:51
TriggerMode
Definition Oscilloscope.h:398
Generic representation of an optical (UV-VIS-IR) spectrometer.
Definition SCPISpectrometer.h:43
Abstraction of a transport layer for moving SCPI data between endpoints.
Definition SCPITransport.h:53
A dark frame input for a spectrometer.
Definition SpectrometerDarkFrameChannel.h:39
A unit of measurement, plus conversion to pretty-printed output.
Definition Unit.h:59