Пример #1
0
def LPs(jj=None):
    return [
        (11, 1, LP.spatial1d(jj)),
        (12, 1, LP.correlations),
        (15, 0, LP.spectral_errors),
        (13, 0, LP.phase_particles(True, jj)),
        (14, 0, LP.sliding_marginals(jj)),
    ]
Пример #2
0
def LPs(jj=None, params=params):
    return [
        (14, 1, LP.sliding_marginals(obs_inds=jj, zoomy=0.8, **params)),
        (13, 1,
         LP.phase_particles(is_3d=False,
                            obs_inds=jj,
                            zoom=0.8,
                            Tplot=0,
                            **params)),
    ]
Пример #3
0
def LPs(jj=None, params=params):
    return [
        (1, LP.correlations),
        (1, LP.sliding_marginals(jj, zoomy=0.8, **params)),
        (1, LP.phase_particles(is_3d=True, obs_inds=jj, **params)),
    ]
Пример #4
0
def LP_setup(jj=None):
    return [
        (11, 1, LP.spatial2d(square, ind2sub, jj, cm)),
        (15, 0, LP.spectral_errors),
        (14, 0, LP.sliding_marginals(dims=cntr + np.arange(4))),
    ]
Пример #5
0
def LPs(jj=None, params=params):
    return [
        (12, 1, LP.correlations),
        (14, 1, LP.sliding_marginals(jj, zoomy=0.8, **params)),
        (13, 1, LP.phase3d(jj, **params)),
    ]
Пример #6
0
Dyn = {
    'M': Nx+Np,     # Length of (total/augmented) state vector
    'model': step,  # Actual model
    'noise': 0,     # Additive noise (variance)
    # 'noise': GaussRV(C=.1*np.eye(Nx+Np)),
}

# Define observation model using convenience function partial_Id_Obs
jj = np.arange(Nx)  # obs indices (y = x[jj])
Obs = modelling.partial_Id_Obs(Nx+Np, jj)
Obs['noise'] = 1

# Specify liveplotting (and replay) functionality.
LP = [
    (1, LP.spatial1d(jj)),
    (1, LP.sliding_marginals(
        jj, zoomy=0.8, dims=[0, Nx], labels=["$x_0$", "Force"]),
     ),
]

# Labels for sectors of state vector.
# DAPPER will compute diagnostic statistics for the full state vector,
# but also for each sector of it (averaged in space according to the
# methods specified in your .dpr_config.yaml:field_summaries key).
# The name "sector" comes from its typical usage to distinguish
# "ocean" and "land" parts of the state vector.
# Here we use it to get individual statistics of the parameter and state.
parts = dict(state=np.arange(Nx),
             param=np.arange(Np)+Nx)

# Wrap-up model specification
HMM = modelling.HiddenMarkovModel(Dyn, Obs, t, sectors=parts, LP=LP)