ap-features
Package to compute features of traces from action potential models
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.1%) to scientific vocabulary
Repository
Package to compute features of traces from action potential models
Basic Info
- Host: GitHub
- Owner: ComputationalPhysiology
- License: lgpl-2.1
- Language: Python
- Default Branch: main
- Homepage: https://computationalphysiology.github.io/ap_features/
- Size: 5.06 MB
Statistics
- Stars: 8
- Watchers: 3
- Forks: 3
- Open Issues: 4
- Releases: 7
Metadata Files
README.md
Action Potential features
ap_features is package for computing features of action potential traces. This includes chopping, background correction and feature calculations.
Parts of this library is written in numba and is therefore highly performant. This is useful if you want to do feature calculations on a large number of traces.
Quick start
```python import matplotlib.pyplot as plt import numpy as np from scipy.integrate import solve_ivp
import ap_features as apf
time = np.linspace(0, 999, 1000) res = solveivp( apf.testing.fitzhughnagumo, [0, 1000], [0.0, 0.0], teval=time, ) trace = apf.Beats(y=res.y[0, :], t=time) print(f"Number of beats: {trace.numbeats}") print(f"Beat rates: {trace.beat_rates}")
Get a list of beats
beats = trace.beats
Pick out the second beat
beat = beats[1]
Compute features
print(f"APD30: {beat.apd(30):.3f}s, APD80: {beat.apd(80):.3f}s") print(f"cAPD30: {beat.capd(30):.3f}s, cAPD80: {beat.capd(80):.3f}s") print(f"Time to peak: {beat.ttp():.3f}s") print(f"Decay time from max to 90%: {beat.tau(a=0.1):.3f}s") ```
Number of beats: 5
Beat rates: [779.2207792207793, 769.2307692307693, 779.2207792207793, 759.493670886076]
APD30: 37.823s, APD80: 56.564s
cAPD30: 88.525s, cAPD80: 132.387s
Time to peak: 21.000s
Decay time from max to 90%: 53.618s
Install
Install the package with pip
python -m pip install ap_features
See installation instructions for more options.
Available features
The list of currently implemented features are as follows - Action potential duration (APD) - Corrected action potential duration (cAPD) - Decay time (Time for the signal amplitude to go from maximum to (1 - a) * 100 % of maximum) - Time to peak (ttp) - Upstroke time (time from (1-a)*100 % signal amplitude to peak) - Beating frequency - APD up (The duration between first intersections of two APD lines) - Maximum relative upstroke velocity - Maximum upstroke velocity - APD integral (integral of the signals above the APD line)
Documentation
Documentation is hosted at GitHub pages: https://computationalphysiology.github.io/ap_features/
Note that the documentation is written using jupyterbook and contains an interactive demo
License
- Free software: LGPLv2.1
Source Code
Owner
- Name: Computational Physiology at Simula Research Laboratory
- Login: ComputationalPhysiology
- Kind: organization
- Location: Fornebu, Norway
- Website: https://computationalphysiology.github.io
- Repositories: 51
- Profile: https://github.com/ComputationalPhysiology
GitHub organization for the computational physiology department at Simula Research Laboratory
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - affiliation: Simula Research Laboratoy family-names: Finsberg given-names: Henrik orcid: "https://orcid.org/0000-0003-3766-2393" - family-names: Hustad given-names: Kristian Gregorius date-released: '2024-09-28' doi: 10.5281/zenodo.13854740 repository-code: https://github.com/ComputationalPhysiology/ap_features/ title: 'ap_features' type: software version: v2024.0.0
GitHub Events
Total
- Watch event: 1
- Delete event: 1
- Push event: 44
- Pull request event: 28
Last Year
- Watch event: 1
- Delete event: 1
- Push event: 44
- Pull request event: 28
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 283
- Total Committers: 4
- Avg Commits per committer: 70.75
- Development Distribution Score (DDS): 0.318
Top Committers
| Name | Commits | |
|---|---|---|
| Henrik Finsberg | h****f@s****o | 193 |
| pre-commit-ci[bot] | 6****]@u****m | 49 |
| Henrik Finsberg | h****g@h****m | 23 |
| Kristian Gregorius Hustad | k****d@s****o | 18 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 12
- Total pull requests: 162
- Average time to close issues: about 4 hours
- Average time to close pull requests: 10 days
- Total issue authors: 2
- Total pull request authors: 4
- Average comments per issue: 0.33
- Average comments per pull request: 0.15
- Merged pull requests: 148
- Bot issues: 0
- Bot pull requests: 123
Past Year
- Issues: 3
- Pull requests: 27
- Average time to close issues: N/A
- Average time to close pull requests: 11 days
- Issue authors: 2
- Pull request authors: 2
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 23
- Bot issues: 0
- Bot pull requests: 27
Top Authors
Issue Authors
- finsberg (11)
- tk231 (1)
Pull Request Authors
- pre-commit-ci[bot] (107)
- finsberg (36)
- dependabot[bot] (16)
- KGHustad (3)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 2,960 last-month
- Total dependent packages: 3
- Total dependent repositories: 1
- Total versions: 43
- Total maintainers: 1
pypi.org: ap-features
Package to compute features of traces from action potential models
- Homepage: https://computationalphysiology.github.io/ap_features
- Documentation: https://computationalphysiology.github.io/ap_features
- License: LGPL-2.1
-
Latest release: 2024.0.0
published over 1 year ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v3 composite
- actions/configure-pages v3 composite
- actions/deploy-pages v2 composite
- actions/setup-python v4 composite
- actions/upload-pages-artifact v1 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v3 composite
- schneegans/dynamic-badges-action v1.6.0 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- pypa/gh-action-pypi-publish release/v1 composite
- numba <0.58
- numpy *
- scipy *
- tqdm *