GWPlotter

Diagnostic plotting utilities for visualising remnant property evolution.

class gw_remnant.gw_utils.gw_plotter.GWPlotter(time, h_dict, q, chi1=None, chi2=None, e_ref=None, E_initial=None, L_initial=None, M_initial=1, use_filter=False)[source]

Bases: PeakLuminosityCalculator, LinearMomentumCalculator, RemnantMassCalculator

Diagnostic plotting utilities for gravitational wave remnant properties.

This class provides methods to visualize the time evolution of various physical quantities extracted from gravitational waveforms, including mass, energy, linear momentum, angular momentum, kick velocity, and the center-of-mass trajectory.

Inherits From:

PeakLuminosityCalculator: Provides energy flux calculations LinearMomentumCalculator: Provides linear momentum calculations RemnantMassCalculator: Provides mass and energy calculations

Parameters:
plot_mass_energy(save_path=None)[source]

Plot mass and energy evolution as a function of time.

Creates a 4-row, 2-column figure showing: - Top row: Real part of (2,2) mode waveform derivative - Second row: Energy flux (time derivative of energy) - Third row: Total energy as a function of time - Bottom row: Mass as a function of time

Each row is split into pre-merger (t <= -500M, 60% width) and post-merger (t > -500M, 40% width) regions for better visualization.

All quantities are plotted in geometric units where G=c=1. Time is in units of total mass M.

Parameters:

save_path (str | None) – If provided, save figure to this path.

Returns:

The figure object.

Return type:

Figure

plot_linear_momentum(save_path=None)[source]

Plot linear momentum components as a function of time.

Creates a 3-row, 2-column figure showing the x, y, and z components of the linear momentum vector. Each row is split into pre-merger (t <= -500M, 60% width) and post-merger (t > -500M, 40% width) regions for better visualization of different phases of the evolution.

The momentum components are in units of total mass M.

Parameters:

save_path (str | None) – If provided, save figure to this path.

Returns:

The figure object.

Return type:

Figure

plot_angular_momentum(save_path=None)[source]

Plot angular momentum components as a function of time.

Creates a 3-row, 2-column figure showing the x, y, and z components of the angular momentum vector. Each row is split into pre-merger (t <= -500M, 60% width) and post-merger (t > -500M, 40% width) regions for better visualization of different phases of the evolution.

The angular momentum components are in units of total mass squared M^2.

Parameters:

save_path (str | None) – If provided, save figure to this path.

Returns:

The figure object.

Return type:

Figure

plot_kick_velocity(save_path=None)[source]

Plot the magnitude of kick velocity as a function of time.

Creates a single-row, 2-column figure showing the time evolution of the recoil (kick) velocity magnitude imparted to the remnant black hole due to asymmetric gravitational wave emission. The plot is split into pre-merger (t <= -500M, 60% width) and post-merger (t > -500M, 40% width) regions.

Kick velocity is given in units of the speed of light c.

Parameters:

save_path (str | None) – If provided, save figure to this path.

Returns:

The figure object.

Return type:

Figure

plot_spin_vector(save_path=None)[source]

Plot dimensionless spin vector components as a function of time.

Creates a 3-row, 2-column figure showing the x, y, and z components of the dimensionless spin vector. Each row is split into pre-merger (t <= -500M, 60% width) and post-merger (t > -500M, 40% width) regions for better visualization of different phases of the evolution.

The spin components are dimensionless (chi = S/M^2).

Parameters:

save_path (str | None) – If provided, save figure to this path.

Returns:

The figure object.

Return type:

Figure

plot_trajectory(save_path=None)[source]

Plot the center-of-mass trajectory of the binary.

Creates a two-panel figure:

  • Left: the center-of-mass path projected onto the orbital (x-y) plane, with the start and final (remnant) points marked.

  • Right: the displacement magnitude as a function of time, split into pre-merger (t <= -500M) and post-merger (t > -500M) regions.

Positions are in units of total mass M (geometric units, G=c=1). See arXiv:1802.04276 and arXiv:1510.03386.

Parameters:

save_path (str | None) – If provided, save figure to this path.

Returns:

The figure object.

Return type:

Figure