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
|
A class for representing "code strings", i.e. a single Python expression or a sequence of Python statements. |
|
Class for representing an expression. |
|
Class for representing statements. |
Functions
|
Check whether an expression can be considered as constant over a time step. |
equations
module
Differential equations for Brian models.
Exported members:
Equations
Classes
Exception type related to errors in an equation definition. |
|
Container that stores equations from which models can be created. |
|
Class for internal use, encapsulates a single equation or parameter. |
Functions
|
Check an identifier (usually resulting from an equation string provided by the user) for conformity with the rules. |
|
Make sure that identifier names do not clash with function names. |
|
Make sure that identifier names do not clash with function names. |
|
Check that an identifier is not using a reserved special variable name. |
|
Make sure that identifier names do not clash with unit names. |
|
Checks the subexpressions in the equations and raises an error if a subexpression refers to stateful functions without being marked as "constant over dt". |
|
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. |
|
Whether the given expression refers to stateful functions (and is therefore not guaranteed to give the same result if called repetively). |
|
Parse a string defining equations. |
refractory
module
Module implementing Brian’s refractory mechanism.
Exported members:
add_refractoriness
Functions
|
Extends a given set of equations with the refractory mechanism. |
|
Check that the identifier is not using a name reserved for the refractory mechanism. |
unitcheck
module
Utility functions for handling the units in Equations
.
Exported members:
check_dimensions
, check_units_statements
Functions
|
Compares the physical dimensions of an expression to expected dimensions in a given namespace. |
|
Check the units for a series of statements. |