Package PyDSTool :: Module Trajectory'
[hide private]
[frames] | no frames]

Module Trajectory'

source code

Trajectory classes.

Robert Clewley, June 2005.

Classes [hide private]
  HybridTrajectory
Hybrid, parameterized, trajectory class.
  Trajectory
Parameterized and non-parameterized trajectory class.
Functions [hide private]
 
convert_ptlabel_events(pts)
Creates an eventTimes-like dictionary from a pointset's labels.
source code
 
findApproxPeriod(traj, t0, t1_guess=None, T_guess=None, coordname=None, ttol=1e-05, rtol=0.01, guess_tol=0.1)
findPeriod does not ensure minimum period (it is up to the user to select a good initial guess, but guess_tol fraction of T_guess will be checked as a bracketing interval for bisection.
source code
 
numeric_to_traj(vals, trajname, coordnames, indepvar=None, indepvarname='t', indepdomain=None, all_types_float=True, discrete=True)
Utility function to convert one or more numeric type to a Trajectory.
source code
 
pointset_to_traj(pts)
Convert a pointset into a trajectory using linear interpolation, retaining parameterization by an independent variable if present.
source code
Variables [hide private]
  API = API_class()
  Continuous = Continuous Domain
  Discrete = Discrete Domain
  Inf = inf
  LargestInt32 = 2147483647
  NAMESEP = '.'
  ONES = ['1', '1.0', '1.', '(1)', '(1.0)', '(1.)']
  ZEROS = ['0', '0.0', '0.', '(0)', '(0.0)', '(0.)']
  _1DimplicitSolveMethods = ['newton', 'bisect', 'steffe']
  _all_complex = (<type 'complex'>, <type 'numpy.complexfloating...
  _all_float = (<type 'float'>, <type 'numpy.floating'>, <type '...
  _all_int = (<type 'int'>, <type 'numpy.integer'>, <type 'numpy...
  _all_numpy_complex = (<type 'numpy.complex128'>, <type 'numpy....
  _all_numpy_float = (<type 'numpy.float64'>, <type 'numpy.float...
  _all_numpy_int = (<type 'numpy.int32'>, <type 'numpy.int32'>, ...
  _complex_types = (<type 'complex'>, <type 'numpy.complexfloati...
  _float_types = (<type 'float'>, <type 'numpy.floating'>)
  _implicitSolveMethods = ['newton', 'bisect', 'steffe', 'fsolve']
  _indentstr = ' '
  _int_types = (<type 'int'>, <type 'numpy.integer'>)
  _num_equivtype = {<type 'float'>: <type 'numpy.float64'>, <typ...
  _num_maxmin = {<type 'numpy.int32'>: [-2147483648, 2147483647]...
  _num_name2equivtypes = {'float': (<type 'float'>, <type 'numpy...
  _num_name2type = {'float': <type 'numpy.float64'>, 'int': <typ...
  _num_type2name = {<type 'float'>: 'float', <type 'int'>: 'int'...
  _num_types = (<type 'float'>, <type 'int'>, <type 'numpy.float...
  _pytypefromtype = {<type 'numpy.int32'>: <type 'int'>, <type '...
  _real_types = (<type 'int'>, <type 'numpy.integer'>, <type 'fl...
  _seq_types = (<type 'list'>, <type 'tuple'>, <type 'numpy.ndar...
  builtinFnSigInfo = {'for': 4, 'getbound': 2, 'getindex': 1, 'g...
  builtin_auxnames = ['globalindepvar', 'initcond', 'heav', 'if'...
  contained = contained
  name_chars_RE = re.compile(r'\w')
  notcontained = notcontained
  null_predicate = null_predicate_class(None)
  num_chars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
  protected_allnames = ['acos', 'asin', 'atan', 'atan2', 'ceil',...
  protected_auxnamesDB = ModelSpec internal helper class: auxfnD...
  protected_macronames = ['for', 'if', 'max', 'min', 'sum']
  protected_mathnames = ['acos', 'asin', 'atan', 'atan2', 'ceil'...
  protected_randomnames = ['BPF', 'LOG4', 'NV_MAGICCONST', 'RECI...
  protected_scipynames = ['sign', 'mod']
  protected_specialfns = ['special_airy', 'special_airye', 'spec...
  syms = {0: 'ENDMARKER', 1: 'NAME', 2: 'NUMBER', 3: 'STRING', 4...
  targetLangs = ['c', 'python', 'matlab']
  uncertain = uncertain
Function Details [hide private]

convert_ptlabel_events(pts)

source code 

Creates an eventTimes-like dictionary from a pointset's labels. (Event X time recorded in a label is recorded as "Event:X")

numeric_to_traj(vals, trajname, coordnames, indepvar=None, indepvarname='t', indepdomain=None, all_types_float=True, discrete=True)

source code 

Utility function to convert one or more numeric type to a Trajectory. Option to make the trajectory parameterized or not, by pasing an indepvar value.

To use integer types for trajectory coordinates unset the default all_types_float=True argument.

To create interpolated (continuously defined) trajectories, set discrete=False, otherwise leave at its default value of True.


Variables Details [hide private]

_all_complex

Value:
(<type 'complex'>,
 <type 'numpy.complexfloating'>,
 <type 'numpy.complex128'>,
 <type 'numpy.complex64'>,
 <type 'numpy.complex128'>)

_all_float

Value:
(<type 'float'>,
 <type 'numpy.floating'>,
 <type 'numpy.float64'>,
 <type 'numpy.float32'>,
 <type 'numpy.float64'>)

_all_int

Value:
(<type 'int'>,
 <type 'numpy.integer'>,
 <type 'numpy.int32'>,
 <type 'numpy.int32'>,
 <type 'numpy.int8'>,
 <type 'numpy.int16'>,
 <type 'numpy.int32'>,
 <type 'numpy.int64'>)

_all_numpy_complex

Value:
(<type 'numpy.complex128'>,
 <type 'numpy.complex64'>,
 <type 'numpy.complex128'>)

_all_numpy_float

Value:
(<type 'numpy.float64'>,
 <type 'numpy.float32'>,
 <type 'numpy.float64'>)

_all_numpy_int

Value:
(<type 'numpy.int32'>,
 <type 'numpy.int32'>,
 <type 'numpy.int8'>,
 <type 'numpy.int16'>,
 <type 'numpy.int32'>,
 <type 'numpy.int64'>)

_complex_types

Value:
(<type 'complex'>, <type 'numpy.complexfloating'>)

_num_equivtype

Value:
{<type 'float'>: <type 'numpy.float64'>,
 <type 'int'>: <type 'numpy.int32'>,
 <type 'numpy.integer'>: <type 'numpy.int32'>,
 <type 'numpy.floating'>: <type 'numpy.float64'>,
 <type 'numpy.int8'>: <type 'numpy.int32'>,
 <type 'numpy.int16'>: <type 'numpy.int32'>,
 <type 'numpy.int32'>: <type 'numpy.int32'>,
 <type 'numpy.int32'>: <type 'numpy.int32'>,
...

_num_maxmin

Value:
{<type 'numpy.int32'>: [-2147483648, 2147483647],
 <type 'numpy.float64'>: [-inf, inf]}

_num_name2equivtypes

Value:
{'float': (<type 'float'>,
           <type 'numpy.floating'>,
           <type 'numpy.float64'>,
           <type 'numpy.float32'>,
           <type 'numpy.float64'>),
 'int': (<type 'int'>,
         <type 'numpy.integer'>,
         <type 'numpy.int32'>,
...

_num_name2type

Value:
{'float': <type 'numpy.float64'>, 'int': <type 'numpy.int32'>}

_num_type2name

Value:
{<type 'float'>: 'float',
 <type 'int'>: 'int',
 <type 'numpy.integer'>: 'int',
 <type 'numpy.floating'>: 'float',
 <type 'numpy.int8'>: 'int',
 <type 'numpy.int16'>: 'int',
 <type 'numpy.int32'>: 'int',
 <type 'numpy.int32'>: 'int',
...

_num_types

Value:
(<type 'float'>,
 <type 'int'>,
 <type 'numpy.floating'>,
 <type 'numpy.integer'>)

_pytypefromtype

Value:
{<type 'numpy.int32'>: <type 'int'>,
 <type 'numpy.float64'>: <type 'float'>}

_real_types

Value:
(<type 'int'>,
 <type 'numpy.integer'>,
 <type 'float'>,
 <type 'numpy.floating'>)

_seq_types

Value:
(<type 'list'>, <type 'tuple'>, <type 'numpy.ndarray'>)

builtinFnSigInfo

Value:
{'for': 4,
 'getbound': 2,
 'getindex': 1,
 'globalindepvar': 1,
 'heav': 1,
 'if': 3,
 'initcond': 1,
 'max': 1,
...

builtin_auxnames

Value:
['globalindepvar', 'initcond', 'heav', 'if', 'getindex', 'getbound']

protected_allnames

Value:
['acos',
 'asin',
 'atan',
 'atan2',
 'ceil',
 'cos',
 'cosh',
 'degrees',
...

protected_auxnamesDB

Value:
ModelSpec internal helper class: auxfnDBclass object

protected_mathnames

Value:
['acos',
 'asin',
 'atan',
 'atan2',
 'ceil',
 'cos',
 'cosh',
 'degrees',
...

protected_randomnames

Value:
['BPF',
 'LOG4',
 'NV_MAGICCONST',
 'RECIP_BPF',
 'Random',
 'SG_MAGICCONST',
 'SystemRandom',
 'TWOPI',
...

protected_specialfns

Value:
['special_airy',
 'special_airye',
 'special_ai_zeros',
 'special_bi_zeros',
 'special_ellipj',
 'special_ellipk',
 'special_ellipkinc',
 'special_ellipe',
...

syms

Value:
{0: 'ENDMARKER',
 1: 'NAME',
 2: 'NUMBER',
 3: 'STRING',
 4: 'NEWLINE',
 5: 'INDENT',
 6: 'DEDENT',
 7: 'LPAR',
...