py-neuromodulation 0.0.4__py3-none-any.whl → 0.0.6__py3-none-any.whl
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.
- py_neuromodulation/ConnectivityDecoding/_get_grid_hull.m +34 -34
- py_neuromodulation/ConnectivityDecoding/_get_grid_whole_brain.py +95 -106
- py_neuromodulation/ConnectivityDecoding/_helper_write_connectome.py +107 -119
- py_neuromodulation/__init__.py +80 -13
- py_neuromodulation/{nm_RMAP.py → analysis/RMAP.py} +496 -531
- py_neuromodulation/analysis/__init__.py +4 -0
- py_neuromodulation/{nm_decode.py → analysis/decode.py} +918 -992
- py_neuromodulation/{nm_analysis.py → analysis/feature_reader.py} +994 -1074
- py_neuromodulation/{nm_plots.py → analysis/plots.py} +627 -612
- py_neuromodulation/{nm_stats.py → analysis/stats.py} +458 -480
- py_neuromodulation/data/README +6 -6
- py_neuromodulation/data/dataset_description.json +8 -8
- py_neuromodulation/data/participants.json +32 -32
- py_neuromodulation/data/participants.tsv +2 -2
- py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_space-mni_coordsystem.json +5 -5
- py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_space-mni_electrodes.tsv +11 -11
- py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_channels.tsv +11 -11
- py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_ieeg.json +18 -18
- py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_ieeg.vhdr +35 -35
- py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_ieeg.vmrk +13 -13
- py_neuromodulation/data/sub-testsub/ses-EphysMedOff/sub-testsub_ses-EphysMedOff_scans.tsv +2 -2
- py_neuromodulation/default_settings.yaml +241 -0
- py_neuromodulation/features/__init__.py +31 -0
- py_neuromodulation/features/bandpower.py +165 -0
- py_neuromodulation/features/bispectra.py +157 -0
- py_neuromodulation/features/bursts.py +297 -0
- py_neuromodulation/features/coherence.py +255 -0
- py_neuromodulation/features/feature_processor.py +121 -0
- py_neuromodulation/features/fooof.py +142 -0
- py_neuromodulation/features/hjorth_raw.py +57 -0
- py_neuromodulation/features/linelength.py +21 -0
- py_neuromodulation/features/mne_connectivity.py +148 -0
- py_neuromodulation/features/nolds.py +94 -0
- py_neuromodulation/features/oscillatory.py +249 -0
- py_neuromodulation/features/sharpwaves.py +432 -0
- py_neuromodulation/filter/__init__.py +3 -0
- py_neuromodulation/filter/kalman_filter.py +67 -0
- py_neuromodulation/filter/kalman_filter_external.py +1890 -0
- py_neuromodulation/filter/mne_filter.py +128 -0
- py_neuromodulation/filter/notch_filter.py +93 -0
- py_neuromodulation/grid_cortex.tsv +40 -40
- py_neuromodulation/liblsl/libpugixml.so.1.12 +0 -0
- py_neuromodulation/liblsl/linux/bionic_amd64/liblsl.1.16.2.so +0 -0
- py_neuromodulation/liblsl/linux/bookworm_amd64/liblsl.1.16.2.so +0 -0
- py_neuromodulation/liblsl/linux/focal_amd46/liblsl.1.16.2.so +0 -0
- py_neuromodulation/liblsl/linux/jammy_amd64/liblsl.1.16.2.so +0 -0
- py_neuromodulation/liblsl/linux/jammy_x86/liblsl.1.16.2.so +0 -0
- py_neuromodulation/liblsl/linux/noble_amd64/liblsl.1.16.2.so +0 -0
- py_neuromodulation/liblsl/macos/amd64/liblsl.1.16.2.dylib +0 -0
- py_neuromodulation/liblsl/macos/arm64/liblsl.1.16.0.dylib +0 -0
- py_neuromodulation/liblsl/windows/amd64/liblsl.1.16.2.dll +0 -0
- py_neuromodulation/liblsl/windows/x86/liblsl.1.16.2.dll +0 -0
- py_neuromodulation/processing/__init__.py +10 -0
- py_neuromodulation/{nm_artifacts.py → processing/artifacts.py} +29 -25
- py_neuromodulation/processing/data_preprocessor.py +77 -0
- py_neuromodulation/processing/filter_preprocessing.py +78 -0
- py_neuromodulation/processing/normalization.py +175 -0
- py_neuromodulation/{nm_projection.py → processing/projection.py} +370 -394
- py_neuromodulation/{nm_rereference.py → processing/rereference.py} +97 -95
- py_neuromodulation/{nm_resample.py → processing/resample.py} +56 -50
- py_neuromodulation/stream/__init__.py +3 -0
- py_neuromodulation/stream/data_processor.py +325 -0
- py_neuromodulation/stream/generator.py +53 -0
- py_neuromodulation/stream/mnelsl_player.py +94 -0
- py_neuromodulation/stream/mnelsl_stream.py +120 -0
- py_neuromodulation/stream/settings.py +292 -0
- py_neuromodulation/stream/stream.py +427 -0
- py_neuromodulation/utils/__init__.py +2 -0
- py_neuromodulation/{nm_define_nmchannels.py → utils/channels.py} +305 -302
- py_neuromodulation/utils/database.py +149 -0
- py_neuromodulation/utils/io.py +378 -0
- py_neuromodulation/utils/keyboard.py +52 -0
- py_neuromodulation/utils/logging.py +66 -0
- py_neuromodulation/utils/types.py +251 -0
- {py_neuromodulation-0.0.4.dist-info → py_neuromodulation-0.0.6.dist-info}/METADATA +28 -33
- py_neuromodulation-0.0.6.dist-info/RECORD +89 -0
- {py_neuromodulation-0.0.4.dist-info → py_neuromodulation-0.0.6.dist-info}/WHEEL +1 -1
- {py_neuromodulation-0.0.4.dist-info → py_neuromodulation-0.0.6.dist-info}/licenses/LICENSE +21 -21
- py_neuromodulation/FieldTrip.py +0 -589
- py_neuromodulation/_write_example_dataset_helper.py +0 -65
- py_neuromodulation/nm_EpochStream.py +0 -92
- py_neuromodulation/nm_IO.py +0 -417
- py_neuromodulation/nm_across_patient_decoding.py +0 -927
- py_neuromodulation/nm_bispectra.py +0 -168
- py_neuromodulation/nm_bursts.py +0 -198
- py_neuromodulation/nm_coherence.py +0 -205
- py_neuromodulation/nm_cohortwrapper.py +0 -435
- py_neuromodulation/nm_eval_timing.py +0 -239
- py_neuromodulation/nm_features.py +0 -116
- py_neuromodulation/nm_features_abc.py +0 -39
- py_neuromodulation/nm_filter.py +0 -219
- py_neuromodulation/nm_filter_preprocessing.py +0 -91
- py_neuromodulation/nm_fooof.py +0 -159
- py_neuromodulation/nm_generator.py +0 -37
- py_neuromodulation/nm_hjorth_raw.py +0 -73
- py_neuromodulation/nm_kalmanfilter.py +0 -58
- py_neuromodulation/nm_linelength.py +0 -33
- py_neuromodulation/nm_mne_connectivity.py +0 -112
- py_neuromodulation/nm_nolds.py +0 -93
- py_neuromodulation/nm_normalization.py +0 -214
- py_neuromodulation/nm_oscillatory.py +0 -448
- py_neuromodulation/nm_run_analysis.py +0 -435
- py_neuromodulation/nm_settings.json +0 -338
- py_neuromodulation/nm_settings.py +0 -68
- py_neuromodulation/nm_sharpwaves.py +0 -401
- py_neuromodulation/nm_stream_abc.py +0 -218
- py_neuromodulation/nm_stream_offline.py +0 -359
- py_neuromodulation/utils/_logging.py +0 -24
- py_neuromodulation-0.0.4.dist-info/RECORD +0 -72
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
from os import PathLike
|
|
2
|
+
from math import isnan
|
|
3
|
+
from typing import Any, Literal, Protocol, TYPE_CHECKING, runtime_checkable
|
|
4
|
+
from pydantic import ConfigDict, Field, model_validator, BaseModel
|
|
5
|
+
from pydantic_core import ValidationError, InitErrorDetails
|
|
6
|
+
from pprint import pformat
|
|
7
|
+
from collections.abc import Sequence
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import numpy as np
|
|
11
|
+
from py_neuromodulation import NMSettings
|
|
12
|
+
|
|
13
|
+
###################################
|
|
14
|
+
########## TYPE ALIASES ##########
|
|
15
|
+
###################################
|
|
16
|
+
|
|
17
|
+
_PathLike = str | PathLike
|
|
18
|
+
|
|
19
|
+
FeatureName = Literal[
|
|
20
|
+
"raw_hjorth",
|
|
21
|
+
"return_raw",
|
|
22
|
+
"bandpass_filter",
|
|
23
|
+
"stft",
|
|
24
|
+
"fft",
|
|
25
|
+
"welch",
|
|
26
|
+
"sharpwave_analysis",
|
|
27
|
+
"fooof",
|
|
28
|
+
"nolds",
|
|
29
|
+
"coherence",
|
|
30
|
+
"bursts",
|
|
31
|
+
"linelength",
|
|
32
|
+
"mne_connectivity",
|
|
33
|
+
"bispectrum",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
PreprocessorName = Literal[
|
|
37
|
+
"preprocessing_filter",
|
|
38
|
+
"notch_filter",
|
|
39
|
+
"raw_resampling",
|
|
40
|
+
"re_referencing",
|
|
41
|
+
"raw_normalization",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
NormMethod = Literal[
|
|
45
|
+
"mean",
|
|
46
|
+
"median",
|
|
47
|
+
"zscore",
|
|
48
|
+
"zscore-median",
|
|
49
|
+
"quantile",
|
|
50
|
+
"power",
|
|
51
|
+
"robust",
|
|
52
|
+
"minmax",
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
###################################
|
|
56
|
+
######## PROTOCOL CLASSES ########
|
|
57
|
+
###################################
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
@runtime_checkable
|
|
61
|
+
class NMFeature(Protocol):
|
|
62
|
+
def __init__(
|
|
63
|
+
self, settings: "NMSettings", ch_names: Sequence[str], sfreq: int | float
|
|
64
|
+
) -> None: ...
|
|
65
|
+
|
|
66
|
+
def calc_feature(self, data: "np.ndarray") -> dict:
|
|
67
|
+
"""
|
|
68
|
+
Feature calculation method. Each method needs to loop through all channels
|
|
69
|
+
|
|
70
|
+
Parameters
|
|
71
|
+
----------
|
|
72
|
+
data : 'np.ndarray'
|
|
73
|
+
(channels, time)
|
|
74
|
+
|
|
75
|
+
Returns
|
|
76
|
+
-------
|
|
77
|
+
dict
|
|
78
|
+
"""
|
|
79
|
+
...
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
class NMPreprocessor(Protocol):
|
|
83
|
+
def __init__(self, sfreq: float, settings: "NMSettings") -> None: ...
|
|
84
|
+
|
|
85
|
+
def process(self, data: "np.ndarray") -> "np.ndarray": ...
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
###################################
|
|
89
|
+
######## PYDANTIC CLASSES ########
|
|
90
|
+
###################################
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class NMBaseModel(BaseModel):
|
|
94
|
+
model_config = ConfigDict(validate_assignment=False, extra="allow")
|
|
95
|
+
|
|
96
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
97
|
+
if kwargs:
|
|
98
|
+
super().__init__(**kwargs)
|
|
99
|
+
else:
|
|
100
|
+
field_names = list(self.model_fields.keys())
|
|
101
|
+
kwargs = {}
|
|
102
|
+
for i in range(len(args)):
|
|
103
|
+
kwargs[field_names[i]] = args[i]
|
|
104
|
+
super().__init__(**kwargs)
|
|
105
|
+
|
|
106
|
+
def __str__(self):
|
|
107
|
+
return pformat(self.model_dump())
|
|
108
|
+
|
|
109
|
+
def __repr__(self):
|
|
110
|
+
return pformat(self.model_dump())
|
|
111
|
+
|
|
112
|
+
def validate(self) -> Any: # type: ignore
|
|
113
|
+
return self.model_validate(self.model_dump())
|
|
114
|
+
|
|
115
|
+
def __getitem__(self, key):
|
|
116
|
+
return getattr(self, key)
|
|
117
|
+
|
|
118
|
+
def __setitem__(self, key, value) -> None:
|
|
119
|
+
setattr(self, key, value)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class FrequencyRange(NMBaseModel):
|
|
123
|
+
frequency_low_hz: float = Field(gt=0)
|
|
124
|
+
frequency_high_hz: float = Field(gt=0)
|
|
125
|
+
|
|
126
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
127
|
+
super().__init__(*args, **kwargs)
|
|
128
|
+
|
|
129
|
+
def __getitem__(self, item: int):
|
|
130
|
+
match item:
|
|
131
|
+
case 0:
|
|
132
|
+
return self.frequency_low_hz
|
|
133
|
+
case 1:
|
|
134
|
+
return self.frequency_high_hz
|
|
135
|
+
case _:
|
|
136
|
+
raise IndexError(f"Index {item} out of range")
|
|
137
|
+
|
|
138
|
+
def as_tuple(self) -> tuple[float, float]:
|
|
139
|
+
return (self.frequency_low_hz, self.frequency_high_hz)
|
|
140
|
+
|
|
141
|
+
def __iter__(self): # type: ignore
|
|
142
|
+
return iter(self.as_tuple())
|
|
143
|
+
|
|
144
|
+
@model_validator(mode="after")
|
|
145
|
+
def validate_range(self):
|
|
146
|
+
if not (isnan(self.frequency_high_hz) or isnan(self.frequency_low_hz)):
|
|
147
|
+
assert (
|
|
148
|
+
self.frequency_high_hz > self.frequency_low_hz
|
|
149
|
+
), "Frequency high must be greater than frequency low"
|
|
150
|
+
return self
|
|
151
|
+
|
|
152
|
+
@classmethod
|
|
153
|
+
def create_from(cls, input) -> "FrequencyRange":
|
|
154
|
+
match input:
|
|
155
|
+
case FrequencyRange():
|
|
156
|
+
return input
|
|
157
|
+
case dict() if "frequency_low_hz" in input and "frequency_high_hz" in input:
|
|
158
|
+
return FrequencyRange(
|
|
159
|
+
input["frequency_low_hz"], input["frequency_high_hz"]
|
|
160
|
+
)
|
|
161
|
+
case Sequence() if len(input) == 2:
|
|
162
|
+
return FrequencyRange(input[0], input[1])
|
|
163
|
+
case _:
|
|
164
|
+
raise ValueError("Invalid input for FrequencyRange creation.")
|
|
165
|
+
|
|
166
|
+
@model_validator(mode="before")
|
|
167
|
+
@classmethod
|
|
168
|
+
def check_input(cls, input):
|
|
169
|
+
match input:
|
|
170
|
+
case dict() if "frequency_low_hz" in input and "frequency_high_hz" in input:
|
|
171
|
+
return input
|
|
172
|
+
case Sequence() if len(input) == 2:
|
|
173
|
+
return {"frequency_low_hz": input[0], "frequency_high_hz": input[1]}
|
|
174
|
+
case _:
|
|
175
|
+
raise ValueError(
|
|
176
|
+
"Value for FrequencyRange must be a dictionary, "
|
|
177
|
+
"or a sequence of 2 numeric values, "
|
|
178
|
+
f"but got {input} instead."
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
class BoolSelector(NMBaseModel):
|
|
183
|
+
def get_enabled(self):
|
|
184
|
+
return [
|
|
185
|
+
f
|
|
186
|
+
for f in self.model_fields.keys()
|
|
187
|
+
if (isinstance(self[f], bool) and self[f])
|
|
188
|
+
]
|
|
189
|
+
|
|
190
|
+
def enable_all(self):
|
|
191
|
+
for f in self.model_fields.keys():
|
|
192
|
+
if isinstance(self[f], bool):
|
|
193
|
+
self[f] = True
|
|
194
|
+
|
|
195
|
+
def disable_all(self):
|
|
196
|
+
for f in self.model_fields.keys():
|
|
197
|
+
if isinstance(self[f], bool):
|
|
198
|
+
self[f] = False
|
|
199
|
+
|
|
200
|
+
def __iter__(self): # type: ignore
|
|
201
|
+
return iter(self.model_dump().keys())
|
|
202
|
+
|
|
203
|
+
@classmethod
|
|
204
|
+
def list_all(cls):
|
|
205
|
+
return list(cls.model_fields.keys())
|
|
206
|
+
|
|
207
|
+
@classmethod
|
|
208
|
+
def print_all(cls):
|
|
209
|
+
for f in cls.list_all():
|
|
210
|
+
print(f)
|
|
211
|
+
|
|
212
|
+
@classmethod
|
|
213
|
+
def get_fields(cls):
|
|
214
|
+
return cls.model_fields
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
def create_validation_error(
|
|
218
|
+
error_message: str,
|
|
219
|
+
loc: list[str | int] = None,
|
|
220
|
+
title: str = "Validation Error",
|
|
221
|
+
input_type: Literal["python", "json"] = "python",
|
|
222
|
+
hide_input: bool = False,
|
|
223
|
+
) -> ValidationError:
|
|
224
|
+
"""
|
|
225
|
+
Factory function to create a Pydantic v2 ValidationError instance from a single error message.
|
|
226
|
+
|
|
227
|
+
Args:
|
|
228
|
+
error_message (str): The error message for the ValidationError.
|
|
229
|
+
loc (List[str | int], optional): The location of the error. Defaults to None.
|
|
230
|
+
title (str, optional): The title of the error. Defaults to "Validation Error".
|
|
231
|
+
input_type (Literal["python", "json"], optional): Whether the error is for a Python object or JSON. Defaults to "python".
|
|
232
|
+
hide_input (bool, optional): Whether to hide the input value in the error message. Defaults to False.
|
|
233
|
+
|
|
234
|
+
Returns:
|
|
235
|
+
ValidationError: A Pydantic ValidationError instance.
|
|
236
|
+
"""
|
|
237
|
+
if loc is None:
|
|
238
|
+
loc = []
|
|
239
|
+
|
|
240
|
+
line_errors = [
|
|
241
|
+
InitErrorDetails(
|
|
242
|
+
type="value_error", loc=tuple(loc), input=None, ctx={"error": error_message}
|
|
243
|
+
)
|
|
244
|
+
]
|
|
245
|
+
|
|
246
|
+
return ValidationError.from_exception_data(
|
|
247
|
+
title=title,
|
|
248
|
+
line_errors=line_errors,
|
|
249
|
+
input_type=input_type,
|
|
250
|
+
hide_input=hide_input,
|
|
251
|
+
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: py_neuromodulation
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.6
|
|
4
4
|
Summary: Real-time analysis of intracranial neurophysiology recordings.
|
|
5
5
|
Project-URL: bugtracker, https://github.com/neuromodulation/py_neuromodulation/issues
|
|
6
6
|
Project-URL: repository, https://github.com/neuromodulation/py_neuromodulation
|
|
@@ -33,40 +33,48 @@ Classifier: Development Status :: 2 - Pre-Alpha
|
|
|
33
33
|
Classifier: License :: OSI Approved :: MIT License
|
|
34
34
|
Classifier: Programming Language :: Python
|
|
35
35
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
36
|
-
Requires-Python: >=3.
|
|
37
|
-
Requires-Dist: black>=24.2.0
|
|
38
|
-
Requires-Dist: filterpy>=1.4.5
|
|
36
|
+
Requires-Python: >=3.11
|
|
39
37
|
Requires-Dist: fooof
|
|
40
|
-
Requires-Dist: hatch>=1.9.4
|
|
41
|
-
Requires-Dist: imbalanced-learn
|
|
42
|
-
Requires-Dist: ipython
|
|
43
38
|
Requires-Dist: joblib>=1.3.2
|
|
44
|
-
Requires-Dist: matplotlib>=3.
|
|
39
|
+
Requires-Dist: matplotlib>=3.9.0
|
|
45
40
|
Requires-Dist: mne
|
|
46
41
|
Requires-Dist: mne-bids>=0.8
|
|
47
42
|
Requires-Dist: mne-connectivity
|
|
43
|
+
Requires-Dist: mne-lsl>=1.2.0
|
|
48
44
|
Requires-Dist: mrmr-selection
|
|
49
45
|
Requires-Dist: nolds
|
|
50
|
-
Requires-Dist: notebook
|
|
51
46
|
Requires-Dist: numpy>=1.21.2
|
|
52
|
-
Requires-Dist: pandas>=
|
|
53
|
-
Requires-Dist: pip
|
|
47
|
+
Requires-Dist: pandas>=2.0.0
|
|
54
48
|
Requires-Dist: pyarrow>=14.0.2
|
|
55
|
-
Requires-Dist:
|
|
56
|
-
Requires-Dist:
|
|
57
|
-
Requires-Dist: pynput
|
|
49
|
+
Requires-Dist: pybispectra>=1.2.0
|
|
50
|
+
Requires-Dist: pydantic>=2.7.3
|
|
58
51
|
Requires-Dist: pyparrm
|
|
59
|
-
Requires-Dist:
|
|
60
|
-
Requires-Dist: scikit-image
|
|
52
|
+
Requires-Dist: pyqt5
|
|
61
53
|
Requires-Dist: scikit-learn>=0.24.2
|
|
62
54
|
Requires-Dist: scikit-optimize
|
|
63
55
|
Requires-Dist: scipy>=1.7.1
|
|
64
56
|
Requires-Dist: seaborn>=0.11
|
|
65
|
-
Requires-Dist: wget
|
|
66
57
|
Provides-Extra: dev
|
|
67
|
-
Requires-Dist:
|
|
68
|
-
Requires-Dist: pytest; extra == 'dev'
|
|
58
|
+
Requires-Dist: notebook; extra == 'dev'
|
|
69
59
|
Requires-Dist: pytest-cov; extra == 'dev'
|
|
60
|
+
Requires-Dist: pytest-sugar; extra == 'dev'
|
|
61
|
+
Requires-Dist: pytest>=8.0.2; extra == 'dev'
|
|
62
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
63
|
+
Provides-Extra: docs
|
|
64
|
+
Requires-Dist: notebook; extra == 'docs'
|
|
65
|
+
Requires-Dist: numpydoc; extra == 'docs'
|
|
66
|
+
Requires-Dist: pydata-sphinx-theme; extra == 'docs'
|
|
67
|
+
Requires-Dist: pytest-cov; extra == 'docs'
|
|
68
|
+
Requires-Dist: pytest-sugar; extra == 'docs'
|
|
69
|
+
Requires-Dist: pytest>=8.0.2; extra == 'docs'
|
|
70
|
+
Requires-Dist: recommonmark; extra == 'docs'
|
|
71
|
+
Requires-Dist: ruff; extra == 'docs'
|
|
72
|
+
Requires-Dist: sphinx; extra == 'docs'
|
|
73
|
+
Requires-Dist: sphinx-gallery; extra == 'docs'
|
|
74
|
+
Requires-Dist: sphinx-togglebutton; extra == 'docs'
|
|
75
|
+
Provides-Extra: test
|
|
76
|
+
Requires-Dist: pytest-xdist; extra == 'test'
|
|
77
|
+
Requires-Dist: pytest>=8.0.2; extra == 'test'
|
|
70
78
|
Description-Content-Type: text/x-rst
|
|
71
79
|
|
|
72
80
|
py_neuromodulation
|
|
@@ -111,23 +119,10 @@ py_neuromodulation requires at least python 3.10. For installation you can use p
|
|
|
111
119
|
|
|
112
120
|
pip install py-neuromodulation
|
|
113
121
|
|
|
114
|
-
|
|
115
|
-
We recommend however installing the package using `rye <https://rye-up.com/guide/installation/>`_:
|
|
116
|
-
|
|
117
|
-
.. code-block::
|
|
118
|
-
|
|
119
|
-
git clone https://github.com/neuromodulation/py_neuromodulation.git
|
|
120
|
-
rye pin 3.11
|
|
121
|
-
rye sync
|
|
122
|
-
|
|
123
|
-
And then activating the virtual environment e.g. in Windows using:
|
|
122
|
+
Alternatively you can also install the package in a conda environment:
|
|
124
123
|
|
|
125
124
|
.. code-block::
|
|
126
125
|
|
|
127
|
-
.\.venv\Scripts\activate
|
|
128
|
-
|
|
129
|
-
Alternatively you can also install the package in a conda environment:
|
|
130
|
-
|
|
131
126
|
conda create -n pynm-test python=3.11
|
|
132
127
|
conda activate pynm-test
|
|
133
128
|
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
py_neuromodulation/__init__.py,sha256=MaOF7mCNRjR9MgcCnk9b7dYJICVJthiWlZVf365lXOo,2831
|
|
2
|
+
py_neuromodulation/default_settings.yaml,sha256=g7UcCxmcQtg7YySj3WAhQ-hdqJlOYrvZYZtMcJuWzpQ,5552
|
|
3
|
+
py_neuromodulation/grid_cortex.tsv,sha256=k2QOkHY1ej3lJ33LD6DOPVlTynzB3s4BYaoQaoUCyYc,643
|
|
4
|
+
py_neuromodulation/grid_subcortex.tsv,sha256=oCQDYLDdYSa1DAI9ybwECfuzWulFzXqKHyf7oZ1oDBM,25842
|
|
5
|
+
py_neuromodulation/ConnectivityDecoding/Automated Anatomical Labeling 3 (Rolls 2020).nii,sha256=Sp-cjF_AuT0Tlilb5s8lB14hVgkXJiR2uKMS9nOQOeg,902981
|
|
6
|
+
py_neuromodulation/ConnectivityDecoding/_get_grid_hull.m,sha256=2RPDGotbLsCzDJLFB2JXatJtfOMno9UUBCBnsOuse8A,714
|
|
7
|
+
py_neuromodulation/ConnectivityDecoding/_get_grid_whole_brain.py,sha256=VsInAIADIf9d3unxUSN0B50aU472IQocGZ-kyG8A7Fc,3066
|
|
8
|
+
py_neuromodulation/ConnectivityDecoding/_helper_write_connectome.py,sha256=1DNrccrJqrH5PIW2yp24xbyqRrsRz98Gof5aPQZUUUE,3423
|
|
9
|
+
py_neuromodulation/ConnectivityDecoding/mni_coords_cortical_surface.mat,sha256=AZc0mgiAiqXVAxAnfxwICeh-dQX62RfTeRN_knS-i60,11622
|
|
10
|
+
py_neuromodulation/ConnectivityDecoding/mni_coords_whole_brain.mat,sha256=YxT9nrXZ2IECheEhN1SgSsqNyihHUTLuZQ7o5yP4Q-c,29864
|
|
11
|
+
py_neuromodulation/ConnectivityDecoding/rmap_func_all.nii,sha256=WjVA02B2cGNi670_45fdNssspf8GKbkKgRStZ2d4_FU,7221384
|
|
12
|
+
py_neuromodulation/ConnectivityDecoding/rmap_struc.nii,sha256=XsEMjsCxjAsMFvw1_jpQ-wIU2BUuZ_lISPwMa7zDmDk,7221384
|
|
13
|
+
py_neuromodulation/analysis/RMAP.py,sha256=e5qTZ680NkLZbI0cpVpsIqDy7OEhsoabedv5pVq6bG0,15001
|
|
14
|
+
py_neuromodulation/analysis/__init__.py,sha256=x9lKfCnOaawYdil39CWszpDNNtXFckF__RxbE0HnwKA,116
|
|
15
|
+
py_neuromodulation/analysis/decode.py,sha256=eK-jfrHmfthVQbpYCM8E2DbYOUD-AyLSSumXrrXt67E,33167
|
|
16
|
+
py_neuromodulation/analysis/feature_reader.py,sha256=Nyb2OLLX-jCVrFy_CI0FWzd7mCeqUG-MdHT4gj3bR3Y,35596
|
|
17
|
+
py_neuromodulation/analysis/plots.py,sha256=B625WZaLOm4Z6oQ5nrqnM77WaU9C1Ezn8UGggHAfIF8,17728
|
|
18
|
+
py_neuromodulation/analysis/stats.py,sha256=ZZIXTGh6r9gfiJV1RwZpLzDgqyia9mIDt8yNEN8cSw8,15094
|
|
19
|
+
py_neuromodulation/data/README,sha256=8PhEkUm8F2NgL7A5co1CgfumAMB14v5XPIbk54SvtAE,708
|
|
20
|
+
py_neuromodulation/data/dataset_description.json,sha256=HMHtmF0bbw9XO79GAyRt8urpEyxRJ5A1REcYos8D2s0,122
|
|
21
|
+
py_neuromodulation/data/participants.json,sha256=S4rrcSAmLcL_jLk9IY_cwJBipl8OwwCvouZ7tsgdldw,756
|
|
22
|
+
py_neuromodulation/data/participants.tsv,sha256=-dg_i5N4I-Cp1l21433z1lDjXUmcuTn8S3UqkxPvgdI,77
|
|
23
|
+
py_neuromodulation/data/sub-testsub/ses-EphysMedOff/sub-testsub_ses-EphysMedOff_scans.tsv,sha256=iz6Nvf_E5jChjacmO_eAxX7Y8rR8v03-gGdUeBlyDVY,89
|
|
24
|
+
py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_space-mni_coordsystem.json,sha256=dq0Vc2fIR-YvbCEqBb7lq3P_YkOOzkKe1Hh-a1gd46E,118
|
|
25
|
+
py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_space-mni_electrodes.tsv,sha256=Kr9vKh1qnnwFQE0Cet7PkeVuuGx1u-CT_xXs4qucezg,722
|
|
26
|
+
py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_channels.tsv,sha256=ZSixrfpSlNEfmv0diaJ96usFPwPtO_dA6CCDYDp85KY,779
|
|
27
|
+
py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_ieeg.eeg,sha256=NnQeMDrKpeK3lctIZ5Bzh85UMTs5OCUCaivn_NU5rc4,760040
|
|
28
|
+
py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_ieeg.json,sha256=nRPEWAa0isyDKbeW1IPhL9ECWkzqfQw1sKwJkZU3vbk,474
|
|
29
|
+
py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_ieeg.vhdr,sha256=-QEHwQjJb9Hp9yudEawqhQl8vrD8bYqiuvlF4cyPNg0,988
|
|
30
|
+
py_neuromodulation/data/sub-testsub/ses-EphysMedOff/ieeg/sub-testsub_ses-EphysMedOff_task-gripforce_run-0_ieeg.vmrk,sha256=BD-VmcKe7dR0vGzzkv4c09QnSwc3zYeAWDGJIzWEOI0,540
|
|
31
|
+
py_neuromodulation/features/__init__.py,sha256=zpulQ3IaKh6yNSnCBIRa5IC3SZ7FlKNQxHLF50yTdQU,1567
|
|
32
|
+
py_neuromodulation/features/bandpower.py,sha256=rpkY2dNayXYng1BmZxyKTxgrJFnrslPaKVUpoNXE6EA,6152
|
|
33
|
+
py_neuromodulation/features/bispectra.py,sha256=FvXzvkhoKaOZNjYckJgMSscAA4ShN-g8ufwe6-2zNGw,5509
|
|
34
|
+
py_neuromodulation/features/bursts.py,sha256=7-I81RYSZEm5pbIKc6wXmfxmJ4Q6V41CfJXebqkGGDw,11467
|
|
35
|
+
py_neuromodulation/features/coherence.py,sha256=I6w7bUwIh9rte9mYXEB1XX7HYwFJw0OG0IeMpJtR2LU,8798
|
|
36
|
+
py_neuromodulation/features/feature_processor.py,sha256=CT05jNks681LOcyr2yHe1KaUryJXm52_53hNmEhuWnM,3972
|
|
37
|
+
py_neuromodulation/features/fooof.py,sha256=RouqFikiKf_JSiEel569lfjzfYRE7CEvBlgvuj53Xj4,5016
|
|
38
|
+
py_neuromodulation/features/hjorth_raw.py,sha256=mRPioPHJdN73AGErRbJ5S1Vz__qEQ89jAKaeN5k8eXo,1845
|
|
39
|
+
py_neuromodulation/features/linelength.py,sha256=8BTctvr9Zj8TEK2HLJqi73j_y2Xgt8lKK-mJhv8eAsM,641
|
|
40
|
+
py_neuromodulation/features/mne_connectivity.py,sha256=3d5U16E1Tu7f2Djs1TS1cjKlKnLHJV-jDP7fY4QeksU,5699
|
|
41
|
+
py_neuromodulation/features/nolds.py,sha256=jNCKQlIfmcAhmzjTAJMbFPhRuPtYZF5BDzR4qHlLp1k,3374
|
|
42
|
+
py_neuromodulation/features/oscillatory.py,sha256=9TIUWd_G1E4KSMbhjVjlD7mJlA0rT87qCdB24g7PjEw,7695
|
|
43
|
+
py_neuromodulation/features/sharpwaves.py,sha256=1-l0WWzz7De4rAel5j8tiUHK-H9E3MqbspGPwwUKtfw,16677
|
|
44
|
+
py_neuromodulation/filter/__init__.py,sha256=ut1q8daCZoN7lhTKURGpk1X5oKiS3eSNqR7SkZyGDJw,128
|
|
45
|
+
py_neuromodulation/filter/kalman_filter.py,sha256=wy-coztc0dAX8Rqow5s-Fv4rvub33Sv52FdkNu9y6uA,1871
|
|
46
|
+
py_neuromodulation/filter/kalman_filter_external.py,sha256=_7FFq-1GQY9mNA0EvmaM4wQ46DVkHC9bYFIgiw9b6nY,61367
|
|
47
|
+
py_neuromodulation/filter/mne_filter.py,sha256=S3Swv8xY-yLIsNkYC6WHRL5T3EaNAM5a3Gx0BYSRqzY,4496
|
|
48
|
+
py_neuromodulation/filter/notch_filter.py,sha256=CF4VTMMt9bzl1hvp7Rk9H1Ui4buMkn4uNelxDF_9uKk,3284
|
|
49
|
+
py_neuromodulation/liblsl/libpugixml.so.1.12,sha256=_bCOHUjcnGpDiROg1qjgty8ZQhcKHSnaCIP6SMgw6SY,240248
|
|
50
|
+
py_neuromodulation/liblsl/linux/bionic_amd64/liblsl.1.16.2.so,sha256=YXFbA23CQqWg6mWhk-73WY9gSx79NtgnBr6UFVByC2I,1033592
|
|
51
|
+
py_neuromodulation/liblsl/linux/bookworm_amd64/liblsl.1.16.2.so,sha256=3gKI0HsheWJvFgZdnT27Ev824y7rkOOCVRiHdAlKHUM,791688
|
|
52
|
+
py_neuromodulation/liblsl/linux/focal_amd46/liblsl.1.16.2.so,sha256=OCVevlOtKPblu7lWFN_x4HIibxfihgoPzQtGjsYEXUo,923264
|
|
53
|
+
py_neuromodulation/liblsl/linux/jammy_amd64/liblsl.1.16.2.so,sha256=MSmfv900ShdCj3-ipsADxmbiTg3WoZ_SvUrByeZB45g,935392
|
|
54
|
+
py_neuromodulation/liblsl/linux/jammy_x86/liblsl.1.16.2.so,sha256=MSmfv900ShdCj3-ipsADxmbiTg3WoZ_SvUrByeZB45g,935392
|
|
55
|
+
py_neuromodulation/liblsl/linux/noble_amd64/liblsl.1.16.2.so,sha256=-p_sEh6LuxDKKVVcT5Y0Loeq7FK11LoE34RmMIKqdaw,3009496
|
|
56
|
+
py_neuromodulation/liblsl/macos/amd64/liblsl.1.16.2.dylib,sha256=7BLTPGbq7ISuG3ZdLUem7fER6ZXrYYryY477b3j4lNw,807896
|
|
57
|
+
py_neuromodulation/liblsl/macos/arm64/liblsl.1.16.0.dylib,sha256=UD228wOmdFIY9WKmpYgWKeJuVQ6wqI6K2EWWk1G3vM8,758048
|
|
58
|
+
py_neuromodulation/liblsl/windows/amd64/liblsl.1.16.2.dll,sha256=M4tzeUOkvXv5_3GZheWJJ74q1AAIIGmcEZLugJIHxGo,804864
|
|
59
|
+
py_neuromodulation/liblsl/windows/x86/liblsl.1.16.2.dll,sha256=UBdyYfWp7CpydLo1I0nsCSM1uHnnbNrF2FF1fHuOops,599040
|
|
60
|
+
py_neuromodulation/plots/STN_surf.mat,sha256=Hh2nfQRmP0TYIt8SWV-ajKnC8yk7EmBoAj1c6RMoi9g,124526
|
|
61
|
+
py_neuromodulation/plots/Vertices.mat,sha256=k72WB8-0Datt-bRScxcfpp38LBPHV34zzodS49kQAgs,3709780
|
|
62
|
+
py_neuromodulation/plots/faces.mat,sha256=gWSr-9qNxsAPoG8q-muNnaFZHVHGKqnKN0j3Q1JfMk4,2859245
|
|
63
|
+
py_neuromodulation/plots/grid.mat,sha256=G3MYIVcvk8lbf_kKWIe3lZZ4d0QV6HkoLsOFN1A2vhE,775
|
|
64
|
+
py_neuromodulation/processing/__init__.py,sha256=nYPHBltTEOvJi7MrNCgcT0BGbCo2bCjwBhaLXPxlFg4,548
|
|
65
|
+
py_neuromodulation/processing/artifacts.py,sha256=lrEpNwnFPz8GzDy6RWXk_aqroUz7eGPHdolOo5RPv1I,850
|
|
66
|
+
py_neuromodulation/processing/data_preprocessor.py,sha256=L2r7jkvGoTGxv4Q0YFfFsVrR2lYysTVDZJHWMNZHtu0,2989
|
|
67
|
+
py_neuromodulation/processing/filter_preprocessing.py,sha256=_I5dXwA9GDVKv8EY-ONcJeJ7OcRu0BxJwZTFfkjPVzc,2823
|
|
68
|
+
py_neuromodulation/processing/normalization.py,sha256=k1vW4yQJ70Xu-9eMJeX210eV9poLRmSyA71lvzZg_6g,5457
|
|
69
|
+
py_neuromodulation/processing/projection.py,sha256=esPQfS7-oXFXkzRvEIEyl5skWk9KVcdoIKRNLwvBjbk,14700
|
|
70
|
+
py_neuromodulation/processing/rereference.py,sha256=n9zLNDkuqeP7zwrP5bhsiXF9eYVPwqI4hZvvQzZ5cks,3304
|
|
71
|
+
py_neuromodulation/processing/resample.py,sha256=YwgGq900kGHhg1avmn-ju9M0mx9FvXQ06qj5-Ztv9Qk,1230
|
|
72
|
+
py_neuromodulation/stream/__init__.py,sha256=R4Fm4ApFdnbG9x13fQm1uhslVf3P0mdtnexzDohEWF0,124
|
|
73
|
+
py_neuromodulation/stream/data_processor.py,sha256=lODMA3DFxBfJPm4AeMLG6-e71pxj_6_EqevMrQmUSYY,11107
|
|
74
|
+
py_neuromodulation/stream/generator.py,sha256=UKLuM8gz2YLBuVQnQNkkOOKhwsyW27ZgvRJ_5BK7Glo,1588
|
|
75
|
+
py_neuromodulation/stream/mnelsl_player.py,sha256=e8l5ufEeCBljjl-oogi43TOmP7s_xQeVdpCREvtfWvk,2992
|
|
76
|
+
py_neuromodulation/stream/mnelsl_stream.py,sha256=hsqkgo0mEzvP40M3vps4Ma7BX6R3wXx07TQpPSjnmUw,4603
|
|
77
|
+
py_neuromodulation/stream/settings.py,sha256=19tRmjHDkkmgzdocBIa9tb-LyMPFlcoopuU7zsvrWZQ,10072
|
|
78
|
+
py_neuromodulation/stream/stream.py,sha256=cstSVfmfJwReocAI88Pf-4VKMY0Qv53eJ1JyZMFe5zI,15599
|
|
79
|
+
py_neuromodulation/utils/__init__.py,sha256=Ok3STMpsflCTclJC9C1iQgdT-3HNGMM7U45w5Oespr4,46
|
|
80
|
+
py_neuromodulation/utils/channels.py,sha256=Y8hrJxEY_2MJEBlicRkJk04XsBUXEZ2NYYb1toEaDek,10632
|
|
81
|
+
py_neuromodulation/utils/database.py,sha256=VEFsmbYDQWwaoZKmJCG8oyWoDTbfSiT_p0n7da9_Pn4,4755
|
|
82
|
+
py_neuromodulation/utils/io.py,sha256=-qAwtFSsumfzY6dkYSKGySE8_RH1c2M1NDxC_ZQrUVM,10387
|
|
83
|
+
py_neuromodulation/utils/keyboard.py,sha256=swoxYhf4Q3pj50EKALUFt6hREfXnoXq2Z2q01IahPe8,1505
|
|
84
|
+
py_neuromodulation/utils/logging.py,sha256=eIBFBRaAMb3KJnoxNFiCkMrTGzWwgfeDs8m5iq6FxN8,2178
|
|
85
|
+
py_neuromodulation/utils/types.py,sha256=QVq3wAgMcw5zKPa_Kj2QQ2Gt2CYavO_PAka3RAZdfwo,7310
|
|
86
|
+
py_neuromodulation-0.0.6.dist-info/METADATA,sha256=UcYGczR0VlQ_98AKZe6J-x8Ml-wiie9d7Th7paCeziY,7216
|
|
87
|
+
py_neuromodulation-0.0.6.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
88
|
+
py_neuromodulation-0.0.6.dist-info/licenses/LICENSE,sha256=EMBwuBRPBo-WkHSjqxZ55E6j95gKNBZ8x30pt-VGfrM,1118
|
|
89
|
+
py_neuromodulation-0.0.6.dist-info/RECORD,,
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 Interventional Cognitive Neuromodulation - Neumann Lab Berlin
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Interventional Cognitive Neuromodulation - Neumann Lab Berlin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|