Initiates a spectrum acquisition and returns power spectrum data, and provides additional spectrum information.

Syntax

Namespace: NationalInstruments.ModularInstruments.NIRfsa

public float[] MemoryOptimizedReadPowerSpectrum(PrecisionTimeSpan timeout, ref float[] data)

Remarks

Memory reallocation does not happen every time a call is made to this method. Memory allocation is done only if the size of data is different from the data array passed in.
Note

Memory optimization is not guaranteed.

Parameters

NameTypeDescription
timeoutPrecisionTimeSpan

The time allotted for the method to complete before returning a timeout error. Using NationalInstruments.PrecisionTimeSpan.MaxValue specifies that the method waits until all data is available.

dataref float[]

The power spectrum data.

Returns

The power spectrum data.

Exceptions

TypeDescription
System.ObjectDisposedException

The MemoryOptimizedReadPowerSpectrum method was accessed after the associated NIRfsa object was disposed.