-
Notifications
You must be signed in to change notification settings - Fork 124
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
ENH: Calculate default sampling rate for SparseRunVariable.to_dense #571
Conversation
Oh, nice. I was literally just about to comment "Great idea but do you have an implementation" ;) |
Yeah, it seemed a bit harsh to push without making sure it worked. @tyarkoni Any concerns with this? |
So I tried it with this simple example:
The resulting With this example:
I got sampling rate of 10hz. That seems pretty reasonable to me. My main concern would be if you had very high frequency events, and you got an absurdly high FWIW, I think the upsampling/downsampling that occurs in Otherwise, all other calls of If we make this change, you'll want to update the spec. |
If you have very high-frequency events, you presumably want to represent them at roughly that frequency... I think the bigger danger is somebody who got a little too excited about precision timing in their fMRI design, and jitters by milliseconds, so the stimuli are all N seconds +/- 5ms, then you end up with a ~1KHz dense variable that isn't worth the precision. But for such a case, |
Codecov Report
@@ Coverage Diff @@
## master #571 +/- ##
========================================
+ Coverage 82.97% 83% +0.02%
========================================
Files 23 23
Lines 2966 2971 +5
Branches 749 750 +1
========================================
+ Hits 2461 2466 +5
Misses 323 323
Partials 182 182
Continue to review full report at Codecov.
|
I don't know that this actually changes anything WRT the spec. Currently |
Nice. Well this certainly fits the bill of "something reasonable" |
Okay. I'm going to go ahead and merge this, as it only turns things that would previously have been |
Proof-of-concept to accompany #568.
Related: