SweepFormula/psxKernel: Various fixes
@timjarsky This has our bugfixes for psxKernel and too large decayTau. I've removed the adaptations for the sweep range extraction as #1990 will fix that in a better way (also for old data).
- [x] Add test
- [x] Drop empty results in PSX_Operation
- [x] intersecting ranges bug IVSCCMiniAnalysis on the FTP (same name, new content)
- [x] StatsRangeTesting: Check that the correct range was used for multi dataset examples
- [x] Update psxStats documentation
- [x] Throw away events which have an amplitude which has a different sign compared to the psxKernel amplitude
- [x] Replace PSX_DEFAULT_X_START_OFFSET with a factor and the decay tau from psxKernel
- [x] Fix incorrect usage of StatsQuantiles as
/Zwitherr = ...does not make sense - [x] psx should return sweepData waves if there are no events, as psxPrep relies on that for the histogram. Otherwise the data psx uses and what psxPrep plots is different
- [x] Fix kernelAmp sign check again
- [x] Reverse order of offsetting and filtering, rename all names
Close #2016 Close #2011 Close #1660
@timjarsky Ready for a first look.
@t-b
I get the following assertion:
Igor Pro version: 9.0.6.1 (56565)
################################
!!! Threadsafe assertion FAILED !!!
Message: "Unexpected number of matches or invalid regex"
Please provide the following information if you contact the MIES developers:
################################
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Stacktrace:
PSX_PlotInteractionHook(...)#L3927 [MIES_SweepFormula_PSX.ipf]
PSX_MoveMouseForKeyPress(...)#L4083 [MIES_SweepFormula_PSX.ipf]
PSX_MoveAndCenterCursor(...)#L2783 [MIES_SweepFormula_PSX.ipf]
PSX_UpdateSingleEventGraph(...)#L1721 [MIES_SweepFormula_PSX.ipf]
PSX_UpdateSingleEventTextbox(...)#L2613 [MIES_SweepFormula_PSX.ipf]
FormatTextWaveForLegend(...)#L6563 [MIES_Utilities.ipf]
RemoveEndingRegExp(...)#L2126 [MIES_Utilities.ipf]
I put the pxp (PSXTesting.pxp) on the server.
@timjarsky Thanks. Fixed.
Fixed conflicts.
@timjarsky Thanks for the repro data. I indeed calculated the peak for the event filtering incorrectly. Should be fixed now.
@timjarsky Ready for another look.
@t-b I get ** a wave read gave error: Index out of range for wave "peakX". when moving between events in the SF window.
I'm also seeing: 1. Many small events being detected. This could be due to Igor's peak finding algorithm, and 2. A filter induced decay. I'm not sure why the decay is from a around +25 mV.
2)
We can have a look together.
I've fixed the cursor issue.
@MichaelHuth FYI: 7e0c17ee2 (DeepCopyWaveRefWave: Allow src to cotain null waves, 2024-09-06)
@t-b with the latest changes I get:
!!! Assertion FAILED !!!
Message: "Expected a band pass filter with low > high"
Please provide the following information if you contact the MIES developers:
################################
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Stacktrace:
SF_button_sweepFormula_display(...)#L2991 [MIES_SweepFormula.ipf]
SF_ExecuteVariableAssignments(...)#L7125 [MIES_SweepFormula.ipf]
SF_FormulaExecutor(...)#L1145 [MIES_SweepFormula.ipf]
PSX_Operation(...)#L4510 [MIES_SweepFormula_PSX.ipf]
PSX_OperationSweepGathering(...)#L917 [MIES_SweepFormula_PSX.ipf]
PSX_Analysis(...)#L436 [MIES_SweepFormula_PSX.ipf]
PSX_DeconvoluteSweepData(...)#L350 [MIES_SweepFormula_PSX.ipf]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Time: 2024-12-06T15:43:32-08:00
Locked device: [- none -]
Current sweep: [- none -]
DAQ: [- none -]
Testpulse: [- none -]
Acquisition state: [- none -]
Experiment: Sample NWB files from Jessica (Packed)
Igor Pro version: 9.0.6.1 (56565)
MIES version:
################################
The deconvolved filter settings (50,200) worked with the earlier version. When I swap the filter low and high to resolve the assertion, it bugs out in other ways.
sel=select(selchannels(AD0),selrange([2000,inf]))
dat = data($sel)
rtau=2
dtau=3
amp=-20
SD=5.0
bandfLow=1001
bandfHigh=2
maxtaufactor=5
kernel=psxkernel($sel, $rtau, $dtau, $amp)
PSXey=psx(Timay, $kernel, $SD , $bandfLow, $bandfHigh, $maxTauFactor, psxRiseTime(), psxDeconvFilter(50, 200, 101))
$PSXey
and
psxprep($PSXey, $SD)
and
psxstats(Timay, $sel, tau, accept)
and
avg(rms($dat),over)
@timjarsky Ready!
@timjarsky I've enabled automerge.