Menu "Export all stimsets into NWB" does not export dependent formula stimsets
Closed this issue · 1 comments
If a stimset is created with the combine epoch that depends on a source stimset for the formula, then the source stimset is not saved.
This breaks the stimset with the combine epoch because it can not be recreated without the missing stimset.
This problem applies also to "Export all data into NWB"
"Export all stimsets" is implemented in NWB_ExportAllStimsets
, and this function is getting the list of all stimsets and exporting that. From a look at the code I fail to see how this does not work.
"Export all data into NWB" should also work.
Both rely on the fix for #2044.
A related bug could be in NWB_AppendStimset. From looking at the code I think we would want to do
diff --git a/Packages/MIES/MIES_NeuroDataWithoutBorders.ipf b/Packages/MIES/MIES_NeuroDataWithoutBorders.ipf
index 4ed50db53..98af00433 100644
--- a/Packages/MIES/MIES_NeuroDataWithoutBorders.ipf
+++ b/Packages/MIES/MIES_NeuroDataWithoutBorders.ipf
@@ -885,8 +885,6 @@ static Function NWB_AppendStimset(nwbVersion, locationID, stimsets, compressionM
AddModificationTimeEntry(locationID, nwbVersion)
- WAVE/WAVE customWaves = WB_CustomWavesFromStimSet(stimsets)
-
// process stimsets and dependent stimsets
stimsets = WB_StimsetRecursionForList(stimsets)
numStimsets = ItemsInList(stimsets)
@@ -894,6 +892,8 @@ static Function NWB_AppendStimset(nwbVersion, locationID, stimsets, compressionM
NWB_WriteStimsetTemplateWaves(nwbVersion, locationID, StringFromList(i, stimsets), customWaves, compressionMode)
endfor
+ WAVE/WAVE customWaves = WB_CustomWavesFromStimSet(stimsets)
+
// process custom waves
numWaves = DimSize(customWaves, ROWS)
for(i = 0; i < numWaves; i += 1)
as that would gather the custom waves after doing simset recursion. We might therefore currently fail to save custom waves from custom stimsets only referenced from combine stimsets.