osl-ephys 2.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- osl_ephys-2.0.0/LICENSE +23 -0
- osl_ephys-2.0.0/PKG-INFO +140 -0
- osl_ephys-2.0.0/README.md +79 -0
- osl_ephys-2.0.0/osl_ephys/__init__.py +40 -0
- osl_ephys-2.0.0/osl_ephys/glm/README.md +3 -0
- osl_ephys-2.0.0/osl_ephys/glm/__init__.py +6 -0
- osl_ephys-2.0.0/osl_ephys/glm/glm_base.py +995 -0
- osl_ephys-2.0.0/osl_ephys/glm/glm_epochs.py +386 -0
- osl_ephys-2.0.0/osl_ephys/glm/glm_spectrum.py +1367 -0
- osl_ephys-2.0.0/osl_ephys/maxfilter/README.md +141 -0
- osl_ephys-2.0.0/osl_ephys/maxfilter/__init__.py +10 -0
- osl_ephys-2.0.0/osl_ephys/maxfilter/maxfilter.py +775 -0
- osl_ephys-2.0.0/osl_ephys/preprocessing/README.md +114 -0
- osl_ephys-2.0.0/osl_ephys/preprocessing/__init__.py +10 -0
- osl_ephys-2.0.0/osl_ephys/preprocessing/batch.py +1245 -0
- osl_ephys-2.0.0/osl_ephys/preprocessing/ica_label.py +289 -0
- osl_ephys-2.0.0/osl_ephys/preprocessing/mne_wrappers.py +831 -0
- osl_ephys-2.0.0/osl_ephys/preprocessing/osl_wrappers.py +924 -0
- osl_ephys-2.0.0/osl_ephys/preprocessing/plot_ica.py +1405 -0
- osl_ephys-2.0.0/osl_ephys/report/README.md +31 -0
- osl_ephys-2.0.0/osl_ephys/report/__init__.py +8 -0
- osl_ephys-2.0.0/osl_ephys/report/preproc_report.py +1556 -0
- osl_ephys-2.0.0/osl_ephys/report/src_report.py +499 -0
- osl_ephys-2.0.0/osl_ephys/report/templates/raw_subject_panel.html +208 -0
- osl_ephys-2.0.0/osl_ephys/report/templates/raw_summary_panel.html +89 -0
- osl_ephys-2.0.0/osl_ephys/report/templates/src_subject_panel.html +142 -0
- osl_ephys-2.0.0/osl_ephys/report/templates/src_summary_panel.html +129 -0
- osl_ephys-2.0.0/osl_ephys/report/templates/subject_report.html +161 -0
- osl_ephys-2.0.0/osl_ephys/report/templates/summary_report.html +92 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/README.md +3 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/__init__.py +6 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/batch.py +432 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/beamforming.py +1351 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/__init__.py +6 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/Glasser50_space-MNI152NLin6_res-8x8x8.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/Glasser52_binary_space-MNI152NLin6_res-8x8x8.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/HarvOxf-sub-Schaefer100-combined-2mm.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/HarvOxf-sub-Schaefer100-combined-2mm_4d.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/HarvOxf-sub-Schaefer100-combined-2mm_4d_ds8.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/HarvardOxford-sub-prob-bin-2mm.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/MNI152_T1_2mm_brain.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/MNI152_T1_8mm_brain.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/Schaefer2018_100Parcels_7Networks_order_FSLMNI152_2mm.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/Schaefer2018_100Parcels_7Networks_order_FSLMNI152_2mm_4d.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/Schaefer2018_100Parcels_7Networks_order_FSLMNI152_2mm_4d_ds8.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/WTA_fMRI_parcellation_ds2mm.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/WTA_fMRI_parcellation_ds8mm.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/aal_cortical_merged_8mm_stacked.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/dk_cortical.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/dk_full.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/fMRI_parcellation_ds2mm.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/fMRI_parcellation_ds8mm.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/fmri_d100_parcellation_with_PCC_reduced_2mm.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/fmri_d100_parcellation_with_PCC_reduced_2mm_ss5mm_ds8mm.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/fmri_d100_parcellation_with_PCC_tighterMay15_v2_2mm.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/fmri_d100_parcellation_with_PCC_tighterMay15_v2_6mm_exclusive.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/fmri_d100_parcellation_with_PCC_tighterMay15_v2_8mm.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/giles_39_binary.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/reduced_hcp-mmp_2mm.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/files/reduced_hcp-mmp_8mm.nii.gz +0 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/nii.py +131 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/parcellation/parcellation.py +980 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/rhino/__init__.py +10 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/rhino/coreg.py +1105 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/rhino/forward_model.py +325 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/rhino/fsl_utils.py +84 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/rhino/polhemus.py +466 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/rhino/surfaces.py +569 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/rhino/utils.py +1318 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/sign_flipping.py +380 -0
- osl_ephys-2.0.0/osl_ephys/source_recon/wrappers.py +1073 -0
- osl_ephys-2.0.0/osl_ephys/tests/__init__.py +0 -0
- osl_ephys-2.0.0/osl_ephys/tests/test_00_package_canary.py +76 -0
- osl_ephys-2.0.0/osl_ephys/tests/test_batch_api.py +75 -0
- osl_ephys-2.0.0/osl_ephys/tests/test_batch_preproc.py +144 -0
- osl_ephys-2.0.0/osl_ephys/tests/test_file_handling.py +196 -0
- osl_ephys-2.0.0/osl_ephys/tests/test_glm.py +41 -0
- osl_ephys-2.0.0/osl_ephys/tests/test_parallel.py +82 -0
- osl_ephys-2.0.0/osl_ephys/utils/README.md +3 -0
- osl_ephys-2.0.0/osl_ephys/utils/__init__.py +16 -0
- osl_ephys-2.0.0/osl_ephys/utils/create_neuromag306_info.py +98 -0
- osl_ephys-2.0.0/osl_ephys/utils/file_handling.py +217 -0
- osl_ephys-2.0.0/osl_ephys/utils/logger.py +161 -0
- osl_ephys-2.0.0/osl_ephys/utils/misc.py +30 -0
- osl_ephys-2.0.0/osl_ephys/utils/neuromag306_info.yml +1548 -0
- osl_ephys-2.0.0/osl_ephys/utils/opm.py +347 -0
- osl_ephys-2.0.0/osl_ephys/utils/package.py +44 -0
- osl_ephys-2.0.0/osl_ephys/utils/parallel.py +79 -0
- osl_ephys-2.0.0/osl_ephys/utils/run_func.py +38 -0
- osl_ephys-2.0.0/osl_ephys/utils/simulate.py +233 -0
- osl_ephys-2.0.0/osl_ephys/utils/simulation_config/megin_template_info.fif +0 -0
- osl_ephys-2.0.0/osl_ephys/utils/simulation_config/reduced_mvar_params_grad.npy +0 -0
- osl_ephys-2.0.0/osl_ephys/utils/simulation_config/reduced_mvar_params_mag.npy +0 -0
- osl_ephys-2.0.0/osl_ephys/utils/simulation_config/reduced_mvar_pcacomp_grad.npy +0 -0
- osl_ephys-2.0.0/osl_ephys/utils/simulation_config/reduced_mvar_pcacomp_mag.npy +0 -0
- osl_ephys-2.0.0/osl_ephys/utils/simulation_config/reduced_mvar_residcov_grad.npy +0 -0
- osl_ephys-2.0.0/osl_ephys/utils/simulation_config/reduced_mvar_residcov_mag.npy +0 -0
- osl_ephys-2.0.0/osl_ephys/utils/spmio/__init__.py +1 -0
- osl_ephys-2.0.0/osl_ephys/utils/spmio/_data.py +132 -0
- osl_ephys-2.0.0/osl_ephys/utils/spmio/_events.py +153 -0
- osl_ephys-2.0.0/osl_ephys/utils/spmio/_spmmeeg_utils.py +19 -0
- osl_ephys-2.0.0/osl_ephys/utils/spmio/spmmeeg.py +245 -0
- osl_ephys-2.0.0/osl_ephys/utils/study.py +155 -0
- osl_ephys-2.0.0/osl_ephys/utils/version_utils.py +64 -0
- osl_ephys-2.0.0/osl_ephys.egg-info/PKG-INFO +140 -0
- osl_ephys-2.0.0/osl_ephys.egg-info/SOURCES.txt +112 -0
- osl_ephys-2.0.0/osl_ephys.egg-info/dependency_links.txt +1 -0
- osl_ephys-2.0.0/osl_ephys.egg-info/entry_points.txt +6 -0
- osl_ephys-2.0.0/osl_ephys.egg-info/not-zip-safe +1 -0
- osl_ephys-2.0.0/osl_ephys.egg-info/requires.txt +44 -0
- osl_ephys-2.0.0/osl_ephys.egg-info/top_level.txt +1 -0
- osl_ephys-2.0.0/setup.cfg +24 -0
- osl_ephys-2.0.0/setup.py +90 -0
osl_ephys-2.0.0/LICENSE
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Copyright 2021-2024 University of Oxford, Oxford, UK.
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
This software includes code from MNE-Python, which is licensed under the BSD-3-Clause license:
|
|
18
|
+
https://github.com/mne-tools/mne-python/blob/main/LICENSE.txt
|
|
19
|
+
|
|
20
|
+
This software includes code from FSL-Python, which is licensed under the Apache License:
|
|
21
|
+
https://git.fmrib.ox.ac.uk/fsl/fslpy/-/blob/main/LICENSE
|
|
22
|
+
|
|
23
|
+
For the full text of these licenses, please see the LICENSE file in the root directory of these projects.
|
osl_ephys-2.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: osl-ephys
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: OHBA Software Library for the analysis of electrophysiological data
|
|
5
|
+
Author: OHBA Analysis Group
|
|
6
|
+
License: MIT
|
|
7
|
+
Classifier: Development Status :: 4 - Beta
|
|
8
|
+
Classifier: Intended Audience :: Science/Research
|
|
9
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
10
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
11
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Requires-Python: >=3.7
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: numpy
|
|
21
|
+
Requires-Dist: scipy
|
|
22
|
+
Requires-Dist: matplotlib
|
|
23
|
+
Requires-Dist: mne~=1.3.1
|
|
24
|
+
Requires-Dist: scikit-learn
|
|
25
|
+
Requires-Dist: fslpy
|
|
26
|
+
Requires-Dist: sails
|
|
27
|
+
Requires-Dist: tabulate
|
|
28
|
+
Requires-Dist: pyyaml>=5.1
|
|
29
|
+
Requires-Dist: neurokit2
|
|
30
|
+
Requires-Dist: jinja2==3.0.3
|
|
31
|
+
Requires-Dist: glmtools
|
|
32
|
+
Requires-Dist: numba
|
|
33
|
+
Requires-Dist: nilearn
|
|
34
|
+
Requires-Dist: dask
|
|
35
|
+
Requires-Dist: distributed
|
|
36
|
+
Requires-Dist: parse
|
|
37
|
+
Requires-Dist: opencv-python
|
|
38
|
+
Requires-Dist: panel
|
|
39
|
+
Requires-Dist: h5io
|
|
40
|
+
Provides-Extra: dev
|
|
41
|
+
Requires-Dist: setuptools>=41.0.1; extra == "dev"
|
|
42
|
+
Requires-Dist: pytest; extra == "dev"
|
|
43
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
44
|
+
Requires-Dist: coverage; extra == "dev"
|
|
45
|
+
Requires-Dist: flake8; extra == "dev"
|
|
46
|
+
Provides-Extra: doc
|
|
47
|
+
Requires-Dist: sphinx==5.3.0; extra == "doc"
|
|
48
|
+
Requires-Dist: numpydoc; extra == "doc"
|
|
49
|
+
Requires-Dist: sphinx_gallery; extra == "doc"
|
|
50
|
+
Requires-Dist: pydata-sphinx-theme; extra == "doc"
|
|
51
|
+
Provides-Extra: full
|
|
52
|
+
Requires-Dist: setuptools>=41.0.1; extra == "full"
|
|
53
|
+
Requires-Dist: pytest; extra == "full"
|
|
54
|
+
Requires-Dist: pytest-cov; extra == "full"
|
|
55
|
+
Requires-Dist: coverage; extra == "full"
|
|
56
|
+
Requires-Dist: flake8; extra == "full"
|
|
57
|
+
Requires-Dist: sphinx==5.3.0; extra == "full"
|
|
58
|
+
Requires-Dist: numpydoc; extra == "full"
|
|
59
|
+
Requires-Dist: sphinx_gallery; extra == "full"
|
|
60
|
+
Requires-Dist: pydata-sphinx-theme; extra == "full"
|
|
61
|
+
|
|
62
|
+
# The OHBA Software Library for the analysis of electrophysiological data (osl-ephys)
|
|
63
|
+
|
|
64
|
+
Tools for MEG/EEG analysis.
|
|
65
|
+
|
|
66
|
+
Documentation: https://osl-ephys.readthedocs.io/en/latest/.
|
|
67
|
+
|
|
68
|
+
## Installation
|
|
69
|
+
|
|
70
|
+
See the [official documentation](https://osl-ephys.readthedocs.io/en/latest/install.html) for recommended installation instructions.
|
|
71
|
+
|
|
72
|
+
Alternatively, osl-ephys can be installed from source code within a [Miniconda](https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html) (or [Anaconda](https://docs.anaconda.com/free/anaconda/install/index.html)) environment using the following.
|
|
73
|
+
|
|
74
|
+
### Linux
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
git clone https://github.com/OHBA-analysis/osl-ephys.git
|
|
78
|
+
cd osl-ephys
|
|
79
|
+
conda env create -f envs/linux.yml
|
|
80
|
+
conda activate osle
|
|
81
|
+
pip install -e .
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Mac
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
git clone https://github.com/OHBA-analysis/osl-ephys.git
|
|
88
|
+
cd osl-ephys
|
|
89
|
+
conda env create -f envs/mac.yml
|
|
90
|
+
conda activate osle
|
|
91
|
+
pip install -e .
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Oxford-specific computers
|
|
95
|
+
|
|
96
|
+
If you are installing on an OHBA workstation computer (HBAWS) use:
|
|
97
|
+
```
|
|
98
|
+
git clone https://github.com/OHBA-analysis/osl-ephys.git
|
|
99
|
+
cd osl-ephys
|
|
100
|
+
conda env create -f envs/hbaws.yml
|
|
101
|
+
conda activate osle
|
|
102
|
+
pip install -e .
|
|
103
|
+
pip install spyder==5.1.5
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Or on the BMRC cluster:
|
|
107
|
+
```
|
|
108
|
+
git clone https://github.com/OHBA-analysis/osl-ephys.git
|
|
109
|
+
cd osl-ephys
|
|
110
|
+
conda env create -f envs/bmrc.yml
|
|
111
|
+
conda activate osle
|
|
112
|
+
pip install -e .
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Removing OSL
|
|
116
|
+
|
|
117
|
+
Simply removing the conda environment and delete the repository:
|
|
118
|
+
```
|
|
119
|
+
conda env remove -n osle
|
|
120
|
+
rm -rf osl-ephys
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## For Developers
|
|
124
|
+
|
|
125
|
+
Run tests:
|
|
126
|
+
```
|
|
127
|
+
cd osl_ephys
|
|
128
|
+
pytest tests
|
|
129
|
+
```
|
|
130
|
+
or to run a specific test:
|
|
131
|
+
```
|
|
132
|
+
cd osl_ephys/tests
|
|
133
|
+
pytest test_file_handling.py
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Build documentation (if `build_sphinx` is not recognised, first try `pip install sphinx==5.3.0`):
|
|
137
|
+
```
|
|
138
|
+
python setup.py build_sphinx
|
|
139
|
+
```
|
|
140
|
+
Compiled docs can be found in `doc/build/html/index.html`.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# The OHBA Software Library for the analysis of electrophysiological data (osl-ephys)
|
|
2
|
+
|
|
3
|
+
Tools for MEG/EEG analysis.
|
|
4
|
+
|
|
5
|
+
Documentation: https://osl-ephys.readthedocs.io/en/latest/.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
See the [official documentation](https://osl-ephys.readthedocs.io/en/latest/install.html) for recommended installation instructions.
|
|
10
|
+
|
|
11
|
+
Alternatively, osl-ephys can be installed from source code within a [Miniconda](https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html) (or [Anaconda](https://docs.anaconda.com/free/anaconda/install/index.html)) environment using the following.
|
|
12
|
+
|
|
13
|
+
### Linux
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
git clone https://github.com/OHBA-analysis/osl-ephys.git
|
|
17
|
+
cd osl-ephys
|
|
18
|
+
conda env create -f envs/linux.yml
|
|
19
|
+
conda activate osle
|
|
20
|
+
pip install -e .
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Mac
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
git clone https://github.com/OHBA-analysis/osl-ephys.git
|
|
27
|
+
cd osl-ephys
|
|
28
|
+
conda env create -f envs/mac.yml
|
|
29
|
+
conda activate osle
|
|
30
|
+
pip install -e .
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Oxford-specific computers
|
|
34
|
+
|
|
35
|
+
If you are installing on an OHBA workstation computer (HBAWS) use:
|
|
36
|
+
```
|
|
37
|
+
git clone https://github.com/OHBA-analysis/osl-ephys.git
|
|
38
|
+
cd osl-ephys
|
|
39
|
+
conda env create -f envs/hbaws.yml
|
|
40
|
+
conda activate osle
|
|
41
|
+
pip install -e .
|
|
42
|
+
pip install spyder==5.1.5
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Or on the BMRC cluster:
|
|
46
|
+
```
|
|
47
|
+
git clone https://github.com/OHBA-analysis/osl-ephys.git
|
|
48
|
+
cd osl-ephys
|
|
49
|
+
conda env create -f envs/bmrc.yml
|
|
50
|
+
conda activate osle
|
|
51
|
+
pip install -e .
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Removing OSL
|
|
55
|
+
|
|
56
|
+
Simply removing the conda environment and delete the repository:
|
|
57
|
+
```
|
|
58
|
+
conda env remove -n osle
|
|
59
|
+
rm -rf osl-ephys
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## For Developers
|
|
63
|
+
|
|
64
|
+
Run tests:
|
|
65
|
+
```
|
|
66
|
+
cd osl_ephys
|
|
67
|
+
pytest tests
|
|
68
|
+
```
|
|
69
|
+
or to run a specific test:
|
|
70
|
+
```
|
|
71
|
+
cd osl_ephys/tests
|
|
72
|
+
pytest test_file_handling.py
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Build documentation (if `build_sphinx` is not recognised, first try `pip install sphinx==5.3.0`):
|
|
76
|
+
```
|
|
77
|
+
python setup.py build_sphinx
|
|
78
|
+
```
|
|
79
|
+
Compiled docs can be found in `doc/build/html/index.html`.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/python
|
|
2
|
+
|
|
3
|
+
# --------------------------------------------------------
|
|
4
|
+
# If user hasn't configured NumExpr environment the an irritating low-level log
|
|
5
|
+
# is generated. We supress it by setting a default value of 8 if not already
|
|
6
|
+
# set.
|
|
7
|
+
#
|
|
8
|
+
# https://numexpr.readthedocs.io/projects/NumExpr3/en/latest/user_guide.html#threadpool-configuration
|
|
9
|
+
# https://github.com/pydata/numexpr/blob/7c2ef387d81cd450e8220fe4174cf46ec559994c/numexpr/utils.py#L118
|
|
10
|
+
|
|
11
|
+
import os
|
|
12
|
+
if 'NUMEXPR_MAX_THREADS' not in os.environ:
|
|
13
|
+
os.environ['NUMEXPR_MAX_THREADS'] = '8'
|
|
14
|
+
|
|
15
|
+
# Some modules are chatty by default when a logger is on - set log-levels to
|
|
16
|
+
# WARNING on setup
|
|
17
|
+
import logging
|
|
18
|
+
logging.getLogger("asyncio").setLevel(logging.WARNING)
|
|
19
|
+
logging.getLogger("matplotlib").setLevel(logging.WARNING)
|
|
20
|
+
logging.getLogger("PIL").setLevel(logging.WARNING)
|
|
21
|
+
|
|
22
|
+
# Feels like there should be a better solution for this. How do we setup a
|
|
23
|
+
# logger which only produces OSL outputs?!
|
|
24
|
+
|
|
25
|
+
# --------------------------------------------------------
|
|
26
|
+
# Main importing - set module structure here
|
|
27
|
+
|
|
28
|
+
from . import utils # noqa: F401, F403
|
|
29
|
+
from . import preprocessing # noqa: F401, F403
|
|
30
|
+
from . import maxfilter # noqa: F401, F403
|
|
31
|
+
from . import report # noqa: F401, F403
|
|
32
|
+
from . import source_recon # noqa: F401, F403
|
|
33
|
+
from . import glm # noqa: F401, F403
|
|
34
|
+
|
|
35
|
+
# --------------------------------------------------------
|
|
36
|
+
osl_logger = logging.getLogger(__name__)
|
|
37
|
+
osl_logger.debug('osl-ephys main init complete')
|
|
38
|
+
|
|
39
|
+
# --------------------------------------------------------
|
|
40
|
+
__version__ = '2.0.0'
|