Adding an argument `include_tmax` for `.get_data()`
See original GitHub issueWe ran into a failure today in https://github.com/vferat/pycrostates/pull/14 because raw.get_data()
was returning one less sample than expected, namely, the tmax
sample.
from pathlib import Path
import mne
print (mne.__version__)
directory = Path(mne.datasets.sample.data_path()) / 'MEG' / 'sample'
fname = directory / 'sample_audvis_filt-0-40_raw.fif'
raw = mne.io.read_raw_fif(fname, preload=True, verbose=False)
print (raw.get_data().shape)
print (raw.get_data(tmin=0, tmax=raw.times[-1]).shape)
OUT:
0.24.0
(376, 41700)
(376, 41699)
Do you consider this to be a bug in the handling of tmax
, or should an additional argument be added, include_tmax
, like for raw.crop()
?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
The useQuery hook - with variables | Lift-off III - Apollo GraphQL
We pass the GET_TRACK query as the hook's first argument, and now the big difference from ... Add the following in the return...
Read more >flutter passing multiple data with getx - Stack Overflow
Step: 1 : Sending data. Get.to(Second(), arguments: ["First data", "Second data"]);. Step: 2 : Get data From first screen
Read more >Pass data between destinations - Android Developers
To pass data between destinations, first define the argument by adding it to the destination that receives it by following these steps:.
Read more >mne.io.Raw — MNE 1.2.2 documentation - MNE-Python
See the logging documentation and mne.verbose() for details. ... Add reference channels to data that consists of all zeros.
Read more >argparse — Parser for command-line options, arguments and ...
The ArgumentParser.add_argument() method attaches individual argument specifications to the parser. It supports positional arguments, options that accept ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Since we have
include_tmax
forcrop
, +1 for adding it here for consistency… might also be relevant for TFR objects after https://github.com/mne-tools/mne-python/pull/10945