Comments (7)
To me it looks like "just" a difference in "n_fft" default. And psd_array_welch
's default of 256 is pretty small for typical data, and compute_psd
's default of 1024 is better. But it's odd that the evoked.compute_psd
docs don't mention that the default is different. We should document where the defaults of compute_psd
differ from the psd_array_*
methods (might just be n_fft
?) in compute_psd
then we're okay I think. (The default of 1024 is better in my mind than 256 so don't want to change that, and doesn't seem worth it to change psd_array_welch
to match by deprecation.)
from mne-python.
I only see the 256 default documented in psd_array_welch
, I don't see 1024 mentioned anywhere although that seems to be the case from the data but maybe I'm just missing it
from mne-python.
The n_fft
default for compute_psd()
is actually data-dependent and was inherited from the legacy plot_psd()
and plot_psd_topo()
functions. It is:
mne-python/mne/time_frequency/spectrum.py
Lines 283 to 284 in 43414ba
I'll add a docstring note about the default.
from mne-python.
What do you think about changing the default in mne.time_frequency.psd_array_welch
to match @drammock ? I agree with @larsoner that that tends to be rather few points for how high sampling rates tend to be nowadays but I'm not overly opinionated. I am a bit opinionated that I don't particularly like how two seemingly synonymous APIs don't have the same defaults, I think ideally they'd be the same.
from mne-python.
So no to harmonizing?
from mne-python.
So no to harmonizing?
Sorry I didn't see your comment before the PR was merged. My feeling is: the default that uses min(n_times, 2048)
is a nice convenience default to avoid folks seeing scipy warnings. Folks who are using the psd_array_*
interface are already doing "advanced" things (working outside of our normal MNE objects) so they might actually not appreciate a default that does a bit of magic like that (i.e., they might prefer to see those warnings). So I would want users to be able to turn it off, meaning the psd_array_welch
function would need a new n_fft="auto"
or so (so that passing an integer would not suppress warnings, but "auto" would adapt the value to the data size if necessary, thereby preventing the warning).
Which all feels a bit too... over-engineered? Folks doing advanced things can just write the min(n_times, 2048)
or whatever into their own scripts.
from mne-python.
Hmm don't love it but I don't really have a better idea at the moment, I think the documentation will go a long way so thanks for that.
from mne-python.
Related Issues (20)
- MAINT: Release 1.8 HOT 2
- in mne.viz.plot_evoked_topo, the ylim parameter breaks when grads become before mags in the data
- Allow `Spectrum` objects to support complex coefficients HOT 1
- Bug reading raw BrainVision data HOT 2
- set_channel_types does not properly set the coil_type for eyetracking channels HOT 3
- Type incompatibility between sklearn's API and `SlidingEstimator` HOT 8
- Some font colors in the dark theme are not readable HOT 3
- interpolate_blinks docstring should mention the method of interpolation HOT 1
- Inconsistent handling and documentation of pupil size units HOT 10
- Dropping all channels raises "No channels match the selection" HOT 3
- MNE.NIRS/nilearn.plotting Errors HOT 8
- Misleading parameter description in `fit_transform` method of `CSP` and `SPoC` HOT 1
- Cannot open nedf file from Neuroelectrics HOT 4
- Should `fetch_fsaverage()` return a `Path`? HOT 8
- Add Missing Fields to RawEEGLAB and EpochsEEGLAB Classes HOT 3
- HTML repr tables have really bad text contrast ratios HOT 4
- all random code should use default_rng
- DOC: Contributor credit improvements HOT 1
- CSP `rank` parameter does not behave as expected HOT 2
- Replace `psutil.virtual_memory()` with our own implementation? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mne-python.