Mondaic

salvus.opt.data_normalizations.l2_energy_per_measurement

salvus.opt.data_normalizations.l2_energy_per_measurement salvus opt data_normalizations l2_energy_per_measurement

L2 energy per measurement data normalization and its jacobian.

Functions

forward_data_normalization_l2_energy_per_measurement()

def forward_data_normalization_l2_energy_per_measurement(
    data_array_synthetic: xr.DataArray, data_array_observed: T, event: Event
) -> tuple[xr.DataArray, T]: ...

Normalize data traces their L2 energy norm.

Parameters
  • data_array_synthetic xr.DataArray — The synthetic data traces without normalization.
  • data_array_observed T — The observed data traces without normalization.
  • event Event — The event.
Returns tuple[xr.DataArray, T]

jacobian_data_normalization_l2_energy_per_measurement()

def jacobian_data_normalization_l2_energy_per_measurement(
    data_array_adjoint_sources: xr.DataArray,
    data_array_synthetic: xr.DataArray,
    data_array_observed: xr.DataArray | None,
    event: Event,
) -> xr.DataArray: ...

Apply the jacobian of L2 energy normalization to the adjoint sources.

Parameters
  • data_array_adjoint_sources xr.DataArray — The adjoint sources.
  • data_array_synthetic xr.DataArray — The synthetic data traces without normalization.
  • data_array_observed xr.DataArray | None — The observed data traces without normalization.
  • event Event — The event.
Returns xr.DataArray

tracewise_forward_data_normalization_l2_energy_per_measurement()

def tracewise_forward_data_normalization_l2_energy_per_measurement(
    data_synthetic: npt.NDArray,
    data_observed: npt.NDArray | None,
    sampling_rate_in_hertz: float,
) -> tuple[npt.NDArray, npt.NDArray | None]: ...

Normalize a data trace by its L2 energy norm.

This is the per-trace version of forward_data_normalization_l2_energy_per_measurement().

Parameters
  • data_synthetic npt.NDArray — The synthetic data trace without normalization.
  • data_observed npt.NDArray | None — The observed data trace without normalization.
  • sampling_rate_in_hertz float — The sampling rate of both data traces in Hz.
Returns tuple[npt.NDArray, npt.NDArray | None]

tracewise_jacobian_data_normalization_l2_energy_per_measurement()

def tracewise_jacobian_data_normalization_l2_energy_per_measurement(
    adjoint_source: npt.NDArray,
    data_synthetic: npt.NDArray,
    data_observed: npt.NDArray | None,
    sampling_rate_in_hertz: float,
) -> npt.NDArray: ...

Apply the jacobian on L2 energy normalization to an adjoint source.

This is the per-trace version of jacobian_data_normalization_l2_energy_per_measurement().

Parameters
  • adjoint_source npt.NDArray — The adjoint source.
  • data_synthetic npt.NDArray — The synthetic data trace without normalization.
  • data_observed npt.NDArray | None — The observed data trace without normalization.
  • sampling_rate_in_hertz float — The sampling rate of the adjoint source and data in Hz.
Returns npt.NDArray