Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
t-b committed Mar 26, 2024
1 parent 33e0505 commit e27b767
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions Packages/MIES/MIES_SweepFormula.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -4574,14 +4574,11 @@ End

static Function/WAVE SF_OperationAnaFuncParamImplAllNames(WAVE/T names, WAVE/WAVE allParams)

variable i, numParams, gatherAllNames
string params
variable i, numParams, gatherAllNames, j, numNames
string params, name, gatheredNames, namesPerParam

numParams = DimSize(allParams, ROWS)

if(DimSize(names, ROWS) == 1 && !cmpstr(names[0], "*"))
gatherAllNames = 1
endif
numNames = DimSize(names, ROWS)

Make/FREE/N=0/T allNames

Expand All @@ -4590,19 +4587,21 @@ static Function/WAVE SF_OperationAnaFuncParamImplAllNames(WAVE/T names, WAVE/WAV
WAVE/T paramsSingle = allParams[i]
params = JWN_GetStringFromWaveNote(paramsSingle, SF_META_TAG_TEXT)

WAVE/T gatheredNames = ListToTextWave(AFH_GetListOfAnalysisParamNames(params), ";")
gatheredNames = AFH_GetListOfAnalysisParamNames(params)

if(gatherAllNames)
WAVE/T namesPerParam = gatheredNames
else
WAVE/T/Z namesPerParam = GetSetIntersection(names, gatheredNames)
endif

if(!WaveExists(namesPerParam))
continue
endif
for(j = 0; j < numNames; j += 1)
name = names[j]

Concatenate/NP=(ROWS)/T {namesPerParam}, allNames
namesPerParam = ListMatch(gatheredNames, name)

if(IsEmpty(namesPerParam))
continue
endif

WAVE wv = ListToTextWave(namesPerParam, ";")

Concatenate/NP=(ROWS)/T {wv}, allNames
endfor
endfor

if(DimSize(allNames, ROWS) == 0)
Expand Down

0 comments on commit e27b767

Please sign in to comment.