Deborah.Rahab.ObservableHistory

Deborah.Rahab.ObservableHistory.autocorrMethod
autocorr(
    x::AbstractVector{<:Real},
    maxlag::Integer
) -> Vector{Float64}

Compute the (normalized) autocorrelation function $\rho(\Delta)$ of a 1D observable up to lag maxlag. The result is normalized so that $\rho(0) = 1$.

Arguments

  • x: Observable time series (1D vector).
  • maxlag: Maximum lag Δ to evaluate (inclusive).

Returns

  • Vector{Float64}: Autocorrelation values at lags Δ = 0:maxlag, with $\rho(0) = 1.0$.
source
Deborah.Rahab.ObservableHistory.observable_historyMethod
observable_history(
    ensemble::AbstractString,
    conf_idx::AbstractVector{<:Integer},
    X_info_ORG::AbstractVector{<:Real},
    observable::AbstractString
) -> Nothing

Plot the history of a given observable against configuration indices for a specific ensemble.

Arguments

  • ensemble: Ensemble name, displayed in the plot title.
  • conf_idx: Vector of configuration indices ($x$-axis).
  • X_info_ORG: Vector of observable values ($y$-axis).
  • observable: Name of the observable, used in the plot title and legend.

The function displays the figure inline (suitable for Jupyter).

source
Deborah.Rahab.ObservableHistory.plot_autocorr_tauintMethod
plot_autocorr_tauint(
    ensemble::AbstractString,
    x::AbstractVector{<:Real},
    observable::AbstractString;
    maxlag::Integer=200,
    window::Symbol=:first_nonpositive
) -> Nothing

Plot the autocorrelation $\rho(\Delta)$ of an observable and overlay the cumulative

\[\displaystyle{\tau_{\text{int}} = \dfrac{1}{2} + \sum_{k=1}^{\Delta} \rho(k)}\]

to visualize convergence of the integrated autocorrelation time.

The figure shows:

  • $\rho(\Delta)$ for Δ = 0:maxlag (line with markers)
  • A vertical line at Δ_cut (last lag included in the $\tau_{\text{int}}(\Delta)$ sum)
  • A shaded band over Δ $\in$ [1, Δ_cut] indicating the summed region
  • On the right $y$-axis, the cumulative $\tau_{\text{int}}(\Delta)$ curve

Arguments

  • ensemble: Ensemble name for title.
  • x: Observable time series (1D vector).
  • observable: Label used in title/legend.

Keyword Arguments

  • maxlag: Maximum lag for autocorrelation (clipped to length(x)-1).
  • window: Truncation rule for $\tau_{\text{int}}(\Delta)$ (:first_nonpositive or :fixed).

Notes

  • A typical effective spacing between independent samples is about $2 \, \tau_{\text{int}}$.
  • Inspect the $\tau_{\text{int}}(\Delta)$ curve plateau for stability.

The function displays the figure inline.

source
Deborah.Rahab.ObservableHistory.tau_int_from_rhoMethod
tau_int_from_rho(
    ρ::AbstractVector{<:Real};
    window::Symbol=:first_nonpositive
) -> Tuple{Float64,Int}

Estimate $\tau_{\text{int}}$ from a precomputed autocorrelation array $\rho(\Delta)$, ρ[1]=ρ(0)=1.

Arguments

  • ρ: Vector of autocorrelations at lags Δ=0,1,... (ρ[1]=1).
  • window: Truncation rule for the summation over Δ $\ge 1$.
    • :first_nonpositive — sum until the first $\Delta$ with $\rho(\Delta)$ $\le 0$ (simple positive-sequence window).
    • :fixed — sum all entries provided in $\rho$ (i.e., up to Δ = length(ρ)-1).

Returns

  • (τ_int, Δ_cut) where Δ_cut is the last lag included in the sum.
source