Skip to content

Added filter() method to Segment, added PickleIO, fixes to NeoHdf5IO - #2

Merged
apdavison merged 10 commits into
NeuralEnsemble:masterfrom
apdavison:master
Sep 25, 2012
Merged

apdavison merged 10 commits into
NeuralEnsemble:masterfrom
apdavison:master

Conversation

@apdavison

Copy link
Copy Markdown
Member

No description provided.

@antolikjan

Copy link
Copy Markdown
Contributor

Hello Andrew,

is this to get MPI working?

On Tue, Jun 26, 2012 at 11:36 AM, Andrew Davison
[email protected]
wrote:

You can merge this Pull Request by running:

 git pull https://github.com/apdavison/python-neo master

Or you can view, comment on it, or merge it online at:

 #2

-- Commit Summary --

  • Added PickleIO class
  • Added filename attribute to NeoHDF5IO
  • Added filter() method to Segment
  • Fixing write_X() and read_X() method creation in NeoHdf5IO
  • Merged from [email protected]:NeuralEnsemble/python-neo.git

-- File Changes --

A .gitignore (10)
M neo/core/analogsignalarray.py (2)
M neo/core/segment.py (23)
M neo/io/init.py (8)
M neo/io/hdf5io.py (105)
A neo/io/pickleio.py (45)
M neo/io/pynnio.py (2)

-- Patch Links --

 https://github.com/NeuralEnsemble/python-neo/pull/2.patch
 https://github.com/NeuralEnsemble/python-neo/pull/2.diff


Reply to this email directly or view it on GitHub:
#2

@apdavison

Copy link
Copy Markdown
Member Author

No, it's not related to MPI

On 26 Jun 2012, at 13:04, antolikjan [email protected] wrote:

Hello Andrew,

is this to get MPI working?

On Tue, Jun 26, 2012 at 11:36 AM, Andrew Davison
[email protected]
wrote:

You can merge this Pull Request by running:

git pull https://github.com/apdavison/python-neo master

Or you can view, comment on it, or merge it online at:

#2

-- Commit Summary --

  • Added PickleIO class
  • Added filename attribute to NeoHDF5IO
  • Added filter() method to Segment
  • Fixing write_X() and read_X() method creation in NeoHdf5IO
  • Merged from [email protected]:NeuralEnsemble/python-neo.git

-- File Changes --

A .gitignore (10)
M neo/core/analogsignalarray.py (2)
M neo/core/segment.py (23)
M neo/io/init.py (8)
M neo/io/hdf5io.py (105)
A neo/io/pickleio.py (45)
M neo/io/pynnio.py (2)

-- Patch Links --

https://github.com/NeuralEnsemble/python-neo/pull/2.patch
https://github.com/NeuralEnsemble/python-neo/pull/2.diff


Reply to this email directly or view it on GitHub:
#2


Reply to this email directly or view it on GitHub:
#2 (comment)

@antolikjan

Copy link
Copy Markdown
Contributor

I cannot see any trouble with the changes. Any comments Samuel?

@samuelgarcia

Copy link
Copy Markdown
Contributor

OK for me.

@apdavison apdavison closed this Sep 25, 2012
@apdavison apdavison reopened this Sep 25, 2012
apdavison pushed a commit that referenced this pull request Sep 25, 2012
Added filter() method to Segment, added PickleIO, fixes to NeoHdf5IO
@apdavison
apdavison merged commit 1fd1f8f into NeuralEnsemble:master Sep 25, 2012
alperyeg referenced this pull request in INM-6/python-neo Apr 29, 2015
jpgill86 added a commit to jpgill86/python-neo that referenced this pull request Aug 8, 2018
…ignal start time, and for units detection (NeuralEnsemble#2)

* Fix for AxographIO's pairing of channel name/units with data

When np.unique is used to find unique channel names, the names are automatically sorted alphabetically. Channel units are extracted from names and so have the same reordering. However, as AnalogSignals are added to Segments, data is iterated over according to the ordering in the original AxoGraph file. Consequently, when channels appear in non-alphabetical order in an AxoGraph file, name/units and data are paired incorrectly by AxographIO.

This change fixes the pairing mistake by preserving the original ordering of channels when finding unique channel names. Preserving the original ordering of channels, rather than reordering the data so that the AnalogSignals are sorted alphabetically within each Segment, is preferable since users will likely expect ordering to match their AxoGraph data files; if not they can sort the channels by name themselves. Sorting during reading of the file is not reversible for users who need to preserve the original ordering.

* Correction for AxographIO signal start time

The start time in AxoGraph files is not 0. Rather, it is one sample period after 0 (see spreadsheet view in AxoGraph or the contents of an exported text file). Both sample period and start time are made accessible directly by the axographio package, so this change uses them instead.

* Make AxographIO save file_origin when possible

* Fix units detection by AxographIO when parentheses exist in name

When an AxoGraph file contains a channel name that contains parentheses in addition to the units, e.g., "My channel (it's really great) (V)", the units are extracted incorrectly as the first parenthetical phrase. This change fixes this bug.

* Strip units from channel names

Units are stored already in AnalogSignals. If the signal is rescaled by converting units, e.g. from volts to millivolts, the unit label attached to the channel name will be inaccurate. This change strips the units from the channel name entirely.
jpgill86 added a commit to jpgill86/python-neo that referenced this pull request Sep 6, 2018
…ignal start time, and for units detection (NeuralEnsemble#2)

* Fix for AxographIO's pairing of channel name/units with data

When np.unique is used to find unique channel names, the names are automatically sorted alphabetically. Channel units are extracted from names and so have the same reordering. However, as AnalogSignals are added to Segments, data is iterated over according to the ordering in the original AxoGraph file. Consequently, when channels appear in non-alphabetical order in an AxoGraph file, name/units and data are paired incorrectly by AxographIO.

This change fixes the pairing mistake by preserving the original ordering of channels when finding unique channel names. Preserving the original ordering of channels, rather than reordering the data so that the AnalogSignals are sorted alphabetically within each Segment, is preferable since users will likely expect ordering to match their AxoGraph data files; if not they can sort the channels by name themselves. Sorting during reading of the file is not reversible for users who need to preserve the original ordering.

* Correction for AxographIO signal start time

The start time in AxoGraph files is not 0. Rather, it is one sample period after 0 (see spreadsheet view in AxoGraph or the contents of an exported text file). Both sample period and start time are made accessible directly by the axographio package, so this change uses them instead.

* Make AxographIO save file_origin when possible

* Fix units detection by AxographIO when parentheses exist in name

When an AxoGraph file contains a channel name that contains parentheses in addition to the units, e.g., "My channel (it's really great) (V)", the units are extracted incorrectly as the first parenthetical phrase. This change fixes this bug.

* Strip units from channel names

Units are stored already in AnalogSignals. If the signal is rescaled by converting units, e.g. from volts to millivolts, the unit label attached to the channel name will be inaccurate. This change strips the units from the channel name entirely.
h-mayorquin added a commit to catalystneuro/python-neo that referenced this pull request Apr 27, 2022
h-mayorquin pushed a commit to h-mayorquin/python-neo that referenced this pull request Feb 26, 2024
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

Successfully merging this pull request may close these issues.

3 participants