Skip to content

Commit 00e925e

Browse files
authored
Merge pull request #2336 from AllenInstitute/bugfix/2336-add-rms-values-to-labnotebook-for-patchseq-analysis-functions
PSQ_EvaluateBaselineProperties: Add RMS short and long values to labnotebook
2 parents 93cd680 + ce6d683 commit 00e925e

File tree

3 files changed

+230
-0
lines changed

3 files changed

+230
-0
lines changed

Diff for: Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf

+16
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@
4747
/// PSQ_FMT_LBN_FINAL_SCALE Final DAScale of the given headstage, only set on success (none) Numerical SP, RB No No
4848
/// PSQ_FMT_LBN_SPIKE_DASCALE_ZERO Sweep spiked with DAScale of 0 On/Off Numerical SP No No
4949
/// PSQ_FMT_LBN_INITIAL_SCALE Initial DAScale (none) Numerical RB, CR No No
50+
/// PSQ_FMT_LBN_RMS_SHORT Short RMS baseline value V Numerical DA, RB, RA, CR, SE, VM, AR Yes Yes
5051
/// PSQ_FMT_LBN_RMS_SHORT_PASS Short RMS baseline QC result On/Off Numerical DA, RB, RA, CR, SE, VM, AR Yes Yes
5152
/// PSQ_FMT_LBN_RMS_SHORT_THRESHOLD Short RMS baseline threshold V Numerical DA, RB, RA, CR, SE, VM, AR No Yes
53+
/// PSQ_FMT_LBN_RMS_LONG Long RMS baseline value V Numerical DA, RB, RA, CR, SE, VM, AR Yes Yes
5254
/// PSQ_FMT_LBN_RMS_LONG_PASS Long RMS baseline QC result On/Off Numerical DA, RB, RA, CR, SE, VM, AR Yes Yes
5355
/// PSQ_FMT_LBN_RMS_LONG_THRESHOLD Long RMS baseline threshold V Numerical DA, RB, RA, CR, SE, VM, AR No Yes
5456
/// PSQ_FMT_LBN_TARGETV Target voltage baseline Volt Numerical DA, RB, RA, CR Yes Yes
@@ -798,6 +800,20 @@ static Function PSQ_EvaluateBaselineProperties(string device, STRUCT AnalysisFun
798800
// more tests can be added here
799801
endfor
800802

803+
if(HasOneValidEntry(rmsShort))
804+
// mV -> V
805+
rmsShort[] *= MILLI_TO_ONE
806+
key = CreateAnaFuncLBNKey(type, PSQ_FMT_LBN_RMS_SHORT, chunk = chunk)
807+
ED_AddEntryToLabnotebook(device, key, rmsShort, unit = "Volt", overrideSweepNo = s.sweepNo)
808+
endif
809+
810+
if(HasOneValidEntry(rmsLong))
811+
// mV -> V
812+
rmsLong[] *= MILLI_TO_ONE
813+
key = CreateAnaFuncLBNKey(type, PSQ_FMT_LBN_RMS_LONG, chunk = chunk)
814+
ED_AddEntryToLabnotebook(device, key, rmsLong, unit = "Volt", overrideSweepNo = s.sweepNo)
815+
endif
816+
801817
if(HasOneValidEntry(avgVoltage))
802818
// mV -> V
803819
avgVoltage[] *= MILLI_TO_ONE

Diff for: Packages/MIES/MIES_Constants.ipf

+2
Original file line numberDiff line numberDiff line change
@@ -1147,8 +1147,10 @@ StrConstant PSQ_FMT_LBN_SPIKE_POSITIONS = "%s spike positions"
11471147
StrConstant PSQ_FMT_LBN_SPIKE_COUNT = "%s spike count"
11481148
StrConstant PSQ_FMT_LBN_FINAL_SCALE = "%s final DAScale"
11491149
StrConstant PSQ_FMT_LBN_INITIAL_SCALE = "%s initial DAScale"
1150+
StrConstant PSQ_FMT_LBN_RMS_SHORT = "%s Chk%d S-RMS"
11501151
StrConstant PSQ_FMT_LBN_RMS_SHORT_PASS = "%s Chk%d S-RMS QC"
11511152
StrConstant PSQ_FMT_LBN_RMS_SHORT_THRESHOLD = "%s S-RMS Threshold"
1153+
StrConstant PSQ_FMT_LBN_RMS_LONG = "%s Chk%d L-RMS"
11521154
StrConstant PSQ_FMT_LBN_RMS_LONG_PASS = "%s Chk%d L-RMS QC"
11531155
StrConstant PSQ_FMT_LBN_RMS_LONG_THRESHOLD = "%s L-RMS Threshold"
11541156
StrConstant PSQ_FMT_LBN_TARGETV = "%s Chk%d T-V BL"

0 commit comments

Comments
 (0)