physped.visualization package¶
Submodules¶
physped.visualization.force_field module¶
physped.visualization.plot_discrete_grid module¶
physped.visualization.plot_fields module¶
- physped.visualization.plot_fields.calculate_offsets(hist, axis: Tuple = (2, 3, 4))[source]¶
Calculate offsets.
- physped.visualization.plot_fields.create_force_fields(grids: dict, sliced_histogram: ndarray) dict [source]¶
- physped.visualization.plot_fields.infer_bounds_from_data(data: ndarray) tuple [source]¶
Infer bounds from data.
- physped.visualization.plot_fields.plot_colorbar(ax: Axes, cs: QuadContourSet, label: str) Axes [source]¶
Plot the colorbar.
- physped.visualization.plot_fields.plot_contourf_offset_field(ax: Axes, fields: dict, cmap='YlOrRd', bounds: tuple = (0, 0.36)) Axes [source]¶
Plot the offset field.
- physped.visualization.plot_fields.plot_pcolormesh_offset_field(ax: Axes, fields: dict, cmap='YlOrRd', bounds: tuple = (0, 0.36)) Axes [source]¶
Plot the offset field.
physped.visualization.plot_histograms module¶
- physped.visualization.plot_histograms.compute_joint_kl_divergence(piecewise_potential: PiecewisePotential, simulated_paths: DataFrame) float [source]¶
- physped.visualization.plot_histograms.compute_joint_kl_divergence_with_volume(piecewise_potential: PiecewisePotential, simulated_paths: DataFrame) float [source]¶
- physped.visualization.plot_histograms.create_all_histograms(recorded_paths: DataFrame, simulated_paths: DataFrame, config: dict)[source]¶
- physped.visualization.plot_histograms.create_histogram(values: Series, bins: ndarray) dict [source]¶
Create a histogram of the input values.
Paramters: - values (pd.Series): A Pandas Series containing the values to bin. - bins (np.ndarray): An array of bin edges.
Returns: - dict: A dictionary containing the bin edges, bin width, bin centers, counts, and PDF of the histogram.
- physped.visualization.plot_histograms.plot_histogram(ax: Axes, histograms: Dict[str, Any], observable: str, hist_type: str, config: dict) Axes [source]¶
Plot a histogram.
Parameters: - ax (plt.Axes): The axes to plot the histogram on. - histograms (Dict[str, Any]): The histograms to plot. - observable (str): The observable to plot the histogram for. - hist_type (str): The type of histogram to plot. - kl_div (float): The KL divergence value for the histogram.
Returns: - The axes object.
- physped.visualization.plot_histograms.plot_multiple_histograms(observables: List, histograms: dict, histogram_type: str, config: dict)[source]¶
Plot histograms for all observables.
Parameters: - ax (plt.Axes): The axes to plot the histogram on. - histograms (dict): The histograms to plot. - observable (str): The observable to plot the histogram for. - hist_type (str): The type of histogram to plot. - kl_div (float): The KL divergence value for the histogram.
Returns: - The axes object.
physped.visualization.plot_learn_piece_of_potential module¶
- physped.visualization.plot_learn_piece_of_potential.learn_piece_of_potential_plot(config: dict, preprocessed_trajectories: DataFrame, piecewise_potential: PiecewisePotential)[source]¶
physped.visualization.plot_potential_at_slow_index module¶
- physped.visualization.plot_potential_at_slow_index.plot_potential_at_slow_index(config: DictConfig, slow_indices: List, piecewise_potential: PiecewisePotential)[source]¶
physped.visualization.plot_trajectories module¶
Plot trajectories of particles in the metaforum dataset.
- physped.visualization.plot_trajectories.plot_intended_path(ax: Axes, traj_plot_params: dict) Axes [source]¶
- physped.visualization.plot_trajectories.plot_position_trajectories_in_cartesian_coordinates(ax: Axes, df: DataFrame, alpha: float = 1.0, traj_type: str = 'f') Axes [source]¶
Plot the trajectories of pedestrians in cartesian coordinates.
Parameters: - ax (plt.Axes): The matplotlib Axes object to plot on. - df (pd.DataFrame): The DataFrame containing the particle data.
Returns: - ax (plt.Axes): The modified matplotlib Axes object.
- physped.visualization.plot_trajectories.plot_trajectories(trajs: DataFrame, config: dict, trajectory_type: str = None, traj_type='f')[source]¶
Plot trajectories of pedestrians.
- physped.visualization.plot_trajectories.plot_velocity_trajectories_in_cartesian_coordinates(ax: Axes, df: DataFrame) Axes [source]¶
Plot the trajectories of particles in the metaforum dataset.
physped.visualization.plot_utils module¶
- physped.visualization.plot_utils.apply_polar_plot_style(ax: Axes, params: DictConfig) Axes [source]¶
Applies a polar plot style to the given axes object.
Parameters: - ax: The axes object to apply the polar plot style to. - params: A dictionary containing parameters for customizing the plot style.
Returns: - The modified axes object.
- physped.visualization.plot_utils.apply_xy_plot_style(ax: Axes, params: DictConfig) Axes [source]¶
Apply XY plot style to the given Axes object.
- Parameters:
ax (plt.Axes) – The Axes object to apply the style to.
params (dict) – A dictionary containing the plot parameters.
- Returns:
The modified Axes object.
- Return type:
plt.Axes
- physped.visualization.plot_utils.highlight_grid_box(ax: Axes, limits: Tuple, c: str = 'k') Axes [source]¶
Highlight the selected grid box.
- Parameters:
ax (plt.Axes) – The matplotlib Axes object to plot on.
limits (Tuple) – The limits of the grid box as a tuple (xlims, ylims).
c (str) – The color of the highlight box. Default is “k” (black).
- Returns:
The modified matplotlib Axes object.
- Return type:
plt.Axes
- physped.visualization.plot_utils.highlight_position_selection(ax: Axes, params: DictConfig) Axes [source]¶
- physped.visualization.plot_utils.highlight_velocity_selection(ax: Axes, params: DictConfig) Axes [source]¶
- physped.visualization.plot_utils.plot_cartesian_spatial_grid(ax: Axes, grid_params: DictConfig, alpha: float = 0.8) Axes [source]¶
- physped.visualization.plot_utils.plot_polar_labels(ax: Axes, grid_params: DictConfig) Axes [source]¶
- physped.visualization.plot_utils.plot_polar_velocity_grid(ax: Axes, grid_params: DictConfig) Axes [source]¶
- physped.visualization.plot_utils.plot_station_background(ax: Axes, config: DictConfig) Axes [source]¶
Plot the background image of the station.
- Parameters:
ax (plt.Axes) – The matplotlib Axes object to plot on.
params (dict) – A dictionary containing the parameters for plotting.
- Returns:
The modified matplotlib Axes object.
- Return type:
plt.Axes