-
Notifications
You must be signed in to change notification settings - Fork 115
Consistently adopt column signal convention #627
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: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #627 +/- ##
=======================================
Coverage 98.13% 98.13%
=======================================
Files 19 19
Lines 3277 3279 +2
=======================================
+ Hits 3216 3218 +2
Misses 61 61 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I like the consistency here. I wonder whether we can do anything to ease the transition. I guess it's quite unlikely that the input is a square matrix, so if one were to update DSP to a version after this PR without adjustments to |
|
Hm. Well, typically |
Yeah, that would work for the vast majority of cases. Downside: it will be really annoying for any use-case with an unexpected
I don't think that's going to work. These warnings will go unnoticed too often. If we really want to avoid breakage, we should support both argument orders, to be selected with a kwarg, say |
|
I still think pretty much all cases will be caught by the heuristic, but I guess the keyword argument method is safer and isn't too much work. However, we probably have to force the depwarn because it's off by default and users won't see it... |
Ah, true, that would just postpone the user's grief... What if we require the kwarg? Well, then one would need to adjust the call-sites anyway and could switch the argument order, so we only would need to support |
|
That also sounds reasonable. But wait, if we instead let the default be say |
|
That's actually what I've tried to say 😄
Hm... Yes, that would allow most new code to get away without passing a redundant kwarg. Downside is that a warning is easier missed than an error. But if you suddenly get bad results, you probably look closer, and then notice the warning. So a clear warning and an |
|
Yeah, I was thinking something like |
|
Oh, and NeuroAnalysis.jl. The package names looked similar... |
|
No need to rush anything here, but I've added it to the 0.9 milestone so we don't forget about it. |
Those came out of work undertaken by folks at Beacon Biosignals and upstreamed here in #401. Beacon uses the convention of rows as channels, largely because it's how Onda.jl is designed. One option here would be to introduce a keyword argument like |
cef268a to
590afda
Compare
Currently for
filteach column of an array is treated as a separate signal. This isn't the case formt_cross_power_spectraandmt_coherence, and I'm not sure if there's a reason for that, so this is just a draft. The way they are implemented now means it is probably more performant going down the columns than rows, but it isn't very impactful other than consistency with the rest of the package. The change is kind of breaking.Also, the documentation for signal dimensions in
mt_coherenceandmt_coherence!was inconsistent.