ep-bandpass-filter-selector
The EP Bandpass Filter Selector package cycles through various combinations of high- and low-pass cutoffs of the bandpass frequency filter within user-specified limits and selects the optimal filtering option. Optimization is carried out basing on the ratio of the EP interpeak amplitude to the EP curves variability coefficient.
Requirements
Package require python >= 3.8. For development require python3-venv. Tested on Ubuntu 20.04.
Installation
For usual using:
$ pip install ep_bandpass_filter_selector
For development:
$ git clone https://github.com/yaricp/ep-bandpass-filter-selector.git
$ cd ep-bandpass-filter-selector/
$ cd scripts/
$ ./install.sh
install.sh will download and set up the necessary packages in the .venv folder.
Usage
This package can be imported as a separated module:
$ python3
>>> from eeg_filters.upload import prepare_data
>>> from ep_bandpass_filter_selector import PassbandSelector
>>> (
sample_rate, list_times, list_ticks, list_out
) = prepare_data("file_data_path.dat")
>>> pbs = PassbandSelector(
curves=list_out,
tick_times=list_ticks,
fsr=sample_rate,
max_search_range: (0.016, 0.023),
min_search_range: (0.022, 0.028)
)
>>> result = pbs.start()
>>> print(result[0])
20,200
In this example, all curves from the file_data_path.dat were used for selecting the passband filter. Also, additional parameters were used with the default values. Their values are listed here:
filter_low_limit_range = 1, 30 step_low_filter = 1 filter_high_limit_range = 100, 500 step_high_filter = 10
You can declare them when creating an item of PassbandSelector. For example:
>>> pbs = PassbandSelector(
curves=list_out,
tick_times=list_ticks,
fsr=sample_rate,
max_search_range=(0.016, 0.023),
min_search_range=(0.022, 0.028),
filter_low_limit_range=[5, 20],
step_low_filter=5,
filter_high_limit_range=[100, 300],
step_high_filter=50,
type_mean="average",
cheb_filter_order=3,
cheb_ripple=3
)
Another notation is also possible for declaring parameters. For example:
>>> pbs = PassbandSelector(
curves=list_out,
tick_times=list_ticks,
fsr=sample_rate,
max_search_range=(0.016, 0.023),
min_search_range=(0.022, 0.028),
fllr=[5, 20],
slf=5,
fhlr=[100, 300],
shf=50,
tm="average",
chfo=3,
chr=3
)
Export data
On this moment there is only export to CSV format.
>>> from ep_bandpass_filter_selector import export_data
>>> export_data(
"filepath_for_export.csv",
list(result[0]),
result[1]
)
Metadata
Release files for ep-bandpass-filter-selector 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ep_bandpass_filter_selector-0.0.5.tar.gz | 5.1 kB | Without provenance | Details for ep_bandpass_filter_selector-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ep_bandpass_filter_selector-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for ep_bandpass_filter_selector-0.0.5-py3-none-any.whl |
Total release size: 11.3 kB
Release files / ep_bandpass_filter_selector-0.0.5.tar.gz
| Download URL | ep_bandpass_filter_selector-0.0.5.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
232038bd9d39533c62577974286d20ffcac6e006ca69ea6442225f89f40284d5
|
|
BLAKE2b-256 checksum How to use checksums |
9d3a28102105433a752f38fed1ab90a43bcf4ece738294ea0278d8458e5ecef3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.13.1 Linux/6.8.0-1021-azure
|
Release files / ep_bandpass_filter_selector-0.0.5-py3-none-any.whl
| Download URL | ep_bandpass_filter_selector-0.0.5-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d2f46aef67486fb76e4573ce4e4907a8734567498a2b2e8f24f01805bc7e910b
|
|
BLAKE2b-256 checksum How to use checksums |
890e0603504aa567b93e22f6c4b34170a99ea4bd7ebd4e166c0e75864787b1b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.13.1 Linux/6.8.0-1021-azure
|
Security for ep-bandpass-filter-selector 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.