rydiqule.doppler_utils.doppler_mesh¶
- rydiqule.doppler_utils.doppler_mesh(doppler_velocities: ndarray, spatial_dim: int) Tuple[ndarray, ndarray] [source]¶
Creates meshgrids of evaluation points and point “volumes” for doppler averaging.
- Parameters:
dop_velocities (numpy.ndarray) – A 1-D array of velocities to evaluate over. These should be normalized to the most probable velocity used by
gaussian3d()
.spatial_dim (int) – Number of spatial dimensions to grid over.
- Returns:
Vs (numpy.ndarray) – Velocity evaluation points array of shape
(spatial_dim,spatial_dim*[len(dop_vel)])
.Vols (numpy.ndarray) – “Volume” of each meshpoint. Has same shape as
Vs
.
Examples
>>> m = {"method":"uniform", "n_uniform":801} >>> classes = rq.doppler_utils.doppler_classes(method=m) >>> mesh, vols = rq.doppler_utils.doppler_mesh(classes, 2) >>> print(type(mesh), type(vols)) <class 'numpy.ndarray'> <class 'numpy.ndarray'> >>> mesh_np = np.array(mesh) >>> vols_np = np.array(vols) >>> print(mesh_np.shape, vols_np.shape) (2, 801, 801) (2, 801, 801)