Skip to content
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

clean up nems.epochs #105

Open
bburan opened this issue Jun 5, 2018 · 4 comments
Open

clean up nems.epochs #105

bburan opened this issue Jun 5, 2018 · 4 comments

Comments

@bburan
Copy link
Contributor

bburan commented Jun 5, 2018

nems.epochs has a mix of functions that work on an epochs dataframe and others that work only on a Nx2 array of start/end times. It gets confusing for new users. These need to be clearly differentiated. Consider moving the Nx2 functions into a submodule, nems.epochs.util.

@svdavid
Copy link
Contributor

svdavid commented Jun 5, 2018

I also find it confusing that about half the epoch manipulations are built into the signal and/or reference objects. Does it make sense to move everything to signals? Or perhaps to move some low-level code out of the signal object either to the epochs or utils library?

Generally, there seem to be cases where access to the full epochs dataframe is help (eg, when looking for name matches) but others where only Nx2 arrays are needed. I don't know the best way to segregate that functionality.

@bburan
Copy link
Contributor Author

bburan commented Jun 5, 2018

Yes, I agree that we should move as much of the epoch manipulation code out of the Recording/Signal objects as possible. Signal and Recording methods can simply be thin wrappers around the epochs module. This also simplifies unit testing (i.e., we don't need to create a Signal/Recording just to test basic epoch manipulation stuff).

I think we should just split the functions that take Nx2 into one file and functions that take the dataframe into another file. Just not sure what to call the file that would take dataframe manipulation routines.

@svdavid
Copy link
Contributor

svdavid commented Jun 5, 2018 via email

@bburan
Copy link
Contributor Author

bburan commented Jun 5, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants