htmd.adaptive.util module#
- htmd.adaptive.util.getEpochSimIdx(data, epoch)#
Return the simulation indexes in a MetricData object for a given epoch.
- Parameters:
data (
MetricData) – Projected simulation data whosesimlistis searched.epoch (
int) – The epoch number to select.
- Returns:
idx – Integer array of simulation indexes in
data.simlistthat belong to the requested epoch.- Return type:
- htmd.adaptive.util.getEpochTrajectoryDictionary(simlist)#
Build a mapping from epoch number to simulation indexes.
- htmd.adaptive.util.getParentSimIdxFrame(data, trajidx)#
Find the parent simulation index and frame for a given trajectory.
For a simulation that was spawned from a parent trajectory, returns the index of the parent simulation within
data.simlistand the frame index within that parent simulation.- Parameters:
data (
MetricData) – Projected simulation data containing the simlist to search.trajidx (
int) – Index of the simulation indata.simlistfor which to find the parent.
- Return type:
- Returns:
- htmd.adaptive.util.updatingMean(oldmean, oldcount, newdata)#
Compute a running mean incorporating new observations.