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

[DRAFT] Possible implementation of Morphology #57

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
33 changes: 33 additions & 0 deletions publication/hfo_analysis_publication.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from pathlib import Path
from mne.filter import _overlap_add_filter

import numpy as np
import pandas as pd
from mne_bids import read_raw_bids, get_entity_vals

from mne_hfo import (RMSDetector, compute_chs_hfo_rates,
events_to_annotations)
from mne_hfo.simulate import simulate_hfo


def analyze_zurich():
root = Path('/Users/adam2392/OneDrive - Johns Hopkins/ds003498')

# get all subjects
subjects = get_entity_vals(root, 'subject')

# get outcomes
part_df = pd.read_csv(root / 'participants.tsv', sep='\t')

for subject in subjects:
subj_dir = root / f'sub-{subject}'

outcome = part_df[part_df['participant_id'] == f'sub-{subject}']['outcome']

# get all file paths
fpaths = []

# loop through each file path and compute HFOs
for fpath in fpaths:

#
49 changes: 11 additions & 38 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,38 +1,11 @@
appnope==0.1.2; sys_platform == "darwin" and platform_system == "Darwin"
backcall==0.2.0
cycler==0.10.0
decorator==5.0.5; python_version >= "3.5"
ipykernel==5.5.3
ipython==7.22.0; python_version >= "3.7"
ipython-genutils==0.2.0
jedi==0.18.0; python_version >= "3.6"
joblib==1.0.1
jupyter-client==6.1.12; python_version >= "3.5"
jupyter-core==4.7.1; python_version >= "3.6"
kiwisolver==1.3.1; python_version >= "3.6"
matplotlib==3.4.1
mne==0.22.1
mne-bids==0.7
numpy==1.20.2
pandas==1.2.3
parso==0.8.2; python_version >= "3.6"
pexpect==4.8.0; sys_platform != "win32"
pickleshare==0.7.5
pillow==8.2.0; python_version >= "3.6"
prompt-toolkit==3.0.18; python_full_version >= "3.6.1"
ptyprocess==0.7.0
pydocstyle==6.0.0
pygments==2.8.1; python_version >= "3.5"
pyparsing==2.4.7; python_version >= "2.6" and python_version not in "3.0, 3.1, 3.2, 3.3"
python-dateutil==2.8.1; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
pytz==2021.1
pyzmq==22.0.3; python_version >= "3.6"
scikit-learn==0.24.1
scipy==1.6.2
six==1.15.0; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
snowballstemmer==2.1.0
threadpoolctl==2.1.0; python_version >= "3.5"
tornado==6.1; python_version >= "3.5"
tqdm==4.59.0
traitlets==5.0.5; python_version >= "3.7"
wcwidth==0.2.5
# requirements for full MNE-Python functionality (other than raw/epochs export)
numpy>=1.15.4
scipy>=1.1.0
mne>=0.23
scikit-learn
pandas
joblib
psutil
xlrd
tqdm
pooch
127 changes: 24 additions & 103 deletions test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,103 +1,24 @@
aiofiles==0.6.0
alabaster==0.7.12
appnope==0.1.2; sys_platform == "darwin" and platform_system == "Darwin"
async-generator==1.10; python_version >= "3.5"
attrs==20.3.0; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
babel==2.9.0; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
backcall==0.2.0
beautifulsoup4==4.9.3
bleach==3.3.0; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4"
build==0.3.1.post1; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4"
certifi==2020.12.5
chardet==4.0.0; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4"
check-manifest==0.46
click==7.1.2; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4"
codespell==2.0.0
coverage==5.5; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4" and python_version < "4"
decorator==5.0.5; python_version >= "3.5"
defusedxml==0.7.1; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4"
docutils==0.17; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4"
entrypoints==0.3; python_version >= "2.7"
flake8==3.9.0
idna==2.10; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
imagesize==1.2.0; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
importlib-metadata==3.10.0; python_version < "3.8"
iniconfig==1.1.1
ipykernel==5.5.3
ipython==7.22.0; python_version >= "3.7"
ipython-genutils==0.2.0
jedi==0.18.0; python_version >= "3.6"
jinja2==2.11.3; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4"
jsonschema==3.2.0
jupyter-client==6.1.12; python_version >= "3.5"
jupyter-core==4.7.1; python_version >= "3.6"
jupyterlab-pygments==0.1.2
markupsafe==1.1.1; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
mccabe==0.6.1
mistune==0.8.4
mypy==0.812
mypy-extensions==0.4.3
nbclient==0.5.3; python_full_version >= "3.6.1"
nbconvert==6.0.7; python_version >= "3.6"
nbformat==5.1.3; python_version >= "3.5"
nbsphinx==0.8.2
nest-asyncio==1.5.1; python_version >= "3.5"
numpydoc==1.1.0
openneuro-py==2021.2
packaging==20.9; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
pandoc==1.0.2
pandocfilters==1.4.3
parso==0.8.2; python_version >= "3.6"
pep517==0.10.0
pexpect==4.8.0; sys_platform != "win32"
pickleshare==0.7.5
pipfile-requirements==0.3.0
pluggy==0.13.1; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
ply==3.11
prompt-toolkit==3.0.18; python_full_version >= "3.6.1"
ptyprocess==0.7.0
py==1.10.0; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
py-cpuinfo==7.0.0
pycodestyle==2.7.0; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
pydata-sphinx-theme==0.5.2
pydocstyle==6.0.0
pyflakes==2.3.1; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
pygments==2.8.1; python_version >= "3.5"
pyparsing==2.4.7; python_version >= "2.6" and python_version not in "3.0, 3.1, 3.2, 3.3"
pyrsistent==0.17.3; python_version >= "3.5"
pytest==6.2.3
pytest-benchmark==3.2.3
pytest-cov==2.11.1
pytest-sugar==0.9.4
python-dateutil==2.8.1; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
pytz==2021.1
pyzmq==22.0.3; python_version >= "3.6"
requests==2.25.1; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4"
rfc3986[idna2008]==1.4.0
six==1.15.0; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3"
sniffio==1.2.0; python_version >= "3.5"
snowballstemmer==2.1.0
soupsieve==2.2.1; python_version >= "3.0"
sphinx==3.5.3
sphinx-autodoc-typehints==1.11.1
sphinx-bootstrap-theme==0.7.1
sphinx-copybutton==0.3.1
sphinx-gallery==0.8.2
sphinxcontrib-applehelp==1.0.2; python_version >= "3.5"
sphinxcontrib-devhelp==1.0.2; python_version >= "3.5"
sphinxcontrib-htmlhelp==1.0.3; python_version >= "3.5"
sphinxcontrib-jsmath==1.0.1; python_version >= "3.5"
sphinxcontrib-qthelp==1.0.3; python_version >= "3.5"
sphinxcontrib-serializinghtml==1.1.4; python_version >= "3.5"
termcolor==1.1.0
testpath==0.4.4
toml==0.10.2; python_version >= "2.6" and python_version not in "3.0, 3.1, 3.2, 3.3"
tornado==6.1; python_version >= "3.5"
tqdm==4.59.0
traitlets==5.0.5; python_version >= "3.7"
typed-ast==1.4.2
typing-extensions==3.7.4.3
urllib3==1.26.4; python_version >= "2.7" and python_version not in "3.0, 3.1, 3.2, 3.3, 3.4" and python_version < "4"
wcwidth==0.2.5
webencodings==0.5.1
zipp==3.4.1; python_version < "3.8"
# requirements for running tests (on top of environment.yml/requirements.txt)
pytest!=4.6.0
pytest-cov
pytest-timeout
pytest-harvest
flake8
flake8-array-spacing
numpydoc
codespell
pydocstyle
check-manifest
twine
wheel
pooch

# requirements for building docs
sphinx!=4.1.0
https://github.com/numpy/numpydoc/archive/main.zip
pydata-sphinx-theme>=0.6.3
https://github.com/sphinx-gallery/sphinx-gallery/archive/master.zip
sphinxcontrib-bibtex>=2.1.2
seaborn!=0.11.2
sphinx_copybutton
https://github.com/mne-tools/mne-bids/archive/main.zip