Location: An encoding of the human ORd model by Steve Neiderer @ e65b98c32226 / python-testing.py

Author:
David Nickerson <david.nickerson@gmail.com>
Date:
2019-01-10 10:45:47+13:00
Desc:
adding a simple python test to help demonstrate https://github.com/dbrnz/opencor/issues/23
Permanent Source URI:
https://models.physiomeproject.org/w/andre/SAN-ORd/rawfile/e65b98c32226f05047cd3ca5ed6bbf22919887a1/python-testing.py

import OpenCOR as opencor

s = opencor.openRemoteSimulation('https://models.physiomeproject.org/w/andre/SAN-ORd/rawfile/fe51425ce5ef054bcf04128f29e22346717def48/action-potential.xml')
d = s.data()
d.setStartingPoint(0)
d.setEndingPoint(1000)
d.setPointInterval(1)
s.run()

t = 0
while t < 1001:
    next_t = t + 1
    d.setStartingPoint(t)
    d.setEndingPoint(next_t)
    d.setPointInterval(1)
    s.run()
    t = next_t