Skip to content

Commit

Permalink
EP: Remove unnecessary code in EP_GetEpochs
Browse files Browse the repository at this point in the history
- EP_FetchEpochs always returns a single channel epochs wave,
  thus, not Duplicate to create a single channel wave is required.

No functional change
  • Loading branch information
MichaelHuth committed Jul 27, 2023
1 parent 764d2b0 commit 1f8ca0c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Packages/MIES/MIES_Epochs.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -926,14 +926,12 @@ Function/WAVE EP_GetEpochs(WAVE numericalValues, WAVE textualValues, variable sw
endif

if(!midsweep)
WAVE/T/Z epochInfo = EP_FetchEpochs(numericalValues, textualValues, sweepNo, channelNumber, channelType)

if(!WaveExists(epochInfo))
WAVE/T/Z epochInfoChannel = EP_FetchEpochs(numericalValues, textualValues, sweepNo, channelNumber, channelType)
if(!WaveExists(epochInfoChannel))
return $""
endif

Duplicate/FREE/T/RMD=[][][][channelType] epochInfo, epochInfoChannel
epochCnt = DimSize(epochInfo, ROWS)
epochCnt = DimSize(epochInfoChannel, ROWS)
else
epochCnt = EP_GetEpochCount(epochsWave, channelNumber, channelType)

Expand Down

0 comments on commit 1f8ca0c

Please sign in to comment.