|
389 | 389 | /// @sa AddEntryIntoWaveNoteAsList() |
390 | 390 | Function HasEntryInWaveNoteList(WAVE wv, string key, string value) |
391 | 391 |
|
392 | | - return GrepString(note(wv), "\\Q" + key + "\\E\\s*=\\s*\\Q" + value + "\\E\\s*;") |
| 392 | + string wvNote = note(wv) |
| 393 | + |
| 394 | + if(IsEmpty(value)) |
| 395 | + return GrepString(wvNote, "\\Q" + key + "\\E\\s*;") |
| 396 | + endif |
| 397 | + |
| 398 | + return GrepString(wvNote, "\\Q" + key + "\\E\\s*=\\s*\\Q" + value + "\\E\\s*;") |
393 | 399 | End |
394 | 400 |
|
395 | 401 | /// @brief Returns a wave name not used in the given datafolder |
@@ -857,7 +863,7 @@ Function [WAVE/T withSuffix, WAVE/T woSuffix] SplitTextWaveBySuffix(WAVE/T sourc |
857 | 863 |
|
858 | 864 | variable i, numElems |
859 | 865 |
|
860 | | - if(IsNull(suffix)) |
| 866 | + if(IsEmpty(suffix)) |
861 | 867 | Make/FREE/T woSuffix = {""} |
862 | 868 | return [source, woSuffix] |
863 | 869 | endif |
@@ -1216,12 +1222,16 @@ End |
1216 | 1222 | /// @returns wave reference to the permanent wave |
1217 | 1223 | Function/WAVE ConvertFreeWaveToPermanent(WAVE freeWave, DFREF dfr, string wName) |
1218 | 1224 |
|
| 1225 | + ASSERT(!IsFreeDatafolder(dfr), "dfr must be a global datafolder") |
| 1226 | + |
1219 | 1227 | Duplicate/O freeWave, dfr:$wName/WAVE=permWave |
1220 | 1228 | return permWave |
1221 | 1229 | End |
1222 | 1230 |
|
1223 | 1231 | Function/WAVE MoveFreeWaveToPermanent(WAVE freeWave, DFREF dfr, string wvName) |
1224 | 1232 |
|
| 1233 | + ASSERT(!IsFreeDatafolder(dfr), "dfr must be a global datafolder") |
| 1234 | + |
1225 | 1235 | wvName = UniqueWaveName(dfr, wvName) |
1226 | 1236 | MoveWave freeWave, dfr:$wvName |
1227 | 1237 | WAVE/SDFR=dfr permWave = $wvName |
|
0 commit comments