示例#1
0
#! /usr/bin/env python
"""
Test for parameter operations
"""
import os
import sys

from test_library import add_package_path

add_package_path('model-container')

import model_container as nmc

my_model_container = nmc.ModelContainer(None)

my_model_container.Read("cells/purkinje/edsjb1994.ndf")

som_cm = my_model_container.GetParameter("/Purkinje/segments/soma", "CM")

som_erev = my_model_container.GetParameter("/Purkinje/segments/soma/cat",
                                           "Erev")

print "Soma CM is %f and EREV is %f" % (som_cm, som_erev)

my_model_container.SetParameter("/Purkinje/segments/soma", "CM", 300.0)

som_cm = my_model_container.GetParameter("/Purkinje/segments/soma", "CM")

print "Soma CM is %f and EREV is %f" % (som_cm, som_erev)

print "Done!"
示例#2
0
#! /usr/bin/env python
"""

"""
import os
import sys
import pdb

STEPS = 1000
TIME_STEP = 0.002
TIME_GRANULARITY = 1e-9

from test_library import add_package_path

add_package_path("chemesis3")

from chemesis3.components import Pool

soma_ca = [
    Pool(),
    Pool(),
    Pool(),
]

soma_ca[0].SetSerial(2)

soma_ca[0].SetReactionFlags([0])
soma_ca[0].SetReactions([0])

soma_ca[0].dConcentrationInit = 0.001
soma_ca[0].dConcentration = 0.0
示例#3
0
#! /usr/bin/env python
"""
This test checks the struct wrapper for the pulsegen
data struct. SWIG converts it into a low level class.
"""
import os
import sys
import pdb

from test_library import add_package_path

add_package_path("experiment")

from experiment.perfectclamp import PerfectClamp

pc = PerfectClamp("Test clamp")

dtime = 0.0
steps = 200
stepsize = 0.5
voltage_out = 0.111
command_voltage = -0.06

pc.SetCommand(command_voltage)

pc.AddVariable(voltage_out)

pc.Initialize()

for i in range(0, 20):
示例#4
0
a test for cal1 use in python
with a model container.
"""
import os
import pdb
import sys

from test_library import add_package_path

os.environ['NEUROSPACES_NMC_MODELS'] = os.path.join('/', 'usr', 'local',
                                                    'neurospaces', 'models',
                                                    'library')

# have to go a level deeper since multiple imports would
# register the neurospaces module.
add_package_path("model-container")
add_package_path("chemesis3")
add_package_path("experiment")

STEPS = 1000
TIME_STEP = 0.002
TIME_GRANULARITY = 1e-9

#---------------------------------------------------------------------------

from model_container import ModelContainer

my_model = ModelContainer()

my_model.Read("chemesis/cal1.ndf")
#! /usr/bin/env python
"""
test of the perfectclamp bindings.
"""
import os
import sys
import pdb

from test_library import add_package_path

add_package_path("heccer")
add_package_path("experiment")

from heccer import Heccer
from heccer import Compartment
from heccer import Intermediary

from heccer.heccer_base import HECCER_DUMP_VM_COMPARTMENT_MATRIX
from heccer.heccer_base import HECCER_DUMP_VM_COMPARTMENT_MATRIX_DIAGONALS
from heccer.heccer_base import HECCER_DUMP_VM_MECHANISM_OPERATIONS

HECCER_TESTED_THINGS = 1245184

c1 = Compartment()

c1.dCm = 4.57537e-11
c1.dEm = -0.08
c1.dInitVm = -0.068
c1.dInject = 0
c1.dRa = 360502
c1.dRm = 3.58441e+08
示例#6
0
#! /usr/bin/env python
"""
This test checks for the for the chemesis3 modules 
to be present and importable.
"""
import os
import sys
import pdb

from test_library import add_package_path

add_package_path("chemesis3")

print "Importing chemesis3_base"
import chemesis3.chemesis3_base

print "Importing chemesis3"
import chemesis3

print "Done!"
示例#7
0
#! /usr/bin/env python
"""

"""
import os
import sys
import pdb

from test_library import add_package_path

add_package_path("heccer")

from heccer.__cbi__ import PackageInfo

_package_info = PackageInfo()

version = _package_info.GetVersion()

print "%s" % version

print "Done!"