-
Notifications
You must be signed in to change notification settings - Fork 41
Adding extracellular features; phase analysis features description in docs #minor #401
Conversation
get changes from master
sync new changes from master
I don't think it is a good idea to have Phase analysis in the docs because currently the docs reproduce the code structure (each category is a .cpp file). If we move features from spikeshape into Phase analysis in the docs without changing it in the code, the docs no longer reflect the code structure |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #401 +/- ##
==========================================
+ Coverage 91.73% 92.27% +0.53%
==========================================
Files 36 39 +3
Lines 6278 7348 +1070
Branches 2033 2280 +247
==========================================
+ Hits 5759 6780 +1021
- Misses 266 287 +21
- Partials 253 281 +28 ☔ View full report in Codecov by Sentry. |
Ok. I have removed the new category and instead added a line in phase related features: |
I have updated the files with most of your suggestions and have commented where I had some additional points to mention. I also checked the documentation html and it looks fine to me. |
efel/pyfeatures/extrafeats.py
Outdated
Returns 0 if not detected | ||
""" | ||
if after_max_trough: | ||
max_through_idx = np.unravel_index( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you rename it to max_trough_idx
?
efel/pyfeatures/extrafeats.py
Outdated
""" | ||
Return the slope of x and y data, using scipy.signal.linregress | ||
""" | ||
from scipy.stats import linregress |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you also move all the import statements to the top of the file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the imports to top in the latest commit. I also addressed your other comments in the commit.
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"if __name__ == '__main__':\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi, this line is not really necessary in a Jupyter notebook
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @darshanmandge ! Well done!
Description
Adding Extracellular features used for microelectrode array (MEA) data:
"peak_to_valley", "halfwidth", "peak_trough_ratio", "repolarization_slope", "recovery_slope", "neg_peak_relative", "pos_peak_relative", "neg_peak_diff", "pos_peak_diff", "neg_image", "pos_image"
based on those used in Buccino et al., 2024. These features were originally added in BluePyOpt. I will create a new PR in BluePyOpt to import the features from eFEL so that we have only one source of truth (no duplication of code).
Efeatures that can be used for phase analysis have been mentioned in their documentation description. Some phase analysis are:
"AP_phaseslope"
and"phaseslope_max"
,"AP_fall_rate", "AP_fall_rate_change", "AP_peak_downstroke", "AP_peak_upstroke", "AP_rise_rate"
and"AP_rise_rate_change"
.Checklist: