pub struct PhaseSpaceDiagnostics {
pub stream_count: StreamCountField,
pub local_entropy: Vec<f64>,
pub caustic_cells: Vec<[usize; 3]>,
}Expand description
Collected phase-space structure diagnostics for a single time step.
Fields§
§stream_count: StreamCountFieldNumber of overlapping phase-space streams in each spatial cell.
local_entropy: Vec<f64>Per-cell Boltzmann entropy (currently unpopulated; requires grid-level access).
caustic_cells: Vec<[usize; 3]>Grid indices [ix1, ix2, ix3] of cells with stream count > 1 (caustic locations).
Implementations§
Source§impl PhaseSpaceDiagnostics
impl PhaseSpaceDiagnostics
Sourcepub fn compute(repr: &dyn PhaseSpaceRepr) -> Self
pub fn compute(repr: &dyn PhaseSpaceRepr) -> Self
Build diagnostics from the current phase-space representation.
Queries the stream-count field and marks every cell with count > 1 as a caustic location.
Sourcepub fn velocity_distribution_at(
repr: &dyn PhaseSpaceRepr,
x: [f64; 3],
) -> Vec<f64>
pub fn velocity_distribution_at( repr: &dyn PhaseSpaceRepr, x: [f64; 3], ) -> Vec<f64>
Extract f(v|x) at a given physical position for dark matter detection predictions.
Sourcepub fn power_spectrum(density: &DensityField) -> Vec<(f64, f64)>
pub fn power_spectrum(density: &DensityField) -> Vec<(f64, f64)>
Power spectrum P(k) = |ρ̂(k)|². FFT of density field.
Returns (k, P(k)) pairs binned by integer |k| magnitude.
Sourcepub fn growth_rates(
density_history: &[DensityField],
dt: f64,
) -> Vec<(f64, f64)>
pub fn growth_rates( density_history: &[DensityField], dt: f64, ) -> Vec<(f64, f64)>
Stability analysis: fit exponential growth rate to each k-mode from density history.
For each k-bin, collects amplitude time series from per-step power spectra, then fits exponential via linear regression on ln(amplitude) vs t. Returns (k, growth_rate) pairs.
Auto Trait Implementations§
impl Freeze for PhaseSpaceDiagnostics
impl RefUnwindSafe for PhaseSpaceDiagnostics
impl Send for PhaseSpaceDiagnostics
impl Sync for PhaseSpaceDiagnostics
impl Unpin for PhaseSpaceDiagnostics
impl UnsafeUnpin for PhaseSpaceDiagnostics
impl UnwindSafe for PhaseSpaceDiagnostics
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more