How to use the tellurium.ParameterScan function in tellurium

To help you get started, we’ve selected a few tellurium examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sys-bio / tellurium / examples / notebooks-py / parameter_scan.py View on Github external
#!!! DO NOT CHANGE !!! THIS FILE WAS CREATED AUTOMATICALLY FROM NOTEBOOKS !!! CHANGES WILL BE OVERWRITTEN !!! CHANGE CORRESPONDING NOTEBOOK FILE !!!
from __future__ import print_function
import tellurium as te

r = te.loada('''
    J1: $Xo -> x; 0.1 + k1*x^4/(k2+x^4);
    x -> $w; k3*x;

    k1 = 0.9;
    k2 = 0.3;
    k3 = 0.7;
    x = 0;
''')

# parameter scan
p = te.ParameterScan(r,
    # settings
    startTime = 0,
    endTime = 15,
    numberOfPoints = 50,
    polyNumber = 10,
    endValue = 1.8,
    alpha = 0.8,
    value = "x",
    selection = "x",
    color = ['#0F0F3D', '#141452', '#1A1A66', '#1F1F7A', '#24248F', '#2929A3',
               '#2E2EB8', '#3333CC', '#4747D1', '#5C5CD6']                    
)
# plot
p.plotPolyArray()
github sys-bio / tellurium / examples / tellurium-files / parameterscan / plot_array.py View on Github external
Plot array.
"""
from __future__ import print_function, division
import tellurium as te

model = '''
    $Xo -> S1; vo;
    S1 -> S2; k1*S1 - k2*S2;
    S2 -> $X1; k3*S2;
    
    vo = 1
    k1 = 2; k2 = 0; k3 = 3;
'''

rr = te.loada(model)
p = te.ParameterScan(rr,
    startTime = 0,
    endTime = 20,
    numberOfPoints = 50,
    width = 2,
    xlabel = 'Time',
    ylabel = 'Concentration',
    title = 'Cell')
p.plotArray()
github sys-bio / tellurium / examples / notebooks-py / parameter_scan.py View on Github external
p.plotPolyArray()


# In[2]:

r = te.loada('''
    $Xo -> S1; vo;
    S1 -> S2; k1*S1 - k2*S2;
    S2 -> $X1; k3*S2;
    
    vo = 1
    k1 = 2; k2 = 0; k3 = 3;
''')

# parameter scan
p = te.ParameterScan(r,
    # settings
    startTime = 0,
    endTime = 6,
    numberOfPoints = 50,
    startValue = 1,
    endValue = 5,
    colormap = "cool",
    independent = ["Time", "k1"],
    dependent = "S1",
    xlabel = "Time",
    ylabel = "x",
    title = "Model"                                  
)
# plot
p.plotSurface()
github sys-bio / tellurium / examples / tellurium-files / parameterscan / create_colormap.py View on Github external
import tellurium as te

model = '''
    $Xo -> S1; vo;
    S1 -> S2; k1*S1 - k2*S2;
    S2 -> $X1; k3*S2;
    
    vo = 1
    k1 = 2; k2 = 0; k3 = 3;
'''
# load model
rr = te.loada(model)

# perform parameter scan
colormap = te.ParameterScan.createColormap([.86, .08, .23], [.12, .56, 1])
p = te.ParameterScan(rr,
    endTime=3,
    colormap=colormap
)
p.createColorPoints()
p.plotSurface()
github sys-bio / tellurium / examples / tellurium-files / parameterscan / plot_multi_array.py View on Github external
Plot multi array.
"""
from __future__ import print_function, division
import tellurium as te

model = '''
    $Xo -> S1; vo;
    S1 -> S2; k1*S1 - k2*S2;
    S2 -> $X1; k3*S2;
    
    vo = 1
    k1 = 2; k2 = 0; k3 = 3;
'''

rr = te.loada(model)
p = te.ParameterScan(rr,
    startTime = 0,
    endTime = 20,
    numberOfPoints = 50,
    width = 2,
    title = 'Cell',
    selection = ['Time', 'S1', 'S2']
)
p.plotMultiArray('k1', [1, 1.5, 2], 'k3', [.5, 1, 1.5])
github sys-bio / tellurium / examples / tellurium-files / parameterscan / create_colormap.py View on Github external
from __future__ import print_function, division
import tellurium as te

model = '''
    $Xo -> S1; vo;
    S1 -> S2; k1*S1 - k2*S2;
    S2 -> $X1; k3*S2;
    
    vo = 1
    k1 = 2; k2 = 0; k3 = 3;
'''
# load model
rr = te.loada(model)

# perform parameter scan
colormap = te.ParameterScan.createColormap([.86, .08, .23], [.12, .56, 1])
p = te.ParameterScan(rr,
    endTime=3,
    colormap=colormap
)
p.createColorPoints()
p.plotSurface()
github sys-bio / tellurium / examples / tellurium-files / parameterscanExample.py View on Github external
as a surface plot.
"""
import tellurium as te

model = '''
    $Xo -> S1; vo;
    S1 -> S2; k1*S1 - k2*S2;
    S2 -> $X1; k3*S2;

    vo = 1
    k1 = 2; k2 = 0; k3 = 3;
    Xo = 0; S1 = 0; S2 = 0; X1 = 0;
'''

rr = te.loada(model)
p = te.ParameterScan(rr)

p.startTime = 0
p.endTime = 6
p.numberOfPoints = 50
p.startValue = 1
p.endValue = 5

p.independent = ["Time", "k1"]
p.dependent = "S1"

p.xlabel = "Time"
p.ylabel = r"$k_{1}$"
p.zlabel = r"$S_{1}$"

p.plotSurface()