spectre.Visualization.PlotTrajectories

Functions

import_A_and_B(filenames[, ...])

Read and align horizon centers from reduction files in segment order.

plot_trajectory(AhA, AhB[, fig])

Plot concatenated trajectories in inspiral simulation.

spectre.Visualization.PlotTrajectories.import_A_and_B(filenames, subfile_name_aha='ApparentHorizons/ObservationAhA_Centers.dat', subfile_name_ahb='ApparentHorizons/ObservationAhB_Centers.dat')

Read and align horizon centers from reduction files in segment order.

Samples are sorted by time, keeping the last occurrence of duplicate times. Only common times are returned, with roundoff differences of up to eight machine epsilons times max(1, abs(time)) allowed. Matches must be unique and differ by no more than one percent of the local sampling interval. Both returned arrays use A’s times; no interpolation is done.

spectre.Visualization.PlotTrajectories.plot_trajectory(AhA: ndarray, AhB: ndarray, fig=None)

Plot concatenated trajectories in inspiral simulation.

Outputs a 2x2 figure with 4 plots: 1st row: A and B trajectories in 3D, coordinate separation in 3D 2nd row: A and B trajectories in 2D xy plane, coordinate separation in 2D xy plane. The 3D plots use a subsampled version of the data, with default value of 15, to speed up the plots and avoid memory error.

Arguments: AhA: Array of shape (num_points, 4) with the time and coordinates of

the first object.

AhB: Array of shape (num_points, 4) with the time and coordinates of

the second object.

fig: Matplotlib figure object used for plotting. Subplots will be added to

this figure. If None, a new figure will be created.