-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'if_curr_delta_ca2_adaptive' into async_neuromorph
- Loading branch information
Showing
7 changed files
with
149 additions
and
3 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
neural_modelling/makefiles/neuron/IF_curr_delta_ca2_adaptive/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright (c) 2017 The University of Manchester | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
APP = $(notdir $(CURDIR)) | ||
|
||
NEURON_MODEL_H = $(NEURON_DIR)/neuron/models/neuron_model_lif_impl.h | ||
INPUT_TYPE_H = $(NEURON_DIR)/neuron/input_types/input_type_delta.h | ||
NEURON_IMPL_H = $(NEURON_DIR)/neuron/implementations/neuron_impl_standard.h | ||
THRESHOLD_TYPE_H = $(NEURON_DIR)/neuron/threshold_types/threshold_type_static.h | ||
SYNAPSE_TYPE_H = $(NEURON_DIR)/neuron/synapse_types/synapse_types_delta_impl.h | ||
SYNAPSE_DYNAMICS = $(NEURON_DIR)/neuron/plasticity/synapse_dynamics_static_impl.c | ||
ADDITIONAL_INPUT_H = $(NEURON_DIR)/neuron/additional_inputs/additional_input_ca2_adaptive_impl.h | ||
|
||
include ../neural_build.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
neural_modelling/makefiles/neuron_only/IF_curr_delta_ca2_adaptive_neuron/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright (c) 2017 The University of Manchester | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
APP = $(notdir $(CURDIR)) | ||
|
||
NEURON_MODEL_H = $(NEURON_DIR)/neuron/models/neuron_model_lif_impl.h | ||
INPUT_TYPE_H = $(NEURON_DIR)/neuron/input_types/input_type_delta.h | ||
NEURON_IMPL_H = $(NEURON_DIR)/neuron/implementations/neuron_impl_standard.h | ||
THRESHOLD_TYPE_H = $(NEURON_DIR)/neuron/threshold_types/threshold_type_static.h | ||
SYNAPSE_TYPE_H = $(NEURON_DIR)/neuron/synapse_types/synapse_types_delta_impl.h | ||
ADDITIONAL_INPUT_H = $(NEURON_DIR)/neuron/additional_inputs/additional_input_ca2_adaptive_impl.h | ||
|
||
include ../neuron_build.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
spynnaker/pyNN/models/neuron/builds/if_curr_delta_ca2_adaptive.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# Copyright (c) 2017 The University of Manchester | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from spynnaker.pyNN.models.neuron import AbstractPyNNNeuronModelStandard | ||
from spynnaker.pyNN.models.defaults import default_initial_values | ||
from spynnaker.pyNN.models.neuron.neuron_models import ( | ||
NeuronModelLeakyIntegrateAndFire) | ||
from spynnaker.pyNN.models.neuron.input_types import InputTypeDelta | ||
from spynnaker.pyNN.models.neuron.threshold_types import ThresholdTypeStatic | ||
from spynnaker.pyNN.models.neuron.synapse_types import SynapseTypeDelta | ||
from spynnaker.pyNN.models.neuron.additional_inputs import ( | ||
AdditionalInputCa2Adaptive) | ||
|
||
|
||
class IFCurrDeltaCa2Adaptive(AbstractPyNNNeuronModelStandard): | ||
""" | ||
Leaky integrate and fire neuron with an instantaneous current input. | ||
:param tau_m: :math:`\\tau_m` | ||
:type tau_m: float, iterable(float), ~spynnaker.pyNN.RandomDistribution | ||
or (mapping) function | ||
:param cm: :math:`C_m` | ||
:type cm: float, iterable(float), ~spynnaker.pyNN.RandomDistribution | ||
or (mapping) function | ||
:param v_rest: :math:`V_{rest}` | ||
:type v_rest: float, iterable(float), ~spynnaker.pyNN.RandomDistribution | ||
or (mapping) function | ||
:param v_reset: :math:`V_{reset}` | ||
:type v_reset: float, iterable(float), ~spynnaker.pyNN.RandomDistribution | ||
or (mapping) function | ||
:param v_thresh: :math:`V_{thresh}` | ||
:type v_thresh: float, iterable(float), ~spynnaker.pyNN.RandomDistribution | ||
or (mapping) function | ||
:param tau_refrac: :math:`\\tau_{refrac}` | ||
:type tau_refrac: float, iterable(float), | ||
~spynnaker.pyNN.RandomDistribution or (mapping) function | ||
:param tau_ca2: :math:`\\tau_{\\mathrm{Ca}^{+2}}` | ||
:type tau_ca2: float, iterable(float), ~spynnaker.pyNN.RandomDistribution | ||
or (mapping) function | ||
:param i_ca2: :math:`I_{\\mathrm{Ca}^{+2}}` | ||
:type i_ca2: float, iterable(float), ~spynnaker.pyNN.RandomDistribution | ||
or (mapping) function | ||
:param i_alpha: :math:`\\tau_\\alpha` | ||
:type i_alpha: float, iterable(float), ~spynnaker.pyNN.RandomDistribution | ||
or (mapping) function | ||
:param i_offset: :math:`I_{offset}` | ||
:type i_offset: float, iterable(float), ~spynnaker.pyNN.RandomDistribution | ||
or (mapping) function | ||
:param v: :math:`V_{init}` | ||
:type v: float, iterable(float), ~spynnaker.pyNN.RandomDistribution | ||
or (mapping) function | ||
:param isyn_exc: :math:`I^{syn}_e` | ||
:type isyn_exc: float, iterable(float), ~spynnaker.pyNN.RandomDistribution | ||
or (mapping) function | ||
:param isyn_inh: :math:`I^{syn}_i` | ||
:type: isyn_inh: float, iterable(float), ~spynnaker.pyNN.RandomDistribution | ||
or (mapping) function | ||
""" | ||
|
||
# noinspection PyPep8Naming | ||
@default_initial_values({"v", "isyn_exc", "isyn_inh"}) | ||
def __init__( | ||
self, tau_m=20.0, cm=1.0, v_rest=-65.0, v_reset=-65.0, | ||
v_thresh=-50.0, tau_refrac=0.1, tau_ca2=50.0, i_ca2=0.0, | ||
i_alpha=0.1, i_offset=0.0, v=-65.0, isyn_exc=0.0, isyn_inh=0.0): | ||
# pylint: disable=too-many-arguments | ||
neuron_model = NeuronModelLeakyIntegrateAndFire( | ||
v, v_rest, tau_m, cm, i_offset, v_reset, tau_refrac) | ||
synapse_type = SynapseTypeDelta(isyn_exc, isyn_inh) | ||
input_type = InputTypeDelta() | ||
threshold_type = ThresholdTypeStatic(v_thresh) | ||
additional_input_type = AdditionalInputCa2Adaptive( | ||
tau_ca2, i_ca2, i_alpha) | ||
|
||
super().__init__( | ||
model_name="IF_curr_delta_ca2_adaptive", | ||
binary="IF_curr_delta_ca2_adaptive.aplx", | ||
neuron_model=neuron_model, input_type=input_type, | ||
synapse_type=synapse_type, threshold_type=threshold_type, | ||
additional_input_type=additional_input_type) |