diff --git a/Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf b/Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf index 771219c257..fb0430735b 100644 --- a/Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf +++ b/Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf @@ -2239,7 +2239,7 @@ static Function [WAVE/D fitOffset, WAVE/D fitSlope, string errMsg] PSQ_DS_FitFre apfreqFinal[] = apfreqFiltered[V_Value - PSQ_DA_NUM_POINTS_LINE_FIT + 1 + p] DAScalesFinal[] = DAScalesFiltered[V_Value - PSQ_DA_NUM_POINTS_LINE_FIT + 1 + p] else - WAVE apfreqFinal = apfreqFiltered + WAVE apfreqFinal = apfreqFiltered WAVE DAScalesFinal = DAScalesFiltered endif WAVEClear DAScalesFiltered, apfreqFiltered @@ -3182,29 +3182,29 @@ static Function PSQ_DS_AddDAScaleFillinBetweenPosAndNegSlope(string device, vari WAVE textualValues = GetLBTextualValues(device) [WAVE negSlopePassed, emptySCI] = PSQ_DS_GetLabnotebookData(numericalValues, textualValues, sweepNo, headstage, PSQ_DS_FI_NEG_SLOPE_PASS, fromRhSuAd = fromRhSuAd) - [WAVE DAScale, emptySCI] = PSQ_DS_GetLabnotebookData(numericalValues, textualValues, sweepNo, headstage, PSQ_DS_DASCALE, fromRhSuAd = fromRhSuAd) + [WAVE DAScale, emptySCI] = PSQ_DS_GetLabnotebookData(numericalValues, textualValues, sweepNo, headstage, PSQ_DS_DASCALE, fromRhSuAd = fromRhSuAd) -// [WAVE fitSlope, emptySCI] = PSQ_DS_GetLabnotebookData(numericalValues, textualValues, sweepNo, headstage, PSQ_DS_FI_SLOPE, fromRhSuAd = fromRhSuAd) + // [WAVE fitSlope, emptySCI] = PSQ_DS_GetLabnotebookData(numericalValues, textualValues, sweepNo, headstage, PSQ_DS_FI_SLOPE, fromRhSuAd = fromRhSuAd) numEntries = DimSize(DAScale, ROWS) - ASSERT(numEntries == (DimSize(negSlopePassed, ROWS) + 1) , "Non-matching negSlopePassedAll and DAScale waves") + ASSERT(numEntries == (DimSize(negSlopePassed, ROWS) + 1), "Non-matching negSlopePassedAll and DAScale waves") FindValue/R/V=(0) negSlopePassed if(V_Value >= 0) - centerDAScale = round((DAScale[V_Value] + DAScale[V_Value + 1]) / 2) + centerDAScale = round((DAScale[V_Value] + DAScale[V_Value + 1]) / 2) endif -// for(i = numEntries - 1; i >= 0; i += 1) -// endfor + // for(i = numEntries - 1; i >= 0; i += 1) + // endfor -// numFitSlopes = DimSize(fitSlope, ROWS) -// for(i = numFitSlopes - 1; i >= 1; i -= 1) -// if(IsFinite(fitSlope[i - 1]) \ -// && IsFinite(fitSlope[i]) \ -// && (sign(fitSlope[i + 1]) != sign(fitSlope[i]))) -// centerDAScale = round((DAScale[i] + DAScale[i + 1]) / 2) -// endif -// endfor + // numFitSlopes = DimSize(fitSlope, ROWS) + // for(i = numFitSlopes - 1; i >= 1; i -= 1) + // if(IsFinite(fitSlope[i - 1]) \ + // && IsFinite(fitSlope[i]) \ + // && (sign(fitSlope[i + 1]) != sign(fitSlope[i]))) + // centerDAScale = round((DAScale[i] + DAScale[i + 1]) / 2) + // endif + // endfor #ifdef DEBUGGING_ENABLED sprintf msg, "centerDAScale %g: DAScales=%s; fitSlopes=%s", centerDAScale, NumericWaveToList(DAScale, ", ", trailSep = 0), NumericWaveToList(negSlopePassed, ", ", trailSep = 0) diff --git a/Packages/tests/HardwareAnalysisFunctions/UTF_PatchSeqDAScale_Adapt.ipf b/Packages/tests/HardwareAnalysisFunctions/UTF_PatchSeqDAScale_Adapt.ipf index 7bf6210aa5..7e89b56d44 100644 --- a/Packages/tests/HardwareAnalysisFunctions/UTF_PatchSeqDAScale_Adapt.ipf +++ b/Packages/tests/HardwareAnalysisFunctions/UTF_PatchSeqDAScale_Adapt.ipf @@ -2123,10 +2123,10 @@ static Function PS_DS_AD12([string str]) wv[][0][%APFrequency] = 25 wv[][1][%APFrequency] = 21 // future DAScale (8.4) wv[][2][%APFrequency] = 21 // redoing future DAScale (8.4), passed f-I slope QC (1.) and got another future DAScale 5.95 - wv[][3][%APFrequency] = 21.1 // - wv[][4][%APFrequency] = 15 // - wv[][5][%APFrequency] = 10 // - wv[][6][%APFrequency] = 16 // + wv[][3][%APFrequency] = 21.1 // + wv[][4][%APFrequency] = 15 // + wv[][5][%APFrequency] = 10 // + wv[][6][%APFrequency] = 16 // wv[][][%AsyncQC] = 1 wv[][][%BaselineQC] = 1 @@ -2178,14 +2178,14 @@ static Function PS_DS_AD12_REENTRY([string str]) Make/FREE/D maxSlopeRef = {3.142857142857143e-10, 3.142857142857143e-10, 3.142857142857143e-10, 3.142857142857143e-10, 3.142857142857143e-10, 3.142857142857143e-10, 3.142857142857143e-10} Make/FREE/D fiSlopeRef = {3.142857142857143e-10, 3.142857142857143e-10, -2e-10, 2.84e-10, -1.2e-10, -1.666666666666667e-10, -9e-10} Make/FREE/D fiOffsetRef = {3, 3, 39, 4.060000000000002, 31.8, 38.33333333333334, 88} - Make/FREE/T futureDAScalesRef = {"RegRhSuAd:7;Reg:9;", \ - "RegRhSuAd:7;Reg:9;", \ - "RegRhSuAd:7;Reg:9;Fillin:6;", \ - "RegRhSuAd:7;Reg:9;Fillin:6;RegPosNegSlope:14;", \ - "RegRhSuAd:7;Reg:9;Fillin:6;RegPosNegSlope:14;RegPosNegSlope:17;", \ -"RegRhSuAd:7;Reg:9;Fillin:6;RegPosNegSlope:14;RegPosNegSlope:17;FillinPosNegSlope:8;", \ -"RegRhSuAd:7;Reg:9;Fillin:6;RegPosNegSlope:14;RegPosNegSlope:17;FillinPosNegSlope:8;"} - + Make/FREE/T futureDAScalesRef = {"RegRhSuAd:7;Reg:9;", \ + "RegRhSuAd:7;Reg:9;", \ + "RegRhSuAd:7;Reg:9;Fillin:6;", \ + "RegRhSuAd:7;Reg:9;Fillin:6;RegPosNegSlope:14;", \ + "RegRhSuAd:7;Reg:9;Fillin:6;RegPosNegSlope:14;RegPosNegSlope:17;", \ + "RegRhSuAd:7;Reg:9;Fillin:6;RegPosNegSlope:14;RegPosNegSlope:17;FillinPosNegSlope:8;", \ + "RegRhSuAd:7;Reg:9;Fillin:6;RegPosNegSlope:14;RegPosNegSlope:17;FillinPosNegSlope:8;"} + Make/FREE/D fiSlopesFromRhSuAdRef = {2e-10, 2e-10, 1e-10} Make/FREE/D fiOffsetsFromRhSuAdRef = {8, 8, 10.5} Make/FREE/D DAScalesRef = {7, 9, 9, 6, 14, 17, 8} @@ -2200,8 +2200,6 @@ static Function PS_DS_AD12_REENTRY([string str]) CHECK_EQUAL_WAVES(entries[%oorDAScale], {0, 0, 0, 0, 0, 0, NaN}, mode = WAVE_DATA) - printsomeValues(entries) - CommonAnalysisFunctionChecks(str, sweepNo, entries[%setPass]) CheckSurveyPlot(str, entries) End