Full-sky volume visualizations for FastEMRIWaveforms (FEW) EMRI waveforms.
Fewview turns a FEW waveform into a spherical, retarded-time picture of the
gravitational wave. The fully relativistic FastKerrEccentricEquatorialFlux
modes are reconstructed into h_lm(t), combined with spin-weighted spherical
harmonics over the whole sky, and evaluated at u = t_frame - r / c throughout
a sphere, so a still or movie shows the wave propagating outward from the
source.
A few stills produced with Fewview, across colour palettes and camera views.
magma, oblique |
rainbow, oblique |
cool, face-on |
plasma, oblique |
plasma, face-on |
magma, face-on |
Fewview reads FEW models directly, so install it into the same environment as your existing FastEMRIWaveforms installation:
pip install -e .few is expected to already be importable; it is not installed as a dependency
so that Fewview does not disturb a working FEW build.
- Tutorial — render a still and a movie, step by step
(executable version:
examples/tutorial.ipynb) - Cluster rendering — distributed movies on Slurm
import numpy as np
from fewview import (
generate_relativistic_mode_waveform,
choose_max_delay,
render_mode_frame,
)
wf = generate_relativistic_mode_waveform(
M=1e6, mu=10.0, a=0.9, p0=12.0, e0=0.4, xI0=1.0,
dt=10.0, T=0.01, lmax=10, nmax=55,
)
ref = wf.strain(theta=np.pi / 3.0, phi=0.0)
max_delay = choose_max_delay(wf.time, np.real(ref), -np.imag(ref))
render_mode_frame(
wf,
screenshot="emri.png",
max_delay=max_delay,
frame_time=wf.time[-1],
waveform_start_time=wf.time[0],
waveform_end_time=wf.time[-1],
component="plus",
opacity_profile="shells",
color_scheme="rainbow",
)For a movie, use render_mode_animation with the same arguments plus a
start_time/end_time range and frames/fps.
Three knobs control the look.
Component — what scalar field is rendered:
component |
meaning | notes |
|---|---|---|
plus |
plus polarization | no equatorial node; the usual choice |
cross |
cross polarization | zero on the equatorial plane by symmetry |
amplitude |
|h| | basis-independent, smooth everywhere |
energy_flux |
|dh/dt|² | pair with the flux opacity profile |
Opacity profile — how values map to transparency: soft (broad fronts,
the default), bands (symmetric levels), shells (nested translucent
signed-strain sheets; needs plus/cross), flux (log-compressed energy
flux; needs energy_flux).
Colour scheme — any Matplotlib colormap (magma, viridis, plasma,
inferno, cividis, cool, blues) plus three tuned palettes: rainbow,
aurora, cinematic. fewview.colormaps.available_color_schemes() lists
them all.
The public API is re-exported from the top-level fewview package and grouped
into topical submodules:
fewview.waveform—generate_relativistic_mode_waveform,RelativisticModeWaveform,estimate_waveform_period,choose_max_delay,polarizations_from_complexfewview.volume—build_mode_retarded_time_volume,RetardedTimeVolume,to_pyvista,save_volumefewview.rendering—render_volume,render_mode_frame,render_mode_animationfewview.surface—StrainSurface,build_strain_surface,plot_strain_surfacefewview.plotting—plot_volume_slicefewview.colormaps— palette and profile listings
Installing the package provides console scripts:
| command | purpose |
|---|---|
fewview-render |
render a single still from waveform parameters |
fewview-animate |
render a movie from a saved relativistic-modes.npz |
fewview-cluster-job |
generate a Slurm array job for a cluster render |
fewview-cluster-segment |
render one segment of a distributed movie |
fewview-cluster-merge |
concatenate rendered segments into the final movie |
See docs/cluster_rendering.md for the cluster
workflow.
- The polar axis carries an unavoidable seam: a spin-2 field cannot be
combed continuously over the poles, so any scalar rendering of
plus/crossis multivalued there. It is faint in oblique views and washes out under smoothing, but it is inherent to the representation, not a bug. - The amplitude model is capped at
nmax=55. Requesting a largernmaxemits a warning and uses the model's trained set; at high eccentricity the render will therefore be missing some high-overtone content.
Fewview's volume-rendering approach is inspired by two codes that pioneered this style of visualization for numerical relativity simulations:
- gwpv by Nils Vu, a ParaView-based renderer for gravitational waves from numerical relativity.
- ROSE, which renders the radiated field of numerical relativity simulations as an outgoing volume.
Fewview adapts that idea to the mode-resolved EMRI waveforms produced by FastEMRIWaveforms.
MIT. See LICENSE.