Skip to content

Commit

Permalink
PSQ_CreateOverrideResults: Pass in the operation mode for PSQ_DAScale
Browse files Browse the repository at this point in the history
We want to distinguish the setup of the overrideResults wave per operation
mode for PSQ_DAScale in a future commit.
  • Loading branch information
t-b committed Dec 1, 2023
1 parent cfbd238 commit 4d9c0af
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
7 changes: 6 additions & 1 deletion Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -1141,9 +1141,10 @@ End
/// - 1: RMS long baseline QC
/// - 2: target voltage baseline QC
/// - 3: leak current baseline QC
Function/WAVE PSQ_CreateOverrideResults(device, headstage, type)
Function/WAVE PSQ_CreateOverrideResults(device, headstage, type, [opMode])
string device
variable headstage, type
string opMode

variable DAC, numCols, numRows, numLayers, numChunks
string stimset
Expand All @@ -1154,6 +1155,10 @@ Function/WAVE PSQ_CreateOverrideResults(device, headstage, type)
WAVE/Z stimsetWave = WB_CreateAndGetStimSet(stimset)
ASSERT(WaveExists(stimsetWave), "Stimset does not exist")

if(type == PSQ_DA_SCALE)
ASSERT(!ParamIsDefault(opMode) && PSQ_DS_IsValidMode(opMode), "Expected valid opMode")
endif

switch(type)
case PSQ_RAMP:
case PSQ_RHEOBASE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ static Function PS_DS_Sub1([str])
[STRUCT DAQSettings s] = PS_GetDAQSettings(str)
AcquireData_NG(s, str)

WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE)
WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE, opMode = PSQ_DS_SUB)
// all tests fail
wv = 0
End
Expand Down Expand Up @@ -265,7 +265,7 @@ static Function PS_DS_Sub2([str])
[STRUCT DAQSettings s] = PS_GetDAQSettings(str)
AcquireData_NG(s, str)

WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE)
WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE, opMode = PSQ_DS_SUB)
// only pre pulse chunk pass, async QC passes, others fail
wv[] = 0
wv[0][] = 1
Expand Down Expand Up @@ -464,7 +464,7 @@ static Function PS_DS_Sub3([str])
[STRUCT DAQSettings s] = PS_GetDAQSettings(str)
AcquireData_NG(s, str)

WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE)
WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE, opMode = PSQ_DS_SUB)
// pre pulse chunk pass
// first post pulse chunk pass
// async QC passes
Expand Down Expand Up @@ -639,7 +639,7 @@ static Function PS_DS_Sub4([str])
[STRUCT DAQSettings s] = PS_GetDAQSettings(str)
AcquireData_NG(s, str)

WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE)
WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE, opMode = PSQ_DS_SUB)
// pre pulse chunk pass
// last post pulse chunk pass
// async QC passes
Expand Down Expand Up @@ -859,7 +859,7 @@ static Function PS_DS_Sub5([str])
[STRUCT DAQSettings s] = PS_GetDAQSettings(str)
AcquireData_NG(s, str)

WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE)
WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE, opMode = PSQ_DS_SUB)
// pre pulse chunk fails
// all post pulse chunk pass
// async QC passes
Expand Down Expand Up @@ -1012,7 +1012,7 @@ static Function PS_DS_Sub5a([str])
[STRUCT DAQSettings s] = PS_GetDAQSettings(str)
AcquireData_NG(s, str)

WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE)
WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE, opMode = PSQ_DS_SUB)
// pre pulse chunk fails due to targetV
// all post pulse chunk pass
// async QC passes
Expand Down Expand Up @@ -1165,7 +1165,7 @@ static Function PS_DS_Sub6([str])
[STRUCT DAQSettings s] = PS_GetDAQSettings(str)
AcquireData_NG(s, str)

WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE)
WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE, opMode = PSQ_DS_SUB)
// pre pulse chunk pass
// second post pulse chunk pass
// async QC passes
Expand Down Expand Up @@ -1386,7 +1386,7 @@ static Function PS_DS_Sub7([str])
[STRUCT DAQSettings s] = PS_GetDAQSettings(str)
AcquireData_NG(s, str)

WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE)
WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE, opMode = PSQ_DS_SUB)
// pre pulse chunk pass
// first post pulse chunk pass
// of sweeps 2-6
Expand Down Expand Up @@ -1569,7 +1569,7 @@ static Function PS_DS_Sub8([str])
[STRUCT DAQSettings s] = PS_GetDAQSettings(str)
AcquireData_NG(s, str)

WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE)
WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE, opMode = PSQ_DS_SUB)
// pre pulse chunk pass
// first post pulse chunk pass
// of sweep 0, 3, 6, 7 , 8
Expand Down Expand Up @@ -1768,7 +1768,7 @@ static Function PS_DS_Sub9([str])
[STRUCT DAQSettings s] = PS_GetDAQSettings(str)
AcquireData_NG(s, str)

WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE)
WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE, opMode = PSQ_DS_SUB)
// all tests fail
wv = 0
End
Expand Down Expand Up @@ -1921,7 +1921,7 @@ static Function PS_DS_Sub10([str])
[STRUCT DAQSettings s] = PS_GetDAQSettings(str)
AcquireData_NG(s, str)

WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE)
WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE, opMode = PSQ_DS_SUB)
// pre pulse chunk pass
// first post pulse chunk pass
// async QC passes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static Function PS_DS_Supra1([str])
[STRUCT DAQSettings s] = PS_GetDAQSettings(str, "PSQ_DaScale_Supr_DA_0")
AcquireData_NG(s, str)

WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE)
WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE, opMode = PSQ_DS_SUPRA)
// pre pulse chunk pass
// second post pulse chunk pass
wv = 0
Expand Down Expand Up @@ -202,7 +202,7 @@ static Function PS_DS_Supra2([str])
[STRUCT DAQSettings s] = PS_GetDAQSettings(str, "PSQ_DaScale_Supr_DA_0")
AcquireData_NG(s, str)

WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE)
WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE, opMode = PSQ_DS_SUPRA)
// pre pulse chunk pass
// second post pulse chunk pass
wv = 0
Expand Down Expand Up @@ -297,7 +297,7 @@ static Function PS_DS_Supra3([str])
[STRUCT DAQSettings s] = PS_GetDAQSettings(str, "PSQ_DS_SupraLong_DA_0")
AcquireData_NG(s, str)

WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE)
WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE, opMode = PSQ_DS_SUPRA)
// pre pulse chunk pass
// second post pulse chunk pass
wv = 0
Expand Down Expand Up @@ -392,7 +392,7 @@ static Function PS_DS_Supra4([str])
[STRUCT DAQSettings s] = PS_GetDAQSettings(str, "PSQ_DS_SupraLong_DA_0")
AcquireData_NG(s, str)

WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE)
WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE, opMode = PSQ_DS_SUPRA)
// pre pulse chunk pass
// second post pulse chunk pass
wv = 0
Expand Down Expand Up @@ -491,7 +491,7 @@ static Function PS_DS_Supra5([str])
[STRUCT DAQSettings s] = PS_GetDAQSettings(str, "PSQ_DS_SupraLong_DA_0")
AcquireData_NG(s, str)

WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE)
WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE, opMode = PSQ_DS_SUPRA)
// pre pulse chunk pass
// second post pulse chunk pass
wv = 0
Expand Down Expand Up @@ -601,7 +601,7 @@ static Function PS_DS_Supra6([str])
[STRUCT DAQSettings s] = PS_GetDAQSettings(str, "PSQ_DS_SupraLong_DA_0")
AcquireData_NG(s, str)

WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE)
WAVE wv = PSQ_CreateOverrideResults(str, PSQ_TEST_HEADSTAGE, PSQ_DA_SCALE, opMode = PSQ_DS_SUPRA)
// pre pulse chunk pass
// second post pulse chunk pass
wv = 0
Expand Down

0 comments on commit 4d9c0af

Please sign in to comment.