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

Extra filtering example #432

Merged
merged 5 commits into from
Jan 24, 2022
Merged
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
2 changes: 1 addition & 1 deletion doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ General

Enhancements

* Update SNIRF exporter to meet v1.0 validator requirements :meth:`mne_nirs.io.write_raw_snirf`. By `Robert Luke`_.
* Update SNIRF exporter to meet v1.0 validator requirements :meth:`mne_nirs.io.snirf.write_raw_snirf`. By `Robert Luke`_.
* Add ability to provide custom channel weighting in :meth:`mne_nirs.statistics.RegressionResults.to_dataframe_region_of_interest` computation. By `Robert Luke`_.


Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
- scipy
- matplotlib
- numba
- pandas
- pandas==1.3.2
- xlrd
- scikit-learn
- h5py
Expand Down
12 changes: 12 additions & 0 deletions examples/general/plot_30_frequency.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,18 @@
fig.axes[0].set_title('')


# %%
# Filter Neural Signal
# ---------------------------------------------------------------------
#
# The effect of filtering on the neural signal is demonstrated below.
# The green line illustrates the signal before filtering, and the red line
# shows the signal after filtering.

fig = raw_haemo.plot_psd(average=True, fmax=2, xscale='log', color='r', show=False)
raw_haemo = raw_haemo.filter(l_freq=None, h_freq=0.4, h_trans_bandwidth=0.2)
raw_haemo.plot_psd(average=True, fmax=2, xscale='log', ax=fig.axes, color='g')


# %%
# Understanding the relation between stimulus presentation and response
Expand Down
1 change: 0 additions & 1 deletion requirements_doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ sphinx-multiversion
matplotlib
pillow
numpy
pandas
h5py
https://codeload.github.com/rob-luke/mne-bids/zip/nirs
lets-plot
Expand Down
4 changes: 2 additions & 2 deletions tools/github_actions_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ else
pip install --progress-bar off --upgrade --pre --only-binary ":all:" python-dateutil pytz joblib threadpoolctl six
echo "PyQt5"
pip install --progress-bar off --upgrade --pre --only-binary ":all:" --no-deps --extra-index-url https://www.riverbankcomputing.com/pypi/simple PyQt5 PyQt5-sip PyQt5-Qt5
echo "NumPy/pandas etc."
pip install --progress-bar off --upgrade --pre --only-binary ":all:" --no-deps -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" numpy pandas "scikit-learn>=0.24.2" dipy
echo "NumPy etc."
pip install --progress-bar off --upgrade --pre --only-binary ":all:" --no-deps -i "https://pypi.anaconda.org/scipy-wheels-nightly/simple" numpy "scikit-learn>=0.24.2" dipy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not great if you aren't testing --pre pandas, because it means the next time they cut a release user code will probably break. (You could require a specific version of pandas in setup.py, but then you could break someones' environment, which is worse than breaking one use case.)

Do you need help looking into the pandas issue here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need help looking into the pandas issue here?

Yes please @larsoner I havent started digging yet, I was just focused on getting the CIs green first. but seems I may have made more issues than I solved. Thanks

echo "H5py, pillow, matplotlib"
pip install --progress-bar off --upgrade --pre --only-binary ":all:" --no-deps -f "https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com" h5py pillow matplotlib
echo "Numba, nilearn"
Expand Down