Skip to content

Commit

Permalink
Merge pull request #2050 from AllenInstitute/bugfix/2050-fix_abloadwave
Browse files Browse the repository at this point in the history
AB: bugfix AB_LoadWave does not retrieve wave from the correct DF
  • Loading branch information
t-b authored Mar 13, 2024
2 parents f99b9c6 + e8d454c commit 55ca3c1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
3 changes: 1 addition & 2 deletions Packages/MIES/MIES_AnalysisBrowser.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -2472,8 +2472,7 @@ static Function AB_LoadWave(expFilePath, fullPath, overwrite)
return 1
endif

WAVE wv = $(GetIndexedObjNameDFR(newDFR, 1, 0))
SetDataFolder root:
WAVE/SDFR=newDFR wv = $(GetIndexedObjNameDFR(newDFR, 1, 0))
createDFWithAllParents(dataFolder)
MoveWave wv, $fullPath

Expand Down
25 changes: 25 additions & 0 deletions Packages/tests/Basic/UTF_AnalysisBrowserTest.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,28 @@ static Function TestAB_LoadDataWrapper()
numLoaded = MIES_AB#AB_LoadDataWrapper(tmpDFR, expFilePath, "root:", wName, typeFlags=COUNTOBJECTS_WAVES)
CHECK_GT_VAR(numLoaded, 0)
End

static Function TestABLoadWave()

variable err
string expFilePath
string expName = "TestAB_LoadWave.pxp"
string wName = "wAvE1"

WAVE/Z wv = root:$wName
KillOrMoveToTrash(wv=wv)

Make root:$wName/WAVE=wv
SaveExperiment/P=home as expName

KillOrMoveToTrash(wv=wv)

PathInfo home
expFilePath = S_path + expName
err = MIES_AB#AB_LoadWave(expFilePath, "root:" + wName, 1)
CHECK_EQUAL_VAR(err, 0)

WAVE/Z wv = root:$wName
CHECK_WAVE(wv, NUMERIC_WAVE)

End

0 comments on commit 55ca3c1

Please sign in to comment.