Skip to content

Commit 76e5c13

Browse files
committed
PSQ_DS_AdaptiveIsFinished: Handle oorDAScale case earlier
In that way this is not dead code in the tests. It is also clearer that we check this error condition first.
1 parent 2cfffbe commit 76e5c13

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3001,6 +3001,13 @@ static Function PSQ_DS_AdaptiveIsFinished(string device, variable sweepNo, varia
30013001
WAVE numericalValues = GetLBNumericalValues(device)
30023002
WAVE textualValues = GetLBTextualValues(device)
30033003

3004+
key = CreateAnaFuncLBNKey(PSQ_DA_SCALE, PSQ_FMT_LBN_DASCALE_OOR, query = 1)
3005+
WAVE/Z oorDAScale = GetLastSetting(numericalValues, sweepNo, key, UNKNOWN_MODE)
3006+
3007+
if(WaveExists(oorDAScale) && oorDAScale[headstage])
3008+
return 0
3009+
endif
3010+
30043011
if(!fromRhSuAd)
30053012
key = CreateAnaFuncLBNKey(PSQ_DA_SCALE, PSQ_FMT_LBN_DA_AT_FUTURE_DASCALES_PASS, query = 1)
30063013
measuredAllFutureDAScales = GetLastSettingIndep(numericalValues, sweepNo, key, UNKNOWN_MODE)
@@ -3020,13 +3027,6 @@ static Function PSQ_DS_AdaptiveIsFinished(string device, variable sweepNo, varia
30203027
endif
30213028
endif
30223029

3023-
key = CreateAnaFuncLBNKey(PSQ_DA_SCALE, PSQ_FMT_LBN_DASCALE_OOR, query = 1)
3024-
WAVE/Z oorDAScale = GetLastSetting(numericalValues, sweepNo, key, UNKNOWN_MODE)
3025-
3026-
if(WaveExists(oorDAScale) && oorDAScale[headstage])
3027-
return 0
3028-
endif
3029-
30303030
[WAVE sweepPassed, emptySCI] = PSQ_DS_GetLabnotebookData(numericalValues, textualValues, sweepNo, headstage, PSQ_DS_SWEEP_PASS, fromRhSuAd = fromRhSuAd)
30313031

30323032
if(DimSize(sweepPassed, ROWS) < numSweepsWithSaturation)

0 commit comments

Comments
 (0)