File MIES_SweepSaving.ipf¶
SWS Scale and store acquired data
Functions
-
variable SWS_SaveAcquiredData(string device, variable forcedStop = defaultValue)¶
Save the acquired sweep permanently.
- Parameters:
device – device
forcedStop – [optional, defaults to false] if DAQ was aborted (true) or stopped by itself (false)
-
static std::tuple<variable, variable> SWS_ProcessDATTLChannelsOnEarlyAcqStop(string device, WaveRefWave scaledDataWave, wave config)¶
Determine actual acquisition times and if acquisition was stopped early, change the remaining data points in DA/TTL with NaN. DA/TTL data was prefilled in.
See also
DC_InitScaledDataWave with no early acquisition stop as default
- Parameters:
device – device name
scaledDataWave – scaled data wave
config – config wave
- Return values:
plannedTime – planned acquisition time, time at one point after the end of the DA wave [s]
acquiredTime – if acquisition was aborted early, time of last acquired point in AD wave [s], NaN otherwise
-
static variable SWS_SetUnacquiredTimeInADCToNaN(wave config, WaveRefWave scaledDataWave, variable acquiredTime)¶
Sets the data points in the AD channels of the unacquired time interval to NaN.
-
std::tuple<variable, variable> SWS_DeterminePlannedAndAcquiredTime(wave channelDA, wave channelAD, variable adSize, variable lastFifoPos)¶
Determines the acquired and planned time.
- Parameters:
channelDA – DA channel, as all DA channels run synchroneously, the first DA channel is good enough
channelAD – AD channel, as all AD channels run synchroneously, the first AD channel is good enough
adSize – effective size of the AD channel, where data was sampled (for ITC the AD wave can be longer)
lastFifoPos – at this index - 1 was the last data point sampled
-
static variable SWS_SweepSettingsEpochInfoToLBN(string device, variable sweepNo)¶
-
static variable SWS_AfterSweepDataChangeHook(string device)¶
General hook function which gets always executed after sweep data was added or removed.
- Parameters:
device – device name
-
wave SWS_GetChannelGains(string device, variable timing = defaultValue)¶
Return a free wave with all channel gains.
Rows:
Active channels only (same as DAQConfigWave)
Different hardware has different requirements how the DA, AD and TLL channels are scaled. As general rule use
data * SWS_GetChannelGains
for GAIN_BEFORE_DAQ anddata / SWS_GetChannelGains
for GAIN_AFTER_DAQ, i.e.before_gain * data(before_DAQ) == after_gain * data(after_DAQ)
.Hardware
Channel
Specialities
ITC
DA
None
ITC
AD
None
ITC
TTL
Multiple TTL bits are combined. See SplitTTLWaveIntoComponents() for details.
NI
DA
None
NI
AD
Scaled directly on acquisition.
NI
TTL
One channel per TTL bit.
SU
DA
None
SU
AD
Scaled directly on acquisition.
SU
TTL
One channel per TTL bit.
With GAIN_BEFORE_DAQ the function returns the gain factor for all channels. With GAIN_AFTER_DAC the gain factor for ADC channels is returned as 1. Gain handling for NI: In dataconfigurator setup DAC_values = data(before_DAQ) * gain_factor(DAC_channel)
See also
DC_FillDAQDataWaveForDAQ at acquisition time done by hardware ADC_values = data(acquired_by_ADC) * gain_factor(ADC_channel)
See also
HW_NI_PrepareAcq at acquisition time on readout: oscilloscopeValues = DAC_values scaledValues = DAC_values / gain_factor(DAC_channel) ADC_values are NOT changed, thus a gain factor of 1 is used when calculation indexes over all DAC, ADC, TTL channels.
See also
See also
- Parameters:
device – device
timing – One of GainTimeParameter
-
variable SWS_GetRawDataFPType(string device)¶
Return the floating point type for storing the raw data.
The returned values are the same as for
WaveType