MemoryOptimizedReadPowerSpectrum(PrecisionTimeSpan, ref float[])
- Updated2025-10-14
- 1 minute(s) read
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
| Name | Type | Description |
|---|---|---|
| timeout | PrecisionTimeSpan | 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. |
| data | ref float[] | The power spectrum data. |
Returns
The power spectrum data.
Exceptions
| Type | Description |
|---|---|
| System.ObjectDisposedException | The MemoryOptimizedReadPowerSpectrum method was accessed after the associated NIRfsa object was disposed. |