File MIES_DataConfigurator.ipf¶
DC Handle preparations before data acquisition or test pulse related to the DAQ data and config waves
Functions
-
static variable DC_UpdateGlobals(string device, variable dataAcqOrTP)¶
Update global variables used by the Testpulse or DAQ.
-
variable DC_Configure(string device, variable dataAcqOrTP, variable multiDevice = defaultValue)¶
Prepare test pulse/data acquisition.
- Parameters:
device – panel title
dataAcqOrTP – one of DATA_ACQUISITION_MODE or TEST_PULSE_MODE
multiDevice – [optional: defaults to false] Fine tune data handling for single device (false) or multi device (true)
- Throws:
Abort – configuration failure
-
static variable DC_UpdateHSProperties(string device, wave ADCs)¶
-
static variable DC_NoOfChannelsSelected(string device, variable type)¶
Return the number of selected checkboxes for the given type.
-
static variable DC_ChannelCalcForDAQConfigWave(string device, variable dataAcqOrTP)¶
Returns the total number of combined channel types (DA, AD, and front TTLs) selected in the DA_Ephys Gui.
- Parameters:
device – panel title
dataAcqOrTP – acquisition mode, one of DATA_ACQUISITION_MODE or TEST_PULSE_MODE
-
static variable DC_AreTTLsInRackChecked(string device, variable rackNo)¶
Returns the ON/OFF status of the front TTLs on a specified rack.
- Parameters:
device – device
rackNo – Only the ITC1600 can have two racks. For all other ITC devices RackNo = 0.
-
static variable DC_LongestOutputWave(string device, variable dataAcqOrTP, variable channelType)¶
Returns the number of points in the longest stimset.
- Parameters:
device – device
dataAcqOrTP – acquisition mode, one of DATA_ACQUISITION_MODE or TEST_PULSE_MODE
channelType – channel type, one of ChannelTypeAndControlConstants
-
static variable DC_CalculateDAQDataWaveLength(string device, variable dataAcqOrTP, variable channelType)¶
Calculate the required length of the DAQDataWave.
ITC Hardware:
The DAQDataWave length = 2^x where is the first integer large enough to contain the longest output wave plus one. X also has a minimum value of 17 to ensure sufficient time for communication with the ITC device to prevent FIFO overflow or underrun.
NI Hardware:
Returns stopCollectionPoint
See also
XopChannelConstants
- Parameters:
device – panel title
dataAcqOrTP – acquisition mode, one of DATA_ACQUISITION_MODE or TEST_PULSE_MODE
channelType – channel type, one of
-
variable DC_CalculateDAQDataWaveLengthImpl(variable dataLength, variable hardwareType, variable dataAcqOrTP)¶
device independent implkementation for DC_CalculateDAQDataWaveLength
-
static variable DC_MakeDAQConfigWave(string device, variable numActiveChannels)¶
Create the DAQConfigWave used to configure the DAQ device.
- Parameters:
device – panel title
numActiveChannels – number of active channels as returned by DC_ChannelCalcForDAQConfigWave()
-
static std::tuple<WaveOrNull, WaveRefWave> DC_MakeAndGetDAQDataWave(string device, DataConfigurationResult *s, variable dataAcqOrTP)¶
Creates DAQDataWave; The wave that the device takes DA and TTL data from and passes AD data to for all channels.
Config all refers to configuring all the channels at once
- Parameters:
device – panel title
s – DataConfigurationResult structure
dataAcqOrTP – one of DATA_ACQUISITION_MODE or TEST_PULSE_MODE
-
static wave DC_SetDataScaleNISUChannelWave(wave channel, variable type)¶
set a data scale for channel waves, this is not required for operation but allows to keep track of the scales The waves for the hardware that output data and read back data are typically in V because any other unit, like pA in current clamp mode on DAC channels is converted by the gain from pA to voltage and then by the hardware amplifier converted back from V to pA.
-
static wave DC_MakeNIChannelWave(string device, variable dataAcqOrTP, variable channelType, variable samplingInterval, variable index, variable dataType)¶
Creates a single NIChannel wave.
Config all refers to configuring all the channels at once
See also
XopChannelConstants
- Parameters:
device – panel title
dataAcqOrTP – one of DATA_ACQUISITION_MODE or TEST_PULSE_MODE
channelType – channel type, one of
samplingInterval – minimum sample intervall in microseconds
index – number of NI channel
dataType – numeric data type of NI channel
- Returns:
Wave Reference to NI Channel wave
-
static wave DC_MakeSUTTERChannelWave(string device, variable dataAcqOrTP, variable channelType, variable samplingInterval, variable index, variable dataType)¶
Creates a single SUTTER Channel wave.
Config all refers to configuring all the channels at once
See also
XopChannelConstants
- Parameters:
device – panel title
dataAcqOrTP – one of DATA_ACQUISITION_MODE or TEST_PULSE_MODE
channelType – channel type, one of
samplingInterval – minimum sample intervall in microseconds
index – number of NI channel
dataType – numeric data type of NI channel
- Returns:
Wave Reference to NI Channel wave
-
static variable DC_MakeHelperWaves(string device, variable dataAcqOrTP)¶
Initializes the waves used for displaying DAQ/TP results in the oscilloscope window and the scaled data wave.
- Parameters:
device – panel title
dataAcqOrTP – one of DATA_ACQUISITION_MODE or TEST_PULSE_MODE
-
static variable DC_CalculateChannelSizeForScaledData(string device, variable dataAcqOrTP, variable channelIndex = defaultValue)¶
Returns the size of a channel for scaledData wave creation. The DAQDataWave must already be existing at this point. channelIndex must be given for non-ITC hardware in DATA_ACQUISITION_MODE.
-
static variable DC_InitScaledDataWave(string device, variable dataAcqOrTP)¶
Initialize scaledDataWave, as NI and SUTTER output already properly scaled data, we can prefill output channels. So in in the more time critical SCOPE_xx_UpdateOscilloscope we can optimize by only copying the ADC data over (ADC data from SUTTER and NI is already properly scaled by hardware)
-
static variable DC_InitOscilloscopeDataWave(wave wv, variable numRows, variable sampleInterval, variable numDACs, variable numADCs, variable numTTLs, variable type = defaultValue, variable isFourierTransform = defaultValue)¶
Initialize OscilloscopeData waves to NaN.
-
wave DC_GetFilteredChannelState(string device, variable dataAcqOrTP, variable channelType, variable DAQChannelType = defaultValue)¶
Return the list of active channels, filtered for various special cases.
- Parameters:
device – panel title
dataAcqOrTP – one of DATA_ACQUISITION_MODE or TEST_PULSE_MODE
channelType – one of the channel type constants from ChannelTypeAndControlConstants
DAQChannelType – only return channels as active if they have the desired DAQChannel type (only respected for DA channel)
-
static variable DC_PlaceDataInDAQConfigWave(string device, variable dataAcqOrTP)¶
Places channel (DA, AD, and TTL) settings data into DAQConfigWave.
- Parameters:
device – panel title
dataAcqOrTP – one of DATA_ACQUISITION_MODE or TEST_PULSE_MODE
-
static variable DC_GetDecimationFactor(string device, variable dataAcqOrTP)¶
Get the decimation factor for the current channel configuration.
This is the factor between the minimum sampling interval and the real. If the multiplier is taken into account depends on
dataAcqOrTP
.- Parameters:
device – device
dataAcqOrTP – one of DATA_ACQUISITION_MODE or TEST_PULSE_MODE
-
variable DC_GetDecimationFactorCalc(variable samplingInterval)¶
Calculcate decimation factor device independent.
- Parameters:
samplingInterval – sampling interval in microseconds
-
static variable DC_CalculateLongestSweep(string device, variable dataAcqOrTP, variable channelType)¶
Returns the longest sweep in a stimulus set across the given channel type.
- Parameters:
device – device
dataAcqOrTP – mode, either DATA_ACQUISITION_MODE or TEST_PULSE_MODE
channelType – One of ChannelTypeAndControlConstants
- Returns:
number of data points, not time
-
variable DC_CalculateStimsetLength(wave stimSet, string device, variable dataAcqOrTP)¶
Get the stimset length for the real sampling interval.
- Parameters:
stimSet – stimset wave
device – device
dataAcqOrTP – one of DATA_ACQUISITION_MODE or TEST_PULSE_MODE
-
static variable DC_CalculateGeneratedDataSize(string device, variable dataAcqOrTP, variable genLength)¶
Get the length for the real sampling interval from a generated wave with length.
- Parameters:
device – device
dataAcqOrTP – one of DATA_ACQUISITION_MODE or TEST_PULSE_MODE
genLength – length of a generated data wave
-
variable DC_CalculateGeneratedDataSizeDAQMode(variable genLength, variable decimationFactor)¶
-
static variable DC_PlaceDataInDAQDataWave(string device, variable numActiveChannels, variable dataAcqOrTP, variable multiDevice)¶
Places data from appropriate DA and TTL stimulus set(s) into DAQDataWave. Also records certain DA_Ephys GUI settings into sweepDataLNB and sweepDataTxTLNB.
- Parameters:
device – panel title
numActiveChannels – number of active channels as returned by DC_ChannelCalcForDAQConfigWave()
dataAcqOrTP – one of DATA_ACQUISITION_MODE or TEST_PULSE_MODE
multiDevice – Fine tune data handling for single device (false) or multi device (true)
- Throws:
Abort – configuration failure
-
static variable DC_MakeTTLWave(string device, DataConfigurationResult *s)¶
-
static variable DC_WriteTTLIntoDAQDataWave(string device, DataConfigurationResult *s)¶
-
static variable DC_PrepareLBNEntries(string device, DataConfigurationResult *s)¶
-
static variable DC_FillSetEventFlag(string device, DataConfigurationResult *s)¶
-
static variable DC_FillDAQDataWaveForTP(string device, DataConfigurationResult *s)¶
-
static variable DC_FillDAQDataWaveForDAQ(string device, DataConfigurationResult *s)¶
-
static std::tuple<DataConfigurationResult> DC_GetConfiguration(string device, variable numActiveChannels, variable dataAcqOrTP, variable multiDevice)¶
-
variable DC_CalculateInsertStart(DataConfigurationResult *s)¶
Calculate s.insertStart for DATA_ACQUISITION_MODE.
-
static variable DC_SetupConfigurationTTLstimSets(string device, DataConfigurationResult *s)¶
fills in TTL stimset wave references in DataConfigurationResult structure needs: s.hardwareType, s.numXXXEntries fields
-
static variable DC_DocumentHardwareProperties(string device, variable hardwareType)¶
Document hardware type/name/serial number into the labnotebook.
-
static variable DC_GetStimsetAcqCycleID(string device, variable fingerprint, variable DAC)¶
Return the stimset acquisition cycle ID.
- Parameters:
device – device
fingerprint – fingerprint as returned by DC_GenerateStimsetFingerprint()
DAC – DA channel
-
static variable DC_GenerateStimsetFingerprint(variable raCycleID, string setName, variable setCycleCount, variable setChecksum)¶
Generate the stimset fingerprint.
This fingerprint is unique for the combination of the following properties:
Repeated acquisition cycle ID
stimset name
stimset checksum
set cycle count
Always then this fingerprint changes, a new stimset acquisition cycle ID has to be generated.
-
static std::tuple<variable, variable, variable> DC_CheckIfDataWaveHasBorderVals(string device, variable dataAcqOrTP)¶
-
variable DC_DocumentChannelProperty(string device, string entry, variable headstage, variable channelNumber, variable channelType, variable var = defaultValue, string str = defaultValue)¶
Document channel properties of DA and AD channels.
Knows about unassociated channels and creates the special key returned by CreateLBNUnassocKey().
- Parameters:
device – device
entry – name of the property
headstage – number of headstage, must be
NaN
for unassociated channelschannelNumber – number of the channel
channelType – type of the channel
var – [optional] numeric value
str – [optional] string value
-
static variable DC_ITC_MakeTTLWave(string device, DataConfigurationResult *s)¶
Combines the TTL stimulus sweeps across different TTL channels into a single wave.
- Parameters:
device – panel title
s – DataConfigurationResult structure
-
static variable DC_NI_MakeTTLWave(string device, DataConfigurationResult *s)¶
-
static std::tuple<variable, variable> DC_CalculateChannelColumnNo(string device, string setName, variable channelNo, variable channelType)¶
Returns column number/step of the stimulus set, independent of the times the set is being cycled through (as defined by SetVar_DataAcq_SetRepeats)
- Parameters:
device – panel title
setName – name of the stimulus set
channelNo – channel number
channelType – channel type, one of CHANNEL_TYPE_DAC or CHANNEL_TYPE_TTL
- Return values:
column – stimset column
setCycleCount – set cycle count
-
static variable DC_ReturnTotalLengthIncrease(DataConfigurationResult *s)¶
Returns the length increase of the DAQDataWave following onset/termination delay insertion and distributed data aquisition. Does not incorporate adaptations for oodDAQ.
All returned values are in number of points, not in time.
-
static variable DC_GetStopCollectionPoint(string device, DataConfigurationResult *s)¶
Calculate the stop collection point, includes all required global adjustments.
-
variable DC_GotTPChannelWhileDAQ(string device)¶
Returns 1 if a channel is set to TP, the check is through the stimset name from the GUI.
-
variable DC_GetChannelTypefromHS(string device, variable headstage)¶
Get the channel type of given headstage.
- Parameters:
device – panel title
headstage – head stage
- Returns:
One of DaqChannelTypeConstants