PyDSTool.jl-7186c646-c682-5568-b8f7-a702076b479d
Last snapshots taken from https://gitlab.com/UnofficialJuliaMirror/PyDSTool.jl-7186c646-c682-5568-b8f7-a702076b479d on 2019-11-20T19:05:41.515-05:00 by @UnofficialJuliaMirrorBot via Travis job 153.65 , triggered by Travis cron job on branch "master"
https://gitlab.com/UnofficialJuliaMirrorSnapshots/PyDSTool.jl-7186c646-c682-5568-b8f7-a702076b479d
Science Score: 18.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.1%) to scientific vocabulary
Repository
Last snapshots taken from https://gitlab.com/UnofficialJuliaMirror/PyDSTool.jl-7186c646-c682-5568-b8f7-a702076b479d on 2019-11-20T19:05:41.515-05:00 by @UnofficialJuliaMirrorBot via Travis job 153.65 , triggered by Travis cron job on branch "master"
Basic Info
- Host: gitlab.com
- Owner: UnofficialJuliaMirrorSnapshots
- Default Branch: master
Statistics
- Stars: 0
- Forks: 0
- Open Issues:
- Releases: 0
Metadata Files
README.md
PyDSTool.jl
PyDSTool.jl is a wrapper for the PyDSTool Python library for analysis of dynamical systems. This wrapper includes three parts:
1) Installation and direct access to PyDSTool 2) A low-level development API and provides some functionality to make directly dealing with the library a little bit easier, but still requires knowledge of PyDSTool itself. 3) A high-level API for usage with DifferentialEquations
The tests show how to use the functionality. It is used as an addon in the DifferentialEquations.jl ecosystem. It is recommended that users use this functionality through DifferentialEquations.jl.
Bifurcation analysis is provided by the wrapper package PyDSTool.jl, which wraps the functionality of PyDSTool. The the package has an interface for directly using PyDSTool itself, included is a higher level interface that makes these tools compatible with more standard JuliaDiffEq types.
Installation
This functionality does not come standard with DifferentialEquations.jl. To use this functionality, you must install PyDSTool.jl:
julia
]add PyDSTool
using PyDSTool
Calcium Bifurcation Tutorial
In this tutorial we will show how to do some simple bifurcation plots. We will follow the PyDSTool tutorial for the calcium channel model and re-create the results using the wrapped functionality.
Specification of a Model
We will specify the model using a ParameterizedFunction:
julia
using ParameterizedFunctions
f = @ode_def begin
dv = ( i + gl * (vl - v) - gca * 0.5 * (1 + tanh( (v-v1)/v2 )) * (v-vca) )/c
dw = v-w
end vl vca i gl gca c v1 v2
(Note that using PyDSTool requires use of the @ode_def macro). Next to build the ODE we need an initial condition and a starting timepoint.
julia
u0 = [0;0]
tspan = [0;30]
p = [-60,120,0.0,2,4,20,-1.2,18]
Then we use the following command to build the PyDSTool ODE:
julia
dsargs = build_ode(f,u0,tspan,p)
Now we need to build the continuation type. Following the setup of PyDSTool's tutorial, we need to start near the steady state. The commands translate as:
julia
ode = ds[:Generator][:Vode_ODEsystem](dsargs)
ode[:set](pars = Dict("i"=>-220))
ode[:set](ics = Dict("v"=>-170))
PC = ds[:ContClass](ode)
Once we have the continuation type, we can call the bifurcation_curve function.
Instead of building the args into some object one-by-one, we simply make a
function call with keyword arguments. Using the same arguments as the PyDSTool
tutorial:
julia
bif = bifurcation_curve(PC,"EP-C",["i"],
max_num_points=450,
max_stepsize=2,min_stepsize=1e-5,
stepsize=2e-2,loc_bif_points="all",
save_eigen=true,name="EQ1",
print_info=true,calc_stab=true)
This returns a BifurcationCurve type. Important fields of this type are:
points: the values along the curvespecial_points: the values for the bifurcation pointsstab: an array which gives the stability of each point along the curve."S"is for stable,Nis for neutral, andUis for unstable.
Instead of using the fields directly, we will use the plot recipe. The plot
recipe requires you give the x,y coordinates to plot. Here we will plot
it in the (i,v) plane:
julia
using Plots
plot(bif,(:i,:v))

Bifucation Curve Function Definition
julia
function bifurcation_curve(PC,bif_type,freepars;max_num_points=450,
max_stepsize=2,min_stepsize=1e-5,
stepsize=2e-2,loc_bif_points="all",
save_eigen=true,name="DefaultName",
print_info=true,calc_stab=true,
var_tol = 1e-6, func_tol = 1e-6,
test_tol = 1e-4,
initpoint=nothing,solver_sequence=[:forward])
Citation (CITATION.bib)
@article{DifferentialEquations.jl-2017,
author = {Rackauckas, Christopher and Nie, Qing},
doi = {10.5334/jors.151},
journal = {The Journal of Open Source Software},
keywords = {Applied Mathematics},
note = {Exported from https://app.dimensions.ai on 2019/05/05},
number = {1},
pages = {},
title = {DifferentialEquations.jl – A Performant and Feature-Rich Ecosystem for Solving Differential Equations in Julia},
url = {https://app.dimensions.ai/details/publication/pub.1085583166 and http://openresearchsoftware.metajnl.com/articles/10.5334/jors.151/galley/245/download/},
volume = {5},
year = {2017}
}
Dependencies
- Conda 0.2.0
- DataStructures *
- DiffEqBase 3.0.0
- PyCall *
- RecipesBase *
- julia 0.7-beta2
- ParameterizedFunctions *