-
Notifications
You must be signed in to change notification settings - Fork 17
Add arithmetics (sum, mean), sort, and time_point_thresh_nopol #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: cVogl97 <[email protected]>
Co-authored-by: cVogl97 <[email protected]>
…e inclusive end index Co-authored-by: cVogl97 <[email protected]>
Co-authored-by: cVogl97 <[email protected]>
Add sort processor for sorted array output
Co-authored-by: cVogl97 <[email protected]>
…pol, which does not do a polarity check
Co-authored-by: cVogl97 <[email protected]>
updated docstring of time_point_thresh and added time_point_thresh_nopol
Add arithmetic processors: sum and mean
Co-authored-by: cVogl97 <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #172 +/- ##
==========================================
+ Coverage 62.52% 63.06% +0.54%
==========================================
Files 58 60 +2
Lines 3920 4002 +82
==========================================
+ Hits 2451 2524 +73
- Misses 1469 1478 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…dex earlier Co-authored-by: cVogl97 <[email protected]>
…hresh Add tests for time_point_thresh_nopol with differentiation tests
…d end indices anymore
Co-authored-by: cVogl97 <[email protected]>
Co-authored-by: cVogl97 <[email protected]>
…dd-average-processor Update arithmetic processor tests and add mean_below_threshold processor
|
Maybe a quick comment, I'm not really a fan of adding code that could be run in another way, at the end of the day we have to maintain everything in this repo and therefore keeping it as minimal as possible is beneficial. I would rather update tutorials and docs on how to run these |
|
In principle I agree. I have, unfortunately, not been sucessfull with getting
|
|
''' |
Yeah that is correct, as things are right now. There actually is a wrapper class for external functions that I could have the kwargs fields help with, that can handle these cases. In terms of philosophy on these things I agree with George, at least as far as dspeed goes; dspeed can actually work with arbitrary modules though, so writing an extension package that you import processors from is an intended workflow, and in that case you can choose your own philosophy. I actually want to move some of our processors into a legend-specific repository, but it's not at all high on my priority list... |
|
So, thinking more about this one, there actually is a case for implementing some of the reductions over a range of values (which was actually how this was originally written). One important case for this would be for variable length values, where you may want to get the mean as |
This PR adds a few processors which are, in principle, available through numpy, but which are not easy to use in dspeed out of the box (at least for me). The behavior of
time_point_threshis documented more precicley and a new, similar, function,time_point_thresh_nopol, is added which does not require positive polarity in the waveform to report a threshold crossing.Specifically, this PR
sumprocessormeanprocessormean_below_thresholdprocessorsortprocessor (wraps numpy.sort)sum,mean,mean_below_thresholdandsortprocessorstime_point_thresh_nopolprocessortime_point_threshtime_point_thresh_nopoland tests which differentiate fromtime_point_thresh.