Skip to content

Commit

Permalink
PSQ_EvaluateBaselineProperties: Add RMS short and long values to labn…
Browse files Browse the repository at this point in the history
…otebook

Forgotten in efdfbad (Analysis function for Patch Seq subthreshold stimsets, 2017-09-20).
  • Loading branch information
t-b committed Jan 28, 2025
1 parent d70cc01 commit ce6d683
Show file tree
Hide file tree
Showing 3 changed files with 230 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Packages/MIES/MIES_AnalysisFunctions_PatchSeq.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@
/// PSQ_FMT_LBN_FINAL_SCALE Final DAScale of the given headstage, only set on success (none) Numerical SP, RB No No
/// PSQ_FMT_LBN_SPIKE_DASCALE_ZERO Sweep spiked with DAScale of 0 On/Off Numerical SP No No
/// PSQ_FMT_LBN_INITIAL_SCALE Initial DAScale (none) Numerical RB, CR No No
/// PSQ_FMT_LBN_RMS_SHORT Short RMS baseline value V Numerical DA, RB, RA, CR, SE, VM, AR Yes Yes
/// PSQ_FMT_LBN_RMS_SHORT_PASS Short RMS baseline QC result On/Off Numerical DA, RB, RA, CR, SE, VM, AR Yes Yes
/// PSQ_FMT_LBN_RMS_SHORT_THRESHOLD Short RMS baseline threshold V Numerical DA, RB, RA, CR, SE, VM, AR No Yes
/// PSQ_FMT_LBN_RMS_LONG Long RMS baseline value V Numerical DA, RB, RA, CR, SE, VM, AR Yes Yes
/// PSQ_FMT_LBN_RMS_LONG_PASS Long RMS baseline QC result On/Off Numerical DA, RB, RA, CR, SE, VM, AR Yes Yes
/// PSQ_FMT_LBN_RMS_LONG_THRESHOLD Long RMS baseline threshold V Numerical DA, RB, RA, CR, SE, VM, AR No Yes
/// PSQ_FMT_LBN_TARGETV Target voltage baseline Volt Numerical DA, RB, RA, CR Yes Yes
Expand Down Expand Up @@ -798,6 +800,20 @@ static Function PSQ_EvaluateBaselineProperties(string device, STRUCT AnalysisFun
// more tests can be added here
endfor

if(HasOneValidEntry(rmsShort))
// mV -> V
rmsShort[] *= MILLI_TO_ONE
key = CreateAnaFuncLBNKey(type, PSQ_FMT_LBN_RMS_SHORT, chunk = chunk)
ED_AddEntryToLabnotebook(device, key, rmsShort, unit = "Volt", overrideSweepNo = s.sweepNo)
endif

if(HasOneValidEntry(rmsLong))
// mV -> V
rmsLong[] *= MILLI_TO_ONE
key = CreateAnaFuncLBNKey(type, PSQ_FMT_LBN_RMS_LONG, chunk = chunk)
ED_AddEntryToLabnotebook(device, key, rmsLong, unit = "Volt", overrideSweepNo = s.sweepNo)
endif

if(HasOneValidEntry(avgVoltage))
// mV -> V
avgVoltage[] *= MILLI_TO_ONE
Expand Down
2 changes: 2 additions & 0 deletions Packages/MIES/MIES_Constants.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -1147,8 +1147,10 @@ StrConstant PSQ_FMT_LBN_SPIKE_POSITIONS = "%s spike positions"
StrConstant PSQ_FMT_LBN_SPIKE_COUNT = "%s spike count"
StrConstant PSQ_FMT_LBN_FINAL_SCALE = "%s final DAScale"
StrConstant PSQ_FMT_LBN_INITIAL_SCALE = "%s initial DAScale"
StrConstant PSQ_FMT_LBN_RMS_SHORT = "%s Chk%d S-RMS"
StrConstant PSQ_FMT_LBN_RMS_SHORT_PASS = "%s Chk%d S-RMS QC"
StrConstant PSQ_FMT_LBN_RMS_SHORT_THRESHOLD = "%s S-RMS Threshold"
StrConstant PSQ_FMT_LBN_RMS_LONG = "%s Chk%d L-RMS"
StrConstant PSQ_FMT_LBN_RMS_LONG_PASS = "%s Chk%d L-RMS QC"
StrConstant PSQ_FMT_LBN_RMS_LONG_THRESHOLD = "%s L-RMS Threshold"
StrConstant PSQ_FMT_LBN_TARGETV = "%s Chk%d T-V BL"
Expand Down
Loading

0 comments on commit ce6d683

Please sign in to comment.