-
Notifications
You must be signed in to change notification settings - Fork 124
/
__init__.py
65 lines (58 loc) · 2.8 KB
/
__init__.py
1
2
3
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# -*- coding: utf-8 -*-
"""
NEST v3 implementation of the PyNN API.
:copyright: Copyright 2006-2024 by the PyNN team, see AUTHORS.
:license: CeCILL, see LICENSE for details.
"""
try:
import tables # noqa: F401 - due to freeze when importing nest before tables
except ImportError:
pass
from .. import errors, random, space # noqa: F401
from ..network import Network # noqa: F401
from ..space import Space # noqa: F401
from ..standardmodels import StandardCellType
from ..random import NumpyRNG, GSLRNG, RandomDistribution # noqa: F401
from .cells import NativeCellType, native_cell_type # noqa: F401
from .electrodes import NativeElectrodeType, native_electrode_type # noqa: F401
from .synapses import NativeSynapseType, native_synapse_type # noqa: F401
from .standardmodels.cells import * # noqa: F403, F401
from .connectors import * # noqa: F403, F401
from .standardmodels.synapses import * # noqa: F403, F401
from .standardmodels.electrodes import * # noqa: F403, F401
from .standardmodels.receptors import * # noqa: F403, F401
from .recording import * # noqa: F403, F401
from .random import NativeRNG # noqa: F401
from .populations import Population, PopulationView, Assembly # noqa: F401
from .projections import Projection # noqa: F401
from .control import ( # noqa: F401
setup,
end,
run,
run_until,
run_for,
reset,
initialize,
get_current_time,
get_time_step,
get_min_delay,
get_max_delay,
num_processes,
rank,
)
from .procedural_api import create, connect, record, record_v, record_gsyn, set # noqa: F401
# ==============================================================================
# Utility functions
# ==============================================================================
def list_standard_models():
"""Return a list of all the StandardCellType classes available for this simulator."""
standard_cell_types = [obj for obj in globals().values() if isinstance(
obj, type) and issubclass(obj, StandardCellType) and obj is not StandardCellType]
for cell_class in standard_cell_types:
try:
create(cell_class())
except Exception as e:
print("Warning: %s is defined, but produces the following error: %s" %
(cell_class.__name__, e))
standard_cell_types.remove(cell_class)
return [obj.__name__ for obj in standard_cell_types]