Models

class buoy.models.base.BuoyModel[source]

Bases: object

Base class for Aframe and Amplfi models.

Provides a shared update_config implementation that updates attributes and re-runs preprocessing setup. Subclasses must implement configure_preprocessing.

update_config(**kwargs)[source]

Update configuration parameters and reconfigure preprocessing.

Warning: some changes may not be sensible given how the model was trained (e.g., kernel_length, sample_rate). Changing these parameters may lead to unexpected results.

Return type:

None

class buoy.models.aframe.AframeConfig(sample_rate, kernel_length, psd_length, fduration, highpass, fftlength, inference_sampling_rate, offline_sampling_rate, batch_size, aframe_right_pad, integration_window_length, lowpass=None)[source]

Bases: object

class buoy.models.aframe.Aframe(model_weights='aframe.pt', config='aframe_config.yaml', device=None, revision=None, load_weights=True, cache_dir=None)[source]

Bases: AframeConfig, BuoyModel

Aframe neural network model for gravitational wave detection.

Wraps a trained TorchScript model and its associated preprocessing pipeline. Config attributes (sample_rate, psd_length, etc.) are always loaded; neural network weights are only loaded when load_weights=True.

property time_offset: float

Estimate the time offset between the peak of the integrated outputs and the merger time of the signal

property minimum_data_size: int

The minimum length of data, in samples, required for the model to run with its current configuration

class buoy.models.amplfi.AmplfiConfig(architecture, parameter_sampler, sample_rate, kernel_length, inference_params, event_position, psd_length, fduration, fftlength, highpass, lowpass=None)[source]

Bases: object

class buoy.models.amplfi.Amplfi(model_weights='amplfi-hlv.ckpt', config='amplfi-hlv-config.yaml', device=None, revision=None, load_weights=True, cache_dir=None)[source]

Bases: AmplfiConfig, BuoyModel

AMPLFI normalizing-flow model for rapid gravitational wave parameter estimation.

Wraps a trained Lightning checkpoint and its associated preprocessing pipeline. Config attributes are always loaded; the flow weights are only loaded when load_weights=True.

property minimum_data_size: int

Minimum data size required for the model to run.