-
Notifications
You must be signed in to change notification settings - Fork 4
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
Comments
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. |
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. |
The dataframe manipulations seem like real "epoch" functions, since they'll
be very specific to the epoch data structure. So maybe we should preserve
those in nems.epochs? Then the more general Nx2 functions can be cast as
more general set manipulations... Though they also are kind of specialized.
Do you use any of these functions regularly? Or call them through
signal/recording methods?
…On Tue, Jun 5, 2018 at 11:07 AM, Brad Buran ***@***.***> wrote:
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.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/LBHB/NEMS/issues/105#issuecomment-394806321>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AH_8p_x8RIpVQjiZ5aEh-h5gQww10jWbks5t5sjSgaJpZM4UbN7d>
.
|
The NX2 functions are used in the higher level functions in NEMS (including the dataframe manipulation routines). I use them quite a bit in my own preprocessing. I think it's safe to move them to `nems.epoch.util`. The dataframe manipulations can live in `nems.epoch.api`.
Or, we can reorganize all of our data structures:
`nems.data.signal`
`nems.data.recording`
`nems.data.io` <- for loading/saving signals & recordings
`nems.data.epoch`
`nems.data.util` <- for the Nx2 manipulations, etc.
`nems.data.api` <- single point of import for accessing functions most people will want.
________________________________
From: Stephen D [[email protected]]
Sent: Tuesday, June 05, 2018 2:35 PM
To: LBHB/NEMS
Cc: Brad Buran; Author
Subject: Re: [LBHB/NEMS] clean up `nems.epochs` (#105)
The dataframe manipulations seem like real "epoch" functions, since they'll
be very specific to the epoch data structure. So maybe we should preserve
those in nems.epochs? Then the more general Nx2 functions can be cast as
more general set manipulations... Though they also are kind of specialized.
Do you use any of these functions regularly? Or call them through
signal/recording methods?
On Tue, Jun 5, 2018 at 11:07 AM, Brad Buran ***@***.***> wrote:
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.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/LBHB/NEMS/issues/105#issuecomment-394806321>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AH_8p_x8RIpVQjiZ5aEh-h5gQww10jWbks5t5sjSgaJpZM4UbN7d>
.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://github.com/LBHB/NEMS/issues/105#issuecomment-394868361>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAT5QpxZnoMDjJGPlTHtvn205-OBEIdkks5t5vm8gaJpZM4UbN7d>.
|
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
.The text was updated successfully, but these errors were encountered: