Skip to content

Synapse Models

FactorSynapse #

Bases: Synapse

Synapse which scales the transmitted value by a specified factor. Factor is equivalent to the connection weight if weight==1.

Parameters:

Name Type Description Default
max_trans float

Maximum value that can be transmitted. Default: None.

None
mod_factor float

Factor by which the weight value is multiplied. Default: 0.

0
Source code in src/CompNeuroPy/synapse_models/synapse_models.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class FactorSynapse(Synapse):
    """
    Synapse which scales the transmitted value by a specified factor. Factor is
    equivalent to the connection weight if weight==1.

    Parameters:
        max_trans (float, optional):
            Maximum value that can be transmitted. Default: None.
        mod_factor (float, optional):
            Factor by which the weight value is multiplied. Default: 0.
    """

    def __init__(self, max_trans: None | float = None, mod_factor: float = 0):
        super().__init__(
            parameters=f"""
            {f"max_trans  = {max_trans}" if max_trans is not None else ""}
            mod_factor = {mod_factor}
        """,
            equations="",
            pre_spike=f"""
            g_target += w * mod_factor {": max = max_trans" if max_trans is not None else ""}
        """,
            name="factor_synapse",
            description="""
            Synapse which scales the transmitted value by a specified factor. Factor is
            equivalent to the connection weight if weight==1.
        """,
        )