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

Added high-level functions #65

Merged
merged 26 commits into from
Feb 18, 2020
Merged

Added high-level functions #65

merged 26 commits into from
Feb 18, 2020

Conversation

skjerns
Copy link
Collaborator

@skjerns skjerns commented Jan 7, 2020

I thought it might be useful to add some high-level functions for convenience.

I've created the following functions:

write_edf(filename, data)
read_edf(filename)

drop_channels(filename, to_drop) # drops channels or keeps only a selected few
anonymize_edf(filename) # remove all personalized data from a header
rename_channels # renames channels in an EDF file

# helper functions
make_header()  # create a header dictionary
make_signal_header() # create a signal_header

@holgern Let me know if you think this could be useful. Then I'll create the tests and integrate the imports into the package.

@codecov
Copy link

codecov bot commented Jan 14, 2020

Codecov Report

Merging #65 into master will increase coverage by 2.21%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #65      +/-   ##
==========================================
+ Coverage   10.59%   12.81%   +2.21%     
==========================================
  Files           6        7       +1     
  Lines        3274     3520     +246     
  Branches       82      136      +54     
==========================================
+ Hits          347      451     +104     
- Misses       2886     3026     +140     
- Partials       41       43       +2     
Impacted Files Coverage Δ
pyedflib/highlevel.py 38.77% <0.00%> (ø)
pyedflib/edfreader.py 69.14% <0.00%> (+1.14%) ⬆️
pyedflib/edfwriter.py 76.32% <0.00%> (+2.12%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7b9b9c...ec6ec41. Read the comment docs.

@skjerns
Copy link
Collaborator Author

skjerns commented Jan 14, 2020

(note: need to add digitial for non-same sampling frequency)

@skjerns
Copy link
Collaborator Author

skjerns commented Jan 24, 2020

@holgern do you think it's worth pursuing this?

btw: some of the added dependencies can be dropped or made optional.

@holgern
Copy link
Owner

holgern commented Jan 24, 2020

@skjerns Thanks for your work. I would like to have the added dependencies dropped or made optional. They can be added to the test requirements but should not be required to install the package itself.

@skjerns
Copy link
Collaborator Author

skjerns commented Jan 24, 2020

alright.. I removed the deps, they should not really be needed anyway.

I'll work on some of the functions and implement some tests, then we can merge (if you're okay with the code.)

@skjerns
Copy link
Collaborator Author

skjerns commented Feb 13, 2020

@holgern I added the docstrings and tests. Can you see if this can be merged? I'll write some more documentation then.

btw, I would volunteer to take up part of maintenance of the repository, if you would think that would be an idea.

@holgern
Copy link
Owner

holgern commented Feb 18, 2020

Great work, it looks good now. This will simplify the usage of pyedflib.

I think I have to create a new github organization first, before I can add maintainer.

@holgern holgern merged commit 64245a9 into holgern:master Feb 18, 2020
@skjerns
Copy link
Collaborator Author

skjerns commented Feb 21, 2020

@holgern I think it should work without an organiztion, you just have to click on the settings above and under manage access add me as collobator

@holgern
Copy link
Owner

holgern commented Feb 21, 2020

@skjerns You were right, I invited you as collaborator.

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.

2 participants