Skip to content

Commit

Permalink
PSQ_GetSweepFormulaResultWave: Support multiple sweeps stored
Browse files Browse the repository at this point in the history
We do check that the data was stored with the correct sweep by peeking
into the returned sweeps from the `select` statement, see
SFH_CreateResultsWaveWithCode.

But if overlay sweeps is turned on in the databrowser we have multiple
sweeps displayed, so we need to check all listed sweeps.
  • Loading branch information
t-b committed Dec 12, 2023
1 parent 30cfe78 commit b90586f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -6039,9 +6039,10 @@ static Function/WAVE PSQ_GetSweepFormulaResultWave(WAVE/T textualResultsValues,

valueStr = GetLastSettingTextIndep(textualResultsValues, NaN, key, SWEEP_FORMULA_RESULT)
sweepChannelStr = GetLastSettingTextIndep(textualResultsValues, NaN, "Sweep Formula sweeps/channels", SWEEP_FORMULA_RESULT)
refSweep = str2num(StringFromList(0, sweepChannelStr))
WAVE/T sweepChannelInfoText = ListToTextWaveMD(sweepChannelStr, 2, rowSep = ",", colSep = ";")
Make/FREE/N=(DimSize(sweepChannelInfoText, ROWS)) sweeps = str2num(sweepChannelInfoText[p][0])

if(IsEmpty(valueStr) || !EqualValuesOrBothNaN(refSweep, sweepNo))
if(IsEmpty(valueStr) || IsNaN(GetRowIndex(sweeps, val = sweepNo)))
// no value for the current sweep
return $""
endif
Expand Down

0 comments on commit b90586f

Please sign in to comment.