"""This script runs a simulation of the dynamical system
extending the work of Van Assche to study recurrence
coefficients for a more general exponential measure."""

from __future__ import division
import mpmath as mp

from simulation import *
from plotting import *
#from plottingwithtitles import *

ion()
close('all')

data = {# System constraint: decimal precision
        'dec': 100,
        # Parameters in the mathematical formulation
        't': mp.mpf('0.01'),
        'zeta': mp.mpf('1'),
        'N': mp.mpf('1'),
        'n_end': mp.mpf('150'),
        # Optional: specify other initial conditions
        'S0': -10,
        'R0': -10,
        # Plotting pretties
        'col1': 'blue',
        'mar1': '.',
        'col2': 'mintcream',
        'mar2': '<',
        }

mp.mp.dps = data['dec']

simulation = [gen_fp_timedep, 
              gen_ic_standard,
              gen_standard,
              plot_3d,
              plot_2dprojection,
              plot_gens,
              gen_energy_eval,
              gen_energy_error,
              gen_energy_diff
]

for func in simulation:
    data = func(data)