LBHB / NEMS0

THIS VERSION OF NEMS IS NO LONGER SUPPORTED. PLEASE USE THE NEW NEMS REPOSITORY OR INSTALL NEMS_DB TO GET NEMS0 SUPPORT.
GNU General Public License v3.0
8 stars 4 forks source link

Better version of epoch averaging #90

Closed bburan closed 6 years ago

bburan commented 6 years ago

This uses a simpler, more Pythonic algorithm for creating the averaged recording, fixes a few bugs (mainly with mutability of objects) and preserves any "sub-epochs" (i.e., epochs contained within the epochs being averaged) that are common to all the epochs.

As a bonus, includes new unit tests (we need more of these).

bburan commented 6 years ago

I guess you're using Python < 3.6. I'm using the f-string formatting that's available in 3.6. Probably should make it backwards compatible with 3.5. I'll update.


From: Stephen D [notifications@github.com] Sent: Tuesday, May 22, 2018 8:40 AM To: LBHB/NEMS Cc: Brad Buran; Author Subject: Re: [LBHB/NEMS] Better version of epoch averaging (#90)

@svdavid commented on this pull request.

I get a syntax error on this line in preprocessing.py: end = common_epochs.query(f'name == "{epoch_name}"').iloc[0]['end'] not sure what the right syntax is for the query function

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/LBHB/NEMS/pull/90#pullrequestreview-122230421, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAT5QmJMQm8IHr6o5OdnRIYNoEm-N59aks5t1DFlgaJpZM4UHmdo.

bburan commented 6 years ago

Done and rebased off of master. Does this fix everything?

svdavid commented 6 years ago

I see, yes, I'm running 3.5, and that seems to confuse it. Now I'm getting a similar error on line 508 of epoch.py matches = epochs.query(f'name == "{epoch_name}"')

bburan commented 6 years ago

@svdavid Sorry, missed that. Fixed, amended last commit, rebased off of master and did a force-push.

bburan commented 6 years ago

@svdavid or @jacobpennington Can you please look at this and approve or not? Thanks.