@@ -982,14 +982,15 @@ static Function/WAVE PSX_CreateOverrideResults(variable numEvents, WAVE/T combos
982982End
983983
984984/// @return 0 on success, 1 otherwise
985- static Function PSX_OperationSweepGathering ( string graph, WAVE /WAVE psxKernelDataset, variable parameterJsonID, WAVE sweepFilter, WAVE deconvFilter, variable index , WAVE /WAVE output)
985+ static Function PSX_OperationSweepGathering ( string graph, WAVE /WAVE psxKernelDataset, variable parameterJsonID, WAVE sweepFilter, WAVE deconvFilter, variable readIndex, variable writeIndex , WAVE /WAVE output)
986986
987987 string key, comboKey, psxParametersAnalyzePeaks, cacheKey
988+ variable realOrderSweep, realOrderDeconv
988989
989- key = PSX_GenerateKey ( "psxKernelFFT" , index )
990+ key = PSX_GenerateKey ( "psxKernelFFT" , readIndex )
990991 WAVE psxKernelFFT = psxKernelDataset[ %$ key]
991992
992- key = PSX_GenerateKey ( "sweepData" , index )
993+ key = PSX_GenerateKey ( "sweepData" , readIndex )
993994 WAVE sweepData = psxKernelDataset[ %$ key]
994995
995996 [ WAVE selectData, WAVE range] = SFH_ParseToSelectDataWaveAndRange ( sweepData)
@@ -1027,13 +1028,13 @@ static Function PSX_OperationSweepGathering(string graph, WAVE/WAVE psxKernelDat
10271028 endif
10281029 endif
10291030
1030- key = PSX_GenerateKey ( "sweepData" , index )
1031+ key = PSX_GenerateKey ( "sweepData" , writeIndex )
10311032 output[ %$ key] = sweepData
10321033
1033- key = PSX_GenerateKey ( "sweepDataOffFilt" , index )
1034+ key = PSX_GenerateKey ( "sweepDataOffFilt" , writeIndex )
10341035 output[ %$ key] = sweepDataOffFilt
10351036
1036- key = PSX_GenerateKey ( "sweepDataOffFiltDeconv" , index )
1037+ key = PSX_GenerateKey ( "sweepDataOffFiltDeconv" , writeIndex )
10371038 output[ %$ key] = sweepDataOffFiltDeconv
10381039
10391040 return 0
@@ -4959,8 +4960,8 @@ End
49594960// psx(id, [psxKernel(...), numSDs, psxSweepBPFilter(...), maxTauFactor, psxRiseTime(...), psxDeconvBPFilter(...)])
49604961Function /WAVE PSX_Operation ( variable jsonId, string jsonPath, string graph)
49614962
4962- variable numberOfSDs, parameterJsonID, numCombos, i , addedData, kernelAmp
4963- variable maxTauFactor, peakThresh, idx , success, kernelRiseTau, kernelDecayTau
4963+ variable numberOfSDs, parameterJsonID, numCombos, i , readIndex , writeIndex , addedData, kernelAmp
4964+ variable maxTauFactor, peakThresh, success, kernelRiseTau, kernelDecayTau
49644965 string parameterPath, id, psxParameters, dataUnit, path
49654966
49664967 id = SFH_GetArgumentAsText ( jsonID, jsonPath, graph, SF_OP_PSX, 0, checkFunc = IsValidObjectName)
@@ -5017,11 +5018,12 @@ Function/WAVE PSX_Operation(variable jsonId, string jsonPath, string graph)
50175018 PSX_OperationSetDimensionLabels ( output, numCombos, labels, labelsTemplate)
50185019
50195020 for ( i = 0; i < numCombos; i += 1 )
5020- success = ! PSX_OperationSweepGathering ( graph, psxKernelDataset, parameterJsonID, sweepFilter, deconvFilter, idx, output)
5021- idx += success
5021+ readIndex = i
5022+ success = ! PSX_OperationSweepGathering ( graph, psxKernelDataset, parameterJsonID, sweepFilter, deconvFilter, readIndex, writeIndex, output)
5023+ writeIndex += success
50225024 endfor
50235025
5024- numCombos = idx
5026+ numCombos = writeIndex
50255027
50265028 if ( numCombos == 0 )
50275029 Abort
0 commit comments