dynsight.trajectory.Insight¶
- class dynsight.trajectory.Insight(dataset, meta=<factory>)[source]¶
Contains an analysis perfomed on a trajectory.
- dataset¶
The values of a some trajectory’s descriptor.
- Type:
NDArray[np.float64]
Methods
Save the Insight to a JSON file and .npy file.
Computes the angular displacement of a vectorial descriptor.
Perform onion clustering.
Perform the full onion time resolution analysis.
Perform smooth onion clustering.
Perform tICA on trajectories from a many-body system.
Self time correlation function of the time-series signal.
Load the Insight object from .json file.
Average the descriptor over the neighboring particles.
Attributes
- dump_to_json(file_path)[source]¶
Save the Insight to a JSON file and .npy file.
- Parameters:
file_path (Path)
- Return type:
None
- get_onion(delta_t, bins='auto', number_of_sigmas=2.0)[source]¶
Perform onion clustering.
The returned OnionInsight contains the following meta: delta_t, bins, number_of_sigma.
- Parameters:
- Return type:
- get_onion_analysis(delta_t_min=1, delta_t_max=None, delta_t_num=20, fig1_path=None, fig2_path=None, bins='auto', number_of_sigmas=3.0, max_area_overlap=0.8)[source]¶
Perform the full onion time resolution analysis.
Note: this method uses the “onion smooth” functions (see documentation for details).
- Parameters:
delta_t_min (int) – Smaller value for delta_t_list.
delta_t_max (int | None) – Larger value for delta_t_list.
delta_t_num (int) – Number of values in delta_t_list.
fig1_path (Path | None) – If is not None, the time resolution analysis plot is saved in this location.
fig2_path (Path | None) – If is not None, the populations fractions plot is saved in this location.
bins (str | int) – The ‘bins’ parameter for onion clustering.
number_of_sigmas (float) – The ‘number_of_sigmas’ parameter for onion clustering.
max_area_overlap (float) – The ‘max_area_overlap’ parameter for onion clustering.
- Returns:
delta_t_list: The list of ∆t used.
n_clust: The number of clusters at each ∆t.
unclass_frac: The fraction of unclassified data at each ∆t.
list_of_labels: Labels at each ∆t.
- Return type:
- get_onion_smooth(delta_t, bins='auto', number_of_sigmas=3.0, max_area_overlap=0.8)[source]¶
Perform smooth onion clustering.
The returned OnionInsight contains the following meta: delta_t, bins, number_of_sigma, max_area_overlap.
- get_tica(lag_time, tica_dim)[source]¶
Perform tICA on trajectories from a many-body system.
The attributes “lag_time” and “tica_dim” are added to the meta.
- get_time_correlation(max_delay=None)[source]¶
Self time correlation function of the time-series signal.
- classmethod load_from_json(file_path, mmap_mode=None)[source]¶
Load the Insight object from .json file.
- Parameters:
file_path (Path) – Path to the .json file.
mmap_mode (Literal['r', 'r+', 'w+', 'c'] | None) – If given, used as np.load(…, mmap_mode=mmap_mode) for memory mapping.
- Raises:
ValueError – if required keys are missing.
- Return type: