Skip to content

Commit

Permalink
Merge pull request #2348 from AllenInstitute/bugfix/2348-non-existing…
Browse files Browse the repository at this point in the history
…-sweep-data-in-tp

SF_OperationTPIterate: Handle non-existing sweep data
  • Loading branch information
t-b authored Feb 12, 2025
2 parents 2e1ca7a + e6b5497 commit fdad71e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Packages/MIES/MIES_SweepFormula.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -3219,8 +3219,8 @@ static Function/WAVE SF_OperationTPIterate(string graph, WAVE/WAVE mode, WAVE/Z/
continue
endif

WAVE/Z selectData = selectDataComp[%SELECTION]
WAVE/WAVE sweepData = SF_OperationTPImpl(graph, mode, selectData, ignoreTPs, opShort)
WAVE/Z selectData = selectDataComp[%SELECTION]
WAVE/Z/WAVE sweepData = SF_OperationTPImpl(graph, mode, selectData, ignoreTPs, opShort)
if(!WaveExists(sweepData))
continue
endif
Expand Down
12 changes: 12 additions & 0 deletions Packages/tests/Basic/UTF_SweepFormula_Operations.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,18 @@ static Function CheckTPFitResult(WAVE/WAVE wv, string fit, string result, variab
CHECK_EQUAL_VAR(trailLength, maxlength)
End

static Function TestOperationTP()

string win, formula

win = GetDataBrowserWithData()

formula = "tp(tpfit(exp, amp), select(selvis(all), selsweeps(1000)))"
WAVE/Z/WAVE output = SF_ExecuteFormula(formula, win, useVariables = 0)
CHECK_WAVE(output, WAVE_WAVE)
CHECK_EQUAL_VAR(DimSize(output, ROWS), 0)
End

static Function TestOperationTPfit()

string formula, strRef, dataType, dataTypeRef
Expand Down

0 comments on commit fdad71e

Please sign in to comment.