question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expose "add_offset" control in `concatenate_epochs`

See original GitHub issue

https://github.com/mne-tools/mne-python/blob/5cafa0f4287ae02fb2beafa557c0f70db8b7a1ed/mne/epochs.py#L2916

I find myself frequently using concatenate_epochs function to unite several sets of epochs for different events, and then sorting the epochs afterwards. This proves a great pattern for working with a database-like structure for machine learning applications.

However, the function by default gives an offset to the sets of events, which means that the resulting event timestamps lose their valuable information. Examining the function I have found that it uses _concatenate_epochs where you can disable giving an offset to the events.

I was wondering if there was a specific reason to not expose this control in the public function, and if there wasn’t, would it be ok for me to submit a pull request of the correction? Thanks.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
agramfortcommented, Jun 15, 2018

+0.5 to expose add_offset if it’s needed for you. It’s not too invasive change.

0reactions
antopolskiycommented, Aug 21, 2018

Sorry, caught up in stuff, doing it now

Read more comments on GitHub >

github_iconTop Results From Across the Web

mne.concatenate_epochs — MNE 1.3.dev0 documentation
If True, a fixed offset is added to the event times from different Epochs sets, such that they are easy to distinguish after...
Read more >
How to concatenate epochs with different lengths and/or time
I wanted to concatenate two epochs with different lengths using the function mne.concatenate_epochs . Unfortunately, that didn't work and I ...
Read more >
How to Reshape Input Data for Long Short-Term Memory ...
After completing this tutorial, you will know: How to define an LSTM input layer. How to reshape a one-dimensional sequence data for an...
Read more >
[Eeglablist] re-concatenating epoched dataset
It turns out that Pete's epochs are stored in segregated datasets according to epoch condition (not block design).
Read more >
Lenses SQL Engine
If used in a select gives back the Kafka offset. YES, INT. _ts. Restricts the messages read based on their timestamp. Similar to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found