Skip to content

Commit

Permalink
PSQ_CreateOverrideResults: Calculate numLayers dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
t-b committed Dec 1, 2023
1 parent 4d9c0af commit b677040
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -1163,55 +1163,47 @@ Function/WAVE PSQ_CreateOverrideResults(device, headstage, type, [opMode])
case PSQ_RAMP:
case PSQ_RHEOBASE:
numChunks = 4
numLayers = 3
numRows = PSQ_GetNumberOfChunks(device, 0, headstage, type)
numCols = IDX_NumberOfSweepsInSet(stimset)
layerDimLabels = "BaselineQC;SpikePositionAndQC;AsyncQC"
break
case PSQ_DA_SCALE:
numChunks = 4
numLayers = 4
numRows = PSQ_GetNumberOfChunks(device, 0, headstage, type)
numCols = IDX_NumberOfSweepsInSet(stimset)
layerDimLabels = "BaselineQC;SpikePosition;NumberOfSpikes;AsyncQC"
break
case PSQ_SQUARE_PULSE:
numRows = 1
numCols = IDX_NumberOfSweepsInSet(stimset)
numLayers = 2
layerDimLabels = "SpikePositionAndQC;AsyncQC"
break
case PSQ_CHIRP:
numChunks = 4
numLayers = 5
numRows = PSQ_GetNumberOfChunks(device, 0, headstage, type)
numCols = IDX_NumberOfSweepsInSet(stimset)
layerDimLabels = "BaselineQC;MaxInChirp;MinInChirp;SpikeQC;AsyncQC"
break
case PSQ_PIPETTE_BATH:
numChunks = 4
numLayers = 3
numRows = PSQ_GetNumberOfChunks(device, 0, headstage, type)
numCols = IDX_NumberOfSweepsInSet(stimset)
layerDimLabels = "BaselineQC;SteadyStateResistance;AsyncQC"
break
case PSQ_SEAL_EVALUATION:
numChunks = 4
numLayers = 4
numRows = 2 // upper limit
numCols = IDX_NumberOfSweepsInSet(stimset)
layerDimLabels = "BaselineQC;ResistanceA;ResistanceB;AsyncQC"
break
case PSQ_TRUE_REST_VM:
numChunks = 4
numLayers = 4
numRows = 2
numCols = IDX_NumberOfSweepsInSet(stimset)
layerDimLabels = "BaselineQC;NumberOfSpikes;AverageVoltage;AsyncQC"
break
case PSQ_ACC_RES_SMOKE:
numChunks = 4
numLayers = 4
numRows = 1
numCols = IDX_NumberOfSweepsInSet(stimset)
layerDimLabels = "BaselineQC;AccessResistance;SteadyStateResistance;AsyncQC"
Expand All @@ -1221,6 +1213,7 @@ Function/WAVE PSQ_CreateOverrideResults(device, headstage, type, [opMode])
endswitch

WAVE/D/Z wv = GetOverrideResults()
numLayers = ItemsInList(layerDimLabels, ";")

if(WaveExists(wv))
Redimension/D/N=(numRows, numCols, numLayers, numChunks) wv
Expand Down

0 comments on commit b677040

Please sign in to comment.