Skip to content

Commit

Permalink
Getters: Cleanup of GetTPStorage wave upgrade
Browse files Browse the repository at this point in the history
- The various wave upgrade steps to the last version are consecutive
  and could be wrapped in a single upgrade step
- Use FastOp for filling on creation
  • Loading branch information
MichaelHuth committed Sep 3, 2024
1 parent 5571774 commit 31d1771
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions Packages/MIES/MIES_WaveDataFolderGetters.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -3031,27 +3031,14 @@ Function/WAVE GetTPStorage(device)
elseif(WaveExists(wv))
Redimension/N=(-1, NUM_HEADSTAGES, 31)/D wv

if(WaveVersionIsSmaller(wv, 10))
wv[][][17] = NaN
wv[][][20, 21] = NaN
endif
if(WaveVersionIsSmaller(wv, 11))
wv[][][22] = NaN
endif
// no size change on version 12
if(WaveVersionIsSmaller(wv, 13))
wv[][][23] = NaN
endif
if(WaveVersionIsSmaller(wv, 14))
wv[][][24] = NaN
endif
if(WaveVersionIsSmaller(wv, 15))
wv[][][25, 30] = NaN
wv[][][17] = NaN
wv[][][20, 30] = NaN
endif
else
Make/N=(MINIMUM_WAVE_SIZE_LARGE, NUM_HEADSTAGES, 31)/D dfr:TPStorage/WAVE=wv

wv = NaN
FastOp wv = (NaN)

SetNumberInWaveNote(wv, NOTE_INDEX, 0)
endif
Expand Down

0 comments on commit 31d1771

Please sign in to comment.