equations package
Module handling equations and “code strings”, expressions or statements, used
for example for the reset and threshold definition of a neuron.
Exported members:
Equations, Expression, Statements
codestrings module
Module defining CodeString, a class for a string of code together with
information about its namespace. Only serves as a parent class, its subclasses
Expression and Statements are the ones that are actually used.
Exported members:
Expression, Statements
Classes
CodeString(code) |
A class for representing “code strings”, i.e. |
Expression([code, sympy_expression]) |
Class for representing an expression. |
Statements(code) |
Class for representing statements. |
Functions
is_constant_over_dt(expression, variables, …) |
Check whether an expression can be considered as constant over a time step. |
equations module
Differential equations for Brian models.
Exported members:
Equations
Classes
EquationError |
Exception type related to errors in an equation definition. |
Equations(eqns, **kwds) |
Container that stores equations from which models can be created. |
SingleEquation(type, varname, dimensions[, …]) |
Class for internal use, encapsulates a single equation or parameter. |
Functions
check_identifier_basic(identifier) |
Check an identifier (usually resulting from an equation string provided by the user) for conformity with the rules. |
check_subexpressions(group, equations, …) |
Checks the subexpressions in the equations and raises an error if a subexpression refers to stateful functions without being marked as “constant over dt”. |
dimensions_and_type_from_string(unit_string) |
Returns the physical dimensions that results from evaluating a string like “siemens / metre ** 2”, allowing for the special string “1” to signify dimensionless units, the string “boolean” for a boolean and “integer” for an integer variable. |
is_stateful(expression, variables) |
Whether the given expression refers to stateful functions (and is therefore not guaranteed to give the same result if called repetively). |
refractory module
Module implementing Brian’s refractory mechanism.
Exported members:
add_refractoriness
Functions