qdiffusivity.binned

CDF-binned transverse density and diffusivity profiles.

This module provides binned (histogram-style) counterparts to the KDE classes in qdiffusivity.density and qdiffusivity.diffusivity. Binning is always in u-space — the CDF-uniformised coordinate \(u = F(z) \in [0, 1]\) built from the pooled equilibrium positions — so that bins are naturally finer where the particle density is high (adsorption peaks) and coarser where it is low, and every bin receives a comparable number of samples. This is the same equal-population strategy used by the project’s quantile scripts.

Two assignment schemes are supported:

  • Cloud-in-cell (CIC) — used for integer bins (N uniform u-space bins). Each sample is linearly split between the two nearest bin centres, avoiding the discontinuities that hard binning would introduce at the (population-balanced) bin edges.

  • Hard assignment — used when explicit bin edges (an array in [0, 1]) are supplied. Each sample falls in exactly one bin (np.digitize), matching the standard histogram behaviour.

The perpendicular diffusivity estimator supports the same \(O(\Delta t)\) Itô bias correction as the KDE diffusivity class, gated on ito_correction=False by default.

Functions

cic_assign(u_data, n_bins)

Cloud-in-cell assignment of u-space samples to uniform bins.

resolve_bins(bins[, n_default])

Resolve a bins spec into (n_bins, edges, use_cic).

Classes

LocalDiffusivityQBinned(atomgroup, *[, dim, ...])

CDF-binned transverse diffusivity estimator.

TransverseMassDensityQBinned(atomgroup, *[, ...])

CDF-binned transverse mass-density profile.

TransverseNumDensityQBinned(atomgroup, *[, ...])

CDF-binned transverse number-density profile.