Skip to content

Commit

Permalink
UTF_TestNWBExportV2.ipf/TestTimeSeries: Check TTL epochs
Browse files Browse the repository at this point in the history
Forgotten in e55bb43 (EP: Add function EP_CollectEpochInfoTTL that
creates epochs for TTL channels, 2023-06-22).
  • Loading branch information
t-b committed Jul 14, 2023
1 parent 9308323 commit 4dcb4db
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions Packages/tests/UTF_TestNWBExportV2.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -518,26 +518,27 @@ static Function TestTimeSeries(fileID, filepath, device, groupID, channel, sweep
FAIL()
endif

// epochs
// @todo TTL support
if(params.channelType == XOP_CHANNEL_TYPE_DAC && clampMode != I_EQUAL_ZERO_MODE)
// introduced in 18e1406b (Labnotebook: Add DA/AD ChannelType, 2019-02-15)
[WAVE setting, index] = GetLastSettingChannel(numericalValues, $"", sweep, "DA ChannelType", params.channelNumber, params.channelType, DATA_ACQUISITION_MODE)

// introduced in 18e1406b (Labnotebook: Add DA/AD ChannelType, 2019-02-15)
[WAVE setting, index] = GetLastSettingChannel(numericalValues, $"", sweep, "DA ChannelType", params.channelNumber, params.channelType, DATA_ACQUISITION_MODE)
// epochs
if(((params.channelType == XOP_CHANNEL_TYPE_DAC \
&& clampMode != I_EQUAL_ZERO_MODE \
&& WaveExists(setting) \
&& setting[index] == DAQ_CHANNEL_TYPE_DAQ)) \
|| params.channelType == XOP_CHANNEL_TYPE_TTL)

if(WaveExists(setting) && setting[index] == DAQ_CHANNEL_TYPE_DAQ)
CHECK_WAVE(epochs, WAVE_WAVE)
CHECK_WAVE(epochs, WAVE_WAVE)

idx = FindDimlabel(epochs, ROWS, channel)
CHECK_GE_VAR(idx, 0)
idx = FindDimlabel(epochs, ROWS, channel)
CHECK_GE_VAR(idx, 0)

WAVE/T/Z epochsSingleChannel = WaveRef(epochs, row=idx)
CHECK_WAVE(epochsSingleChannel, TEXT_WAVE)
WAVE/T/Z epochsSingleChannel = WaveRef(epochs, row=idx)
CHECK_WAVE(epochsSingleChannel, TEXT_WAVE)

WAVE/Z epochsLBN = EP_FetchEpochs(numericalValues, textualValues, sweep, params.channelNumber, params.channelType)
CHECK_WAVE(epochsLBN, TEXT_WAVE)
CHECK_EQUAL_TEXTWAVES(epochsLBN, epochsSingleChannel)
endif
WAVE/Z epochsLBN = EP_FetchEpochs(numericalValues, textualValues, sweep, params.channelNumber, params.channelType)
CHECK_WAVE(epochsLBN, TEXT_WAVE)
CHECK_EQUAL_TEXTWAVES(epochsLBN, epochsSingleChannel)
endif
End

Expand Down

0 comments on commit 4dcb4db

Please sign in to comment.