Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
changes deconvolved filter, trace filter, and histogram

changes

PSX changes to baseline, peak, and tau calculations

changes

changes

changes

changes

changes

changes

changes

changes

changes again

updates to GetPSXEventWaveAsFree. Changes were made because the deconvolved peak aligns with the event's peak rather than the event onset.

wip

changes

changes

changes

changes

changes

changes

changes

changes

changes

changes

changes

changes

WIP from live testing

WIP: Add panel version

changes

changes

changes

changes

WIP: dev docu for commit message

// New function:
//  PSX_OnsetTime(peak_t, baseline_t, DiffV)
/// onset_t =  time of the percentDiffThresh amplitude of the 1st differential of the event
/// percentDiffThresh taken from psxRiseTime user input, default to 5%
// Order of operations:
// 1.   DiffV = Differentiated sweep trace
// 2.   DiffPeak =  the peak of the differentiated trace between [peak_t - baseline_t], peak = min for (–) kernel sign, max for (+) kernel sign
// 3.   DiffPeak_t = time of DiffPeak
// 4.   onset_t = findlevel/R= (DiffPeak_t, baseline_t) wave = DiffV, level=(percentDiffThresh * DiffPeak)
// 5.   Return onset_t

changes

changes

wip from live testing

cc

changes

changes

changes

tests/TestOperationRiseTime: Adapt it

WIP: Docu update
  • Loading branch information
timjarsky authored and t-b committed Dec 18, 2024
1 parent 47541ea commit bee7d70
Show file tree
Hide file tree
Showing 9 changed files with 553 additions and 241 deletions.
14 changes: 8 additions & 6 deletions Packages/MIES/MIES_Cache.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,13 @@ Function/S CA_AveragingWaveModKey(WAVE wv)
return num2istr(CA_RecursiveWavemodCRC(wv)) + "Version 1"
End

/// @brief Cache key generator for the tau range calculation
/// of psx events
Function/S CA_PSXEventGoodTauRange(WAVE wv)

return num2istr(CA_RecursiveWavemodCRC(wv)) + "Version 1"
End

/// @brief Calculated a CRC from non wave reference waves using modification data, wave modification count and wave location.
/// If the given wave is a wave reference wave, then the CRC is calculated recursively from
/// all non wave reference waves and null wave references found.
Expand Down Expand Up @@ -438,12 +445,7 @@ End

Function/S CA_PSXOperationKey(string comboKey, string psxParameters)

return CA_PSXBaseKey(comboKey, psxParameters) + " Operation " + ":Version 2"
End

Function/S CA_PSXRiseTimeKey(string comboKey, string psxParameters)

return CA_PSXBaseKey(comboKey, psxParameters) + " PSX Rise time " + ":Version 2"
return CA_PSXBaseKey(comboKey, psxParameters) + " Operation " + ":Version 3"
End

Function/S CA_PSXAnalyzePeaks(string comboKey, string psxParameters)
Expand Down
9 changes: 6 additions & 3 deletions Packages/MIES/MIES_Constants.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Constant DA_EPHYS_PANEL_VERSION = 64
Constant DATA_SWEEP_BROWSER_PANEL_VERSION = 51
Constant WAVEBUILDER_PANEL_VERSION = 14
Constant ANALYSISBROWSER_PANEL_VERSION = 5
Constant PSX_PLOT_PANEL_VERSION = 1

/// Version of the stimset wave note
Constant STIMSET_NOTE_VERSION = 11
Expand Down Expand Up @@ -2032,6 +2033,7 @@ StrConstant CO_EMPTY_DAC_LIST = "emptyDACList"
StrConstant CO_SF_TOO_MANY_TRACES = "SF_tooManyTraces"
StrConstant CO_PSX_CLIPPED_STATS = "psx_clippedStats"
StrConstant CO_ARCHIVE_ONCE = "ArchiveLogs"
StrConstant CO_PSX_UPGRADE_EVENT = "psx_updateEvent"
///@}

/// @name Constants for SweepFormula Meta data in JSON format
Expand Down Expand Up @@ -2347,11 +2349,12 @@ StrConstant PSX_STATS_LABELS = "Average;Median;Average Deviation;Standard deviat
///@{
Constant PSX_HORIZ_OFFSET_ONSET = 0
Constant PSX_HORIZ_OFFSET_PEAK = 1
Constant PSX_HORIZ_OFFSET_SLEW = 2
///@}

Constant PSX_DECONV_FILTER_DEF_LOW = 0.002
Constant PSX_DECONV_FILTER_DEF_HIGH = 0.004
Constant PSX_DECONV_FILTER_DEF_ORDER = 101
Constant PSX_DECONV_FILTER_DEF_LOW = 500
Constant PSX_DECONV_FILTER_DEF_HIGH = 50
Constant PSX_DECONV_FILTER_DEF_ORDER = 7

StrConstant PSX_JWN_COMBO_KEYS_NAME = "ComboKeys"

Expand Down
2 changes: 1 addition & 1 deletion Packages/MIES/MIES_SweepFormula.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -1516,7 +1516,7 @@ Function [STRUCT RGBColor s] SF_GetTraceColor(string graph, string opStack, WAVE
return [s]
endif

WAVE numericalValues = SFH_GetLabNoteBookForSweep(graph, sweepNo, mapIndex, LBN_NUMERICAL_VALUES)
WAVE/Z numericalValues = SFH_GetLabNoteBookForSweep(graph, sweepNo, mapIndex, LBN_NUMERICAL_VALUES)
if(!WaveExists(numericalValues))
return [s]
endif
Expand Down
Loading

0 comments on commit bee7d70

Please sign in to comment.