Esempio n. 1
0
File: ps8.py Progetto: owingit/chaos
def embed_run(dset='data1',
              delay=150,
              vdim=7,
              xdim=0,
              ydim=1,
              file_prefix=None):
    '''
    Renders a parameterized delay coordinate embedding.

    '''
    data = numpy.loadtxt('data/ps8/{0}'.format(dset), dtype=numpy.float64)
    vs = embed.embed(data[:, 0], delay, vdim)
    plot.embedded(vs,
                  xdim,
                  ydim,
                  'k.',
                  markersize=0.6,
                  ybound=(0, 2 * numpy.pi),
                  yticks=(0, numpy.pi / 2, numpy.pi, 3 * numpy.pi / 2,
                          2 * numpy.pi),
                  yticklabels=('0', r'$\frac{\pi}{2}$', r'$\pi$',
                               r'$\frac{3\pi}{2}$', r'$2\pi$'),
                  title=r'Delay Coordinate Embedding: {0}, $\tau={1}$'.format(
                      dset, _get_actual_delay(dset, 1, delay)),
                  xlabel=r'$\theta(t + {0})$'.format(
                      _get_actual_delay(dset, xdim, delay)),
                  ylabel=r'$\theta(t + {0})$'.format(
                      _get_actual_delay(dset, ydim, delay)),
                  aspect='equal',
                  file_prefix=file_prefix)
Esempio n. 2
0
def pr4(file_prefix=None):
    data = numpy.loadtxt("data/ps8/data2.first250sec", dtype=numpy.float64)
    vs = tispy.delay("-d", "155", "-m", "8", input=data)
    plot.embedded(
        vs,
        0,
        2,
        "k.",
        markersize=0.6,
        ybound=(0, 2 * numpy.pi),
        yticks=(0, numpy.pi / 2, numpy.pi, 3 * numpy.pi / 2, 2 * numpy.pi),
        yticklabels=("0", r"$\frac{\pi}{2}$", r"$\pi$", r"$\frac{3\pi}{2}$", r"$2\pi$"),
        title=r"Delay Coordinate Embedding: {0}, $\tau={1}$ s".format("data2", _get_actual_delay("data2", 1, 155)),
        xlabel=r"$\theta(t + {0})$".format(_get_actual_delay("data2", 0, 155)),
        ylabel=r"$\theta(t + {0})$".format(_get_actual_delay("data2", 2, 155)),
        aspect="equal",
        file_prefix=suffixed(file_prefix, "_3"),
    )
Esempio n. 3
0
File: ps9.py Progetto: owingit/chaos
def pr4(file_prefix=None):
    data = numpy.loadtxt('data/ps8/data2.first250sec', dtype=numpy.float64)
    vs = tispy.delay('-d', '155', '-m', '8', input=data)
    plot.embedded(
        vs,
        0,
        2,
        'k.',
        markersize=0.6,
        ybound=(0, 2 * numpy.pi),
        yticks=(0, numpy.pi / 2, numpy.pi, 3 * numpy.pi / 2, 2 * numpy.pi),
        yticklabels=('0', r'$\frac{\pi}{2}$', r'$\pi$', r'$\frac{3\pi}{2}$',
                     r'$2\pi$'),
        title=r'Delay Coordinate Embedding: {0}, $\tau={1}$ s'.format(
            'data2', _get_actual_delay('data2', 1, 155)),
        xlabel=r'$\theta(t + {0})$'.format(_get_actual_delay('data2', 0, 155)),
        ylabel=r'$\theta(t + {0})$'.format(_get_actual_delay('data2', 2, 155)),
        aspect='equal',
        file_prefix=suffixed(file_prefix, '_3'))
Esempio n. 4
0
def embed_run(dset='data1', delay=150, vdim=7, xdim=0, ydim=1, file_prefix=None):
    '''
    Renders a parameterized delay coordinate embedding.

    '''
    data = numpy.loadtxt('data/ps8/{0}'.format(dset), dtype=numpy.float64)
    vs = embed.embed(data[:,0], delay, vdim)
    plot.embedded(
                vs, 
                xdim, 
                ydim, 
                'k.', 
                markersize=0.6, 
                ybound=(0, 2*numpy.pi),
                yticks=(
                        0,
                        numpy.pi/2,
                        numpy.pi,
                        3*numpy.pi/2,
                        2*numpy.pi
                    ),
                yticklabels=(
                        '0',
                        r'$\frac{\pi}{2}$',
                        r'$\pi$',
                        r'$\frac{3\pi}{2}$',
                        r'$2\pi$'
                    ),
                title=r'Delay Coordinate Embedding: {0}, $\tau={1}$'.format(
                                                dset, 
                                                _get_actual_delay(dset, 1, delay)),
                xlabel=r'$\theta(t + {0})$'.format(_get_actual_delay(dset, xdim, delay)),
                ylabel=r'$\theta(t + {0})$'.format(_get_actual_delay(dset, ydim, delay)),
                aspect='equal',
                file_prefix=file_prefix
            )