Skip to content

Commit

Permalink
Add stimulus representation in ecode docstrings (#125)
Browse files Browse the repository at this point in the history
* Add stimulus representation in ecode docstrings

* Ignore invalid escape sequence '\ ' warning in pycodestyle

---------

Co-authored-by: Jaquier Aurélien Tristan <aurelien.jaquier@epfl.ch>
  • Loading branch information
AurelienJaquier and Jaquier Aurélien Tristan committed Feb 6, 2023
1 parent e73953f commit f620e29
Show file tree
Hide file tree
Showing 11 changed files with 175 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bluepyefe/auto_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AutoTarget():

"""Fuzzy targets defined by lists of ecodes, amplitudes and efeatures.
The AutoTarget will try to find the best combination of ecodes, amplitudes
and efeatures that match the data available in the recordings."""
and efeatures that match the data available in the recordings."""

def __init__(
self,
Expand Down
18 changes: 18 additions & 0 deletions bluepyefe/ecode/DeHyperPol.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,24 @@

class DeHyperPol(Recording):

"""DeHyperpol current stimulus
hypamp hypamp+amp hypamp+amp2 hypamp
: : : :
: _________________ : :
: | | : :
: | | : :
|_______________| | : ___________
^ ^ | : | ^
: : | : | :
: : | : | :
: : |____________| :
: : ^ ^ :
: : : : :
: : : : :
t=0 ton tmid toff tend
"""

def __init__(
self,
config_data,
Expand Down
21 changes: 21 additions & 0 deletions bluepyefe/ecode/HyperDePol.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,27 @@


class HyperDePol(Recording):

"""HyperDepol current stimulus
hypamp hypamp+amp hypamp+amp2 hypamp
: : : :
: : _____________________ :
: : | | :
: : | | :
: : | | :
: : | | :
: : | | :
|_______________ : | |___________
^ | : | ^ ^
: |___________________| : :
: ^ ^ : :
: : : : :
: : : : :
t=0 ton tmid toff tend
"""

def __init__(
self,
config_data,
Expand Down
18 changes: 18 additions & 0 deletions bluepyefe/ecode/SpikeRec.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,24 @@ def detect_spike(amp, hypamp, smooth_current, dt):


class SpikeRec(Recording):

"""SpikeRec current stimulus
hypamp hypamp+amp hypamp hypamp+amp . . .
: : : :
: _________________ : _________________ _________________
: | | : | | | |
: | | : | | * len(tspike) | |
: | | : | | . . . | |
: | | : | | | |
|_______________| |__________| |__ __| |___
: : : : : ^
: : : : : :
: : : : : :
<--tspike[0]--><-spike_duration-><- delta -><-spike_duration-> . . . tend
"""

def __init__(
self,
config_data,
Expand Down
27 changes: 27 additions & 0 deletions bluepyefe/ecode/negCheops.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,33 @@


class NegCheops(Recording):

# pylint: disable=line-too-long,anomalous-backslash-in-string

"""NegCheops current stimulus
hypamp hypamp+amp hypamp hypamp+amp hypamp hypamp+amp hypamp
: : : : : : :
: : : : : : :
|__________ : ____________ : ____________ : ____________
: :\ : /: :\ : /: :\ : /: ^
: : \ : / : : \ : / : : \ : / : :
: : \ : / : : \ : / : : \ : / : :
: : \ : / : : \ : / : : \ : / : :
: : \ : / : : \ : / : : \ : / : :
: : \ : / : : \ : / : : \ : / : :
: : \ : / : : \ : / : : \ : / : :
: : \ : / : : \ : / : : \ : / : :
: : \ : / : : \ : / : : \ : / : :
: : \ : / : : \ : / : : \ : / : :
: : \ : / : : \ : / : : \ : / : :
: : \ / : : \ / : : \ / : :
: : ' : : ' : : ' : :
: : : : : : : :
t=0 ton t1 t2 t3 t4 toff tend
"""

def __init__(
self,
config_data,
Expand Down
26 changes: 26 additions & 0 deletions bluepyefe/ecode/posCheops.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,32 @@


class PosCheops(Recording):

# pylint: disable=line-too-long,anomalous-backslash-in-string

"""PosCheops current stimulus
hypamp hypamp+amp hypamp hypamp+amp hypamp hypamp+amp hypamp
: : : : : : :
: . : . : . :
: / \ : / \ : / \ :
: / \ : / \ : / \ :
: / \ : / \ : / \ :
: / \ : / \ : / \ :
: / \ : / \ : / \ :
: / \ : / \ : / \ :
: / \ : / \ : / \ :
: / \ : / \ : / \ :
: / \ : / \ : / \ :
: / \ : / \ : / \ :
: / \ : / \ : / \ :
|__________ / \ __________ / \ __________ / \ __________
: : : : : : : ^
: : : : : : : :
: : : : : : : :
t=0 ton t1 t2 t3 t4 toff tend
"""

def __init__(
self,
config_data,
Expand Down
23 changes: 23 additions & 0 deletions bluepyefe/ecode/ramp.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,29 @@


class Ramp(Recording):

"""Ramp current stimulus
hypamp hypamp+amp hypamp
: : :
: : :
: /| :
: / | :
: / | :
: / | :
: / | :
: / | :
: / | :
: / | :
: / | :
|___________ / |__________________________
^ ^ ^ ^
: : : :
: : : :
t=0 ton toff tend
"""

def __init__(
self,
config_data,
Expand Down
19 changes: 19 additions & 0 deletions bluepyefe/ecode/sAHP.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,25 @@


class SAHP(Recording):

"""sAHP current stimulus
hypamp hypamp+amp hypamp+amp2 hypamp+amp hypamp
: : : : :
: : ______________ : :
: : | | : :
: ____________________| |____________________ :
: | ^ ^ | :
: | : : | :
|__________| : : |__________________
^ ^ : : ^ ^
: : : : : :
: : : : : :
t=0 ton tmid tmid2 toff tend
"""

def __init__(
self,
config_data,
Expand Down
3 changes: 3 additions & 0 deletions bluepyefe/ecode/sineSpec.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@


class SineSpec(Recording):

"""SineSpec current stimulus"""

def __init__(
self,
config_data,
Expand Down
18 changes: 18 additions & 0 deletions bluepyefe/ecode/step.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,24 @@


class Step(Recording):

"""Step current stimulus
hypamp hypamp+amp hypamp
: : :
: : :
: ______________________ :
: | | :
: | | :
: | | :
: | | :
|__________________| |______________________
^ ^ ^ ^
: : : :
: : : :
t=0 ton toff tend
"""

def __init__(
self,
config_data,
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ passenv = https_proxy, USER, KRB5CCNAME
commands =
make clean

style: pycodestyle --ignore=E402,W503,W504,E203,E501,E722 bluepyefe
style: pycodestyle --ignore=E402,W503,W504,E203,E501,E722,W605 bluepyefe
syntax: flake8 . --count --select=E9,F63,F72,F82 --show-source --statistics

functional: pytest --cov-report=xml --cov=bluepyefe --cov=tests --cov-config=.coveragerc -vx tests
Expand Down

0 comments on commit f620e29

Please sign in to comment.