Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Adding extracellular features; phase analysis features description in docs #minor #401

Merged
merged 20 commits into from
Jul 10, 2024

Conversation

darshanmandge
Copy link
Contributor

@darshanmandge darshanmandge commented Jul 2, 2024

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:

  • Unit tests are added to cover the changes (skip if not applicable).
  • The changes are mentioned in the documentation (skip if not applicable).
  • CHANGELOG file is updated (skip if not applicable).

@darshanmandge darshanmandge self-assigned this Jul 2, 2024
@AurelienJaquier
Copy link
Collaborator

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-commenter
Copy link

codecov-commenter commented Jul 2, 2024

Codecov Report

Attention: Patch coverage is 93.10345% with 16 lines in your changes missing coverage. Please review.

Project coverage is 92.27%. Comparing base (2cddd26) to head (4eddaf3).
Report is 22 commits behind head on master.

Files Patch % Lines
efel/pyfeatures/extrafeats.py 89.93% 16 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@darshanmandge
Copy link
Contributor Author

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

Ok. I have removed the new category and instead added a line in phase related features: This feature can used for AP phase analysis. In this way, we preserve the code and docs structure.

@darshanmandge
Copy link
Contributor Author

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.

@darshanmandge darshanmandge changed the title Adding extracellular features and a seperate category in documentaion for phase analysis features #minor Adding extracellular features; phase analysis features description in docs #minor Jul 9, 2024
Returns 0 if not detected
"""
if after_max_trough:
max_through_idx = np.unravel_index(
Copy link
Collaborator

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 ?

"""
Return the slope of x and y data, using scipy.signal.linregress
"""
from scipy.stats import linregress
Copy link
Collaborator

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?

Copy link
Contributor Author

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",
Copy link
Collaborator

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

Copy link
Collaborator

@ilkilic ilkilic left a 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!

@darshanmandge darshanmandge merged commit 266ae13 into BlueBrain:master Jul 10, 2024
20 checks passed
@darshanmandge darshanmandge deleted the efeats branch July 10, 2024 15:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants