Skip to content

Commit cd41b0b

Browse files
MichaelHutht-b
authored andcommitted
LBN: Do labnotebook upgrade on most common MIES entry points
When loading experiments, possibly old experiments the data structures might be present in an old version. These need to be upgraded before used by the current code. The points where the LBN wave is upgraded are: - opening the Data Browser - Locking a device in the DAEphys panel - NWB Export At these locations the LBN upgrade for values and keys waves were added through the common function UpgradeLabNotebook.
1 parent 473d7e2 commit cd41b0b

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

Packages/MIES/MIES_DAEphys.ipf

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4601,11 +4601,7 @@ Function DAP_LockDevice(string win)
46014601
headstage = GetSliderPositionIndex(deviceLocked, "slider_DataAcq_ActiveHeadstage")
46024602
P_SaveUserSelectedHeadstage(deviceLocked, headstage)
46034603

4604-
// upgrade all four labnotebook waves in wanna-be atomic way
4605-
GetLBNumericalKeys(deviceLocked)
4606-
GetLBNumericalValues(deviceLocked)
4607-
GetLBTextualKeys(deviceLocked)
4608-
GetLBTextualValues(deviceLocked)
4604+
UpgradeLabNotebook(deviceLocked)
46094605

46104606
NVAR sessionStartTime = $GetSessionStartTime()
46114607
sessionStartTime = DateTimeInUTC()

Packages/MIES/MIES_DataBrowser.ipf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,9 +421,7 @@ Function DB_UpdateSweepPlot(string win)
421421
return NaN
422422
endif
423423

424-
// fetch keys waves to trigger a potential labnotebook upgrade
425-
WAVE numericalKeys = DB_GetLBNWave(win, LBN_NUMERICAL_KEYS)
426-
WAVE textualKeys = DB_GetLBNWave(win, LBN_TEXTUAL_KEYS)
424+
UpgradeLabNotebook(device)
427425

428426
WAVE numericalValues = DB_GetLBNWave(win, LBN_NUMERICAL_VALUES)
429427
WAVE textualValues = DB_GetLBNWave(win, LBN_TEXTUAL_VALUES)

Packages/MIES/MIES_NeuroDataWithoutBorders.ipf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,8 @@ Function NWB_ExportAllData(variable nwbVersion, [string device, string overrideF
679679

680680
for(device : devicesWithContent)
681681

682+
UpgradeLabNotebook(device)
683+
682684
if(ParamIsDefault(overrideFullFilePath) && ParamIsDefault(overrideFileTemplate))
683685
[locationID, createdNewNWBFile] = NWB_GetFileForExport(nwbVersion, device)
684686
elseif(!ParamIsDefault(overrideFullFilePath))

Packages/MIES/MIES_WaveDataFolderGetters.ipf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1385,7 +1385,7 @@ End
13851385
/// - Making dimension labels valid liberal object names
13861386
/// - Extending the row dimension to 6 for the key waves
13871387
/// - Fixing empty column dimension labels in key waves
1388-
static Function UpgradeLabNotebook(string device)
1388+
Function UpgradeLabNotebook(string device)
13891389

13901390
variable numCols, i, col, numEntries, sourceCol, timeStampColumn, nextFreeRow
13911391
string list, key

0 commit comments

Comments
 (0)