rydiqule.doppler_utils.apply_doppler_weights

rydiqule.doppler_utils.apply_doppler_weights(sols: ndarray, velocities: ndarray, volumes: ndarray) ndarray[source]

Calculates and applies the weight for each doppler class given unweighted solutions to doppler-shifted equations.

Works for both time-domain and stead-state solutions.

Parameters:
  • sols (numpy.ndarray) – The array of solutions over which to calculate weights.

  • velocities (numpy.ndarray) – Array of shape (n_dim, *n_dop) where n_dim is the number of dimensions over which doppler shifts are being considered and *n_dop is a number of axes equal to n_dim with length equal to the number of doppler velocity classes which are being considered. The values correspond the velocity class in units of most probable speed.

  • volumes (numpy.ndarray) – Array of shape equal to velocities. The values correspond to the spacings between doppler classes on each axis.

Returns:

The weighted solution array of shape equal to that of sols.

Return type:

numpy.ndarray

Raises:

RydiquleError – If the shapes of velocities and volumes do not match.