shnitsel.analyze.populations#

Attributes#

Classes#

PopulationStatistics

Class to hold population statistics of a homogeneous/compatible set

Functions#

calc_classical_populations(…)

Function to calculate classical state populations from the active state information in astate of the dataset `frames.

Module Contents#

class PopulationStatistics(base_traj_or_data)#

Class to hold population statistics of a homogeneous/compatible set of trajectories.

Holds absolute and relative statistics, with the latter being derived from the prior.

Parameters:

base_traj_or_data (shnitsel.data.dataset_containers.frames.Frames | xarray.DataArray)

_absolute_statistics: xarray.DataArray#
property absolute: xarray.DataArray#

Returns the absolute population statistics across time.

Values should be integer and of the shape (time, state) where the value in [t,s] is the number of trajectories with active state s at time t

Returns:

The array with absolute population statistics over time

Return type:

xr.DataArray

property relative: xarray.DataArray#

Returns the relative population statistics across time, i.e. the ratio of trajectories in every state.

Values should be float in the range [0,1] and of the shape (time, state) where the value at position [t,s] is the ratio of trajectories still running up to this point with active state s at time t.

Note for interpretation that only having one trajectory left at time t with state s would make the value at [t,s] a full 1.

Returns:

The array with relative population statistics over time

Return type:

xr.DataArray

static _calc_classical_populations(frames)#

Function to calculate classical state populations from the active state information in astate of the dataset `frames.

Does not use the partial QM coefficients of the states.

Parameters:

frames (Frames) – The dataset holding the active state information in a variable astate.

Returns:

The array holding the absolute number of trajectories in each respective state.

Return type:

xr.DataArray

calc_classical_populations(data: shnitsel.data.tree.tree.ShnitselDB[shnitsel.data.dataset_containers.trajectory.Trajectory | shnitsel.data.dataset_containers.frames.Frames]) shnitsel.data.tree.tree.ShnitselDB[PopulationStatistics]#
calc_classical_populations(data: shnitsel.data.dataset_containers.trajectory.Trajectory | shnitsel.data.dataset_containers.frames.Frames | xarray.Dataset) PopulationStatistics

Function to calculate classical state populations from the active state information in astate of the dataset `frames.

Does not use the partial QM coefficients of the states.

Parameters:

frames (Frames) – The dataset holding the active state information in a variable astate.

Returns:

  • PopulationStatistics – The object holding population statistics (absolute+relative) in each respective state.

  • ShnitselDB[PopulationStatistics] – The tree holding the hierarchical population statistics for each flat group in the tree with compatible metadata.

calc_pops#