Gridding and Degridding¶
This section contains routines for
- Gridding complex visibilities onto an image.
- Degridding complex visibilities from an image.
Nifty¶
Dask wrappers around Nifty’s Gridder.
Dask¶
grid_config([nx, ny, eps, cell_size_x, …]) |
Returns a wrapper around a NIFTY GridderConfiguration object. |
grid(vis, uvw, flags, weights, frequencies, …) |
Grids the supplied visibilities in parallel. |
dirty(grid, grid_config) |
Computes the dirty image from gridded visibilities and the gridding configuration. |
degrid(grid, uvw, flags, weights, …[, …]) |
Degrids the visibilities from the supplied grid in parallel. |
model(image, grid_config) |
Computes model visibilities from an image and a gridding configuration. |
-
africanus.gridding.nifty.dask.grid_config(nx=1024, ny=1024, eps=2e-13, cell_size_x=2.0, cell_size_y=2.0)[source]¶ Returns a wrapper around a NIFTY GridderConfiguration object.
Parameters: nx : int, optional
Number of X pixels in the grid. Defaults to 1024.
ny : int, optional
Number of Y pixels in the grid. Defaults to 1024.
cell_size_x : float, optional
Cell size of the X pixel in arcseconds. Defaults to 2.0.
cell_size_y : float, optional
Cell size of the Y pixel in arcseconds. Defaults to 2.0.
eps : float
Gridder accuracy error. Defaults to 2e-13
Returns: grid_config :
GridderConfigWrapperThe NIFTY Gridder Configuration
-
africanus.gridding.nifty.dask.grid(vis, uvw, flags, weights, frequencies, grid_config, wmin=-1e+30, wmax=1e+30, streams=None)[source]¶ Grids the supplied visibilities in parallel. Note that a grid is create for each visibility chunk.
Parameters: vis :
dask.array.Arrayvisibilities of shape
(row, chan, corr)uvw :
dask.array.Arrayuvw coordinates of shape
(row, 3)flags :
dask.array.Arrayflags of shape
(row, chan, corr)weights :
dask.array.Arrayweights of shape
(row, chan, corr).frequencies :
dask.array.Arrayfrequencies of shape
(chan,)grid_config :
GridderConfigWrapperGridding Configuration
wmin : float
Minimum W coordinate to grid. Defaults to -1e30.
wmax : float
Maximum W coordinate to grid. Default to 1e30.
streams : int, optional
Number of parallel gridding operations. Default to None, in which case as many grids as visibility chunks will be created.
Returns: grid :
dask.array.Arraygrid of shape
(ny, nx, corr)
-
africanus.gridding.nifty.dask.dirty(grid, grid_config)[source]¶ Computes the dirty image from gridded visibilities and the gridding configuration.
Parameters: grid :
dask.array.ArrayGridded visibilities of shape
(nv, nu, ncorr)grid_config :
GridderConfigWrapperGridding configuration
Returns: dirty :
dask.array.Arraydirty image of shape
(ny, nx, corr)
-
africanus.gridding.nifty.dask.degrid(grid, uvw, flags, weights, frequencies, grid_config, wmin=-1e+30, wmax=1e+30)[source]¶ Degrids the visibilities from the supplied grid in parallel.
Parameters: grid :
dask.array.Arraygridded visibilities of shape
(ny, nx, corr)uvw :
dask.array.Arrayuvw coordinates of shape
(row, 3)flags :
dask.array.Arrayflags of shape
(row, chan, corr)weights :
dask.array.Arrayweights of shape
(row, chan, corr). Currently unsupported and ignored.frequencies :
dask.array.Arrayfrequencies of shape
(chan,)grid_config :
GridderConfigWrapperGridding Configuration
wmin : float
Minimum W coordinate to grid. Defaults to -1e30.
wmax : float
Maximum W coordinate to grid. Default to 1e30.
Returns: grid :
dask.array.Arraygrid of shape
(ny, nx, corr)
-
africanus.gridding.nifty.dask.model(image, grid_config)[source]¶ Computes model visibilities from an image and a gridding configuration.
Parameters: image :
dask.array.ArrayImage of shape
(ny, nx, corr).grid_config :
GridderConfigWrappernifty gridding configuration object
Returns: model_vis :
dask.array.ArrayModel visibilities of shape
(nu, nv, corr).
wgridder¶
Wrappers around ‘ducc.wgridder <https://gitlab.mpcdf.mpg.de/mtr/ducc>`_.
Numpy¶
dirty(uvw, freq, vis, freq_bin_idx, …[, …]) |
Compute visibility to image mapping using ducc gridder i.e. |
model(uvw, freq, image, freq_bin_idx, …[, …]) |
Compute image to visibility mapping using ducc degridder i.e. |
residual(uvw, freq, image, vis, …[, …]) |
Compute residual image given a model and visibilities using ducc degridder i.e. |
hessian(uvw, freq, image, freq_bin_idx, …) |
Compute action of Hessian on an image using ducc |
-
africanus.gridding.wgridder.dirty(uvw, freq, vis, freq_bin_idx, freq_bin_counts, nx, ny, cell, weights=None, flag=None, celly=None, epsilon=1e-05, nthreads=1, do_wstacking=True, double_accum=False)[source]¶ Compute visibility to image mapping using ducc gridder i.e.
\[I^D = R^\dagger \Sigma^{-1} V\]where \(R^\dagger\) is an implicit gridding operator, \(V\) denotes visibilities of shape
(row, chan)and \(I^D\) is the dirty image of shape(band, nx, ny).The number of imaging bands
(band)must be less than or equal to the number of channels(chan)at which the data were obtained. The mapping from(chan)to(band)is described byfreq_bin_idxandfreq_bin_countsas described below.Note that, if self adjoint gridding and degridding operators are required then
weightsshould be the square root of what is typically referred to as imaging weights and should also be passed into the degridder. In this case, the data needs to be pre-whitened.Parameters: uvw :
numpy.ndarrayuvw coordinates at which visibilities were obtained with shape
(row, 3).freq :
numpy.ndarrayObservational frequencies of shape
(chan,).vis :
numpy.ndarrayVisibilities of shape
(row,chan).freq_bin_idx :
numpy.ndarrayStarting indices of frequency bins for each imaging band of shape
(band,).freq_bin_counts :
numpy.ndarrayThe number of channels in each imaging band of shape
(band,).cell : float
The cell size of a pixel along the \(x\) direction in radians.
weights :
numpy.ndarray, optionalImaging weights of shape
(row, chan).flag: :class:`numpy.ndarray`, optional
Flags of shape
(row,chan). Will only process visibilities for which flag!=0celly : float, optional
The cell size of a pixel along the \(y\) direction in radians. By default same as cell size along \(x\) direction.
epsilon : float, optional
The precision of the gridder with respect to the direct Fourier transform. By deafult, this is set to
1e-5for single precision and1e-7for double precision.nthreads : int, optional
The number of threads to use. Defaults to one. If set to zero will use all available cores.
do_wstacking : bool, optional
Whether to correct for the w-term or not. Defaults to True
double_accum : bool, optional
If true ducc will accumulate in double precision regardless of the input type.
Returns: model :
numpy.ndarrayDirty image corresponding to visibilities of shape
(nband, nx, ny).
-
africanus.gridding.wgridder.model(uvw, freq, image, freq_bin_idx, freq_bin_counts, cell, weights=None, flag=None, celly=None, epsilon=1e-05, nthreads=1, do_wstacking=True)[source]¶ Compute image to visibility mapping using ducc degridder i.e.
\[V = Rx\]where \(R\) is an implicit degridding operator, \(V\) denotes visibilities of shape
(row, chan)and \(x\) is the image of shape(band, nx, ny).The number of imaging bands
(band)has to be less than or equal to the number of channels(chan)at which the data were obtained. The mapping from(chan)to(band)is described byfreq_bin_idxandfreq_bin_countsas described below.There is an option to provide weights during degridding to cater for self adjoint gridding and degridding operators. In this case
weightsshould actually be the square root of what is typically referred to as imaging weights. In this case the degridder computes the whitened model visibilities i.e.\[V = \Sigma^{-\frac{1}{2}} R x\]where \(\Sigma\) refers to the inverse of the weights (i.e. the data covariance matrix when using natural weighting).
Parameters: uvw :
numpy.ndarrayuvw coordinates at which visibilities were obtained with shape
(row, 3).freq :
numpy.ndarrayObservational frequencies of shape
(chan,).model :
numpy.ndarrayModel image to degrid of shape
(nband, nx, ny).freq_bin_idx :
numpy.ndarrayStarting indices of frequency bins for each imaging band of shape
(band,).freq_bin_counts :
numpy.ndarrayThe number of channels in each imaging band of shape
(band,).cell : float
The cell size of a pixel along the \(x\) direction in radians.
weights :
numpy.ndarray, optionalImaging weights of shape
(row, chan).flag: :class:`numpy.ndarray`, optional
Flags of shape
(row,chan). Will only process visibilities for which flag!=0celly : float, optional
The cell size of a pixel along the \(y\) direction in radians. By default same as cell size along \(x\) direction.
epsilon : float, optional
The precision of the gridder with respect to the direct Fourier transform. By deafult, this is set to
1e-5for single precision and1e-7for double precision.nthreads : int, optional
The number of threads to use. Defaults to one. If set to zero will use all available cores.
do_wstacking : bool, optional
Whether to correct for the w-term or not. Defaults to True
Returns: vis :
numpy.ndarrayVisibilities corresponding to
modelof shape(row,chan).
-
africanus.gridding.wgridder.residual(uvw, freq, image, vis, freq_bin_idx, freq_bin_counts, cell, weights=None, flag=None, celly=None, epsilon=1e-05, nthreads=1, do_wstacking=True, double_accum=False)[source]¶ Compute residual image given a model and visibilities using ducc degridder i.e.
\[I^R = R^\dagger \Sigma^{-1}(V - Rx)\]where \(R\) is an implicit degridding operator, \(V\) denotes visibilities of shape
(row, chan)and \(x\) is the image of shape(band, nx, ny).The number of imaging bands
(band)must be less than or equal to the number of channels(chan)at which the data were obtained. The mapping from(chan)to(band)is described byfreq_bin_idxandfreq_bin_countsas described below.Note that, if the gridding and degridding operators both apply the square root of the imaging weights then the visibilities that are passed in should be pre-whitened. In this case the function computes
\[I^R = R^\dagger \Sigma^{-\frac{1}{2}}(\tilde{V} - \Sigma^{-\frac{1}{2}}Rx)\]which is identical to the above expression if \(\tilde{V} = \Sigma^{-\frac{1}{2}}V\).
Parameters: uvw :
numpy.ndarrayuvw coordinates at which visibilities were obtained with shape
(row, 3).freq :
numpy.ndarrayObservational frequencies of shape
(chan,).model :
numpy.ndarrayModel image to degrid of shape
(band, nx, ny).vis :
numpy.ndarrayVisibilities of shape
(row,chan).weights :
numpy.ndarrayImaging weights of shape
(row, chan).freq_bin_idx :
numpy.ndarrayStarting indices of frequency bins for each imaging band of shape
(band,).freq_bin_counts :
numpy.ndarrayThe number of channels in each imaging band of shape
(band,).cell : float
The cell size of a pixel along the \(x\) direction in radians.
flag: :class:`numpy.ndarray`, optional
Flags of shape
(row,chan). Will only process visibilities for which flag!=0celly : float, optional
The cell size of a pixel along the \(y\) direction in radians. By default same as cell size along \(x\) direction.
nu : int, optional
The number of pixels in the padded grid along the \(x\) direction. Chosen automatically by default.
nv : int, optional
The number of pixels in the padded grid along the \(y\) direction. Chosen automatically by default.
epsilon : float, optional
The precision of the gridder with respect to the direct Fourier transform. By deafult, this is set to
1e-5for single precision and1e-7for double precision.nthreads : int, optional
The number of threads to use. Defaults to one.
do_wstacking : bool, optional
Whether to correct for the w-term or not. Defaults to True
double_accum : bool, optional
If true ducc will accumulate in double precision regardless of the input type.
Returns: residual :
numpy.ndarrayResidual image corresponding to
modelof shape(band, nx, ny).
-
africanus.gridding.wgridder.hessian(uvw, freq, image, freq_bin_idx, freq_bin_counts, cell, weights=None, flag=None, celly=None, epsilon=1e-05, nthreads=1, do_wstacking=True, double_accum=False)[source]¶ Compute action of Hessian on an image using ducc
\[R^\dagger \Sigma^{-1} R x\]where \(R\) is an implicit degridding operator and \(x\) is the image of shape
(band, nx, ny).The number of imaging bands
(band)must be less than or equal to the number of channels(chan)at which the data were obtained. The mapping from(chan)to(band)is described byfreq_bin_idxandfreq_bin_countsas described below.Parameters: uvw :
numpy.ndarrayuvw coordinates at which visibilities were obtained with shape
(row, 3).freq :
numpy.ndarrayObservational frequencies of shape
(chan,).model :
numpy.ndarrayModel image to degrid of shape
(band, nx, ny).weights :
numpy.ndarrayImaging weights of shape
(row, chan).freq_bin_idx :
numpy.ndarrayStarting indices of frequency bins for each imaging band of shape
(band,).freq_bin_counts :
numpy.ndarrayThe number of channels in each imaging band of shape
(band,).cell : float
The cell size of a pixel along the \(x\) direction in radians.
flag: :class:`numpy.ndarray`, optional
Flags of shape
(row,chan). Will only process visibilities for which flag!=0celly : float, optional
The cell size of a pixel along the \(y\) direction in radians. By default same as cell size along \(x\) direction.
nu : int, optional
The number of pixels in the padded grid along the \(x\) direction. Chosen automatically by default.
nv : int, optional
The number of pixels in the padded grid along the \(y\) direction. Chosen automatically by default.
epsilon : float, optional
The precision of the gridder with respect to the direct Fourier transform. By deafult, this is set to
1e-5for single precision and1e-7for double precision.nthreads : int, optional
The number of threads to use. Defaults to one.
do_wstacking : bool, optional
Whether to correct for the w-term or not. Defaults to True
double_accum : bool, optional
If true ducc will accumulate in double precision regardless of the input type.
Returns: residual :
numpy.ndarrayResidual image corresponding to
modelof shape(band, nx, ny).
Dask¶
dirty(uvw, freq, vis, freq_bin_idx, …[, …]) |
Compute visibility to image mapping using ducc gridder i.e. |
model(uvw, freq, image, freq_bin_idx, …[, …]) |
Compute image to visibility mapping using ducc degridder i.e. |
residual(uvw, freq, image, vis, …[, …]) |
Compute residual image given a model and visibilities using ducc degridder i.e. |
hessian(uvw, freq, image, freq_bin_idx, …) |
Compute action of Hessian on an image using ducc |
-
africanus.gridding.wgridder.dask.dirty(uvw, freq, vis, freq_bin_idx, freq_bin_counts, nx, ny, cell, weights=None, flag=None, celly=None, epsilon=1e-05, nthreads=1, do_wstacking=True, double_accum=False)[source]¶ Compute visibility to image mapping using ducc gridder i.e.
\[I^D = R^\dagger \Sigma^{-1} V\]where \(R^\dagger\) is an implicit gridding operator, \(V\) denotes visibilities of shape
(row, chan)and \(I^D\) is the dirty image of shape(band, nx, ny).The number of imaging bands
(band)must be less than or equal to the number of channels(chan)at which the data were obtained. The mapping from(chan)to(band)is described byfreq_bin_idxandfreq_bin_countsas described below.Note that, if self adjoint gridding and degridding operators are required then
weightsshould be the square root of what is typically referred to as imaging weights and should also be passed into the degridder. In this case, the data needs to be pre-whitened.Parameters: uvw :
dask.array.Arrayuvw coordinates at which visibilities were obtained with shape
(row, 3).freq :
dask.array.ArrayObservational frequencies of shape
(chan,).vis :
dask.array.ArrayVisibilities of shape
(row,chan).freq_bin_idx :
dask.array.ArrayStarting indices of frequency bins for each imaging band of shape
(band,).freq_bin_counts :
dask.array.ArrayThe number of channels in each imaging band of shape
(band,).cell : float
The cell size of a pixel along the \(x\) direction in radians.
weights :
dask.array.Array, optionalImaging weights of shape
(row, chan).flag: :class:`dask.array.Array`, optional
Flags of shape
(row,chan). Will only process visibilities for which flag!=0celly : float, optional
The cell size of a pixel along the \(y\) direction in radians. By default same as cell size along \(x\) direction.
epsilon : float, optional
The precision of the gridder with respect to the direct Fourier transform. By deafult, this is set to
1e-5for single precision and1e-7for double precision.nthreads : int, optional
The number of threads to use. Defaults to one. If set to zero will use all available cores.
do_wstacking : bool, optional
Whether to correct for the w-term or not. Defaults to True
double_accum : bool, optional
If true ducc will accumulate in double precision regardless of the input type.
Returns: model :
dask.array.ArrayDirty image corresponding to visibilities of shape
(nband, nx, ny).
-
africanus.gridding.wgridder.dask.model(uvw, freq, image, freq_bin_idx, freq_bin_counts, cell, weights=None, flag=None, celly=None, epsilon=1e-05, nthreads=1, do_wstacking=True)[source]¶ Compute image to visibility mapping using ducc degridder i.e.
\[V = Rx\]where \(R\) is an implicit degridding operator, \(V\) denotes visibilities of shape
(row, chan)and \(x\) is the image of shape(band, nx, ny).The number of imaging bands
(band)has to be less than or equal to the number of channels(chan)at which the data were obtained. The mapping from(chan)to(band)is described byfreq_bin_idxandfreq_bin_countsas described below.There is an option to provide weights during degridding to cater for self adjoint gridding and degridding operators. In this case
weightsshould actually be the square root of what is typically referred to as imaging weights. In this case the degridder computes the whitened model visibilities i.e.\[V = \Sigma^{-\frac{1}{2}} R x\]where \(\Sigma\) refers to the inverse of the weights (i.e. the data covariance matrix when using natural weighting).
Parameters: uvw :
dask.array.Arrayuvw coordinates at which visibilities were obtained with shape
(row, 3).freq :
dask.array.ArrayObservational frequencies of shape
(chan,).model :
dask.array.ArrayModel image to degrid of shape
(nband, nx, ny).freq_bin_idx :
dask.array.ArrayStarting indices of frequency bins for each imaging band of shape
(band,).freq_bin_counts :
dask.array.ArrayThe number of channels in each imaging band of shape
(band,).cell : float
The cell size of a pixel along the \(x\) direction in radians.
weights :
dask.array.Array, optionalImaging weights of shape
(row, chan).flag: :class:`dask.array.Array`, optional
Flags of shape
(row,chan). Will only process visibilities for which flag!=0celly : float, optional
The cell size of a pixel along the \(y\) direction in radians. By default same as cell size along \(x\) direction.
epsilon : float, optional
The precision of the gridder with respect to the direct Fourier transform. By deafult, this is set to
1e-5for single precision and1e-7for double precision.nthreads : int, optional
The number of threads to use. Defaults to one. If set to zero will use all available cores.
do_wstacking : bool, optional
Whether to correct for the w-term or not. Defaults to True
Returns: vis :
dask.array.ArrayVisibilities corresponding to
modelof shape(row,chan).
-
africanus.gridding.wgridder.dask.residual(uvw, freq, image, vis, freq_bin_idx, freq_bin_counts, cell, weights=None, flag=None, celly=None, epsilon=1e-05, nthreads=1, do_wstacking=True, double_accum=False)[source]¶ Compute residual image given a model and visibilities using ducc degridder i.e.
\[I^R = R^\dagger \Sigma^{-1}(V - Rx)\]where \(R\) is an implicit degridding operator, \(V\) denotes visibilities of shape
(row, chan)and \(x\) is the image of shape(band, nx, ny).The number of imaging bands
(band)must be less than or equal to the number of channels(chan)at which the data were obtained. The mapping from(chan)to(band)is described byfreq_bin_idxandfreq_bin_countsas described below.Note that, if the gridding and degridding operators both apply the square root of the imaging weights then the visibilities that are passed in should be pre-whitened. In this case the function computes
\[I^R = R^\dagger \Sigma^{-\frac{1}{2}}(\tilde{V} - \Sigma^{-\frac{1}{2}}Rx)\]which is identical to the above expression if \(\tilde{V} = \Sigma^{-\frac{1}{2}}V\).
Parameters: uvw :
dask.array.Arrayuvw coordinates at which visibilities were obtained with shape
(row, 3).freq :
dask.array.ArrayObservational frequencies of shape
(chan,).model :
dask.array.ArrayModel image to degrid of shape
(band, nx, ny).vis :
dask.array.ArrayVisibilities of shape
(row,chan).weights :
dask.array.ArrayImaging weights of shape
(row, chan).freq_bin_idx :
dask.array.ArrayStarting indices of frequency bins for each imaging band of shape
(band,).freq_bin_counts :
dask.array.ArrayThe number of channels in each imaging band of shape
(band,).cell : float
The cell size of a pixel along the \(x\) direction in radians.
flag: :class:`dask.array.Array`, optional
Flags of shape
(row,chan). Will only process visibilities for which flag!=0celly : float, optional
The cell size of a pixel along the \(y\) direction in radians. By default same as cell size along \(x\) direction.
nu : int, optional
The number of pixels in the padded grid along the \(x\) direction. Chosen automatically by default.
nv : int, optional
The number of pixels in the padded grid along the \(y\) direction. Chosen automatically by default.
epsilon : float, optional
The precision of the gridder with respect to the direct Fourier transform. By deafult, this is set to
1e-5for single precision and1e-7for double precision.nthreads : int, optional
The number of threads to use. Defaults to one.
do_wstacking : bool, optional
Whether to correct for the w-term or not. Defaults to True
double_accum : bool, optional
If true ducc will accumulate in double precision regardless of the input type.
Returns: residual :
dask.array.ArrayResidual image corresponding to
modelof shape(band, nx, ny).
-
africanus.gridding.wgridder.dask.hessian(uvw, freq, image, freq_bin_idx, freq_bin_counts, cell, weights=None, flag=None, celly=None, epsilon=1e-05, nthreads=1, do_wstacking=True, double_accum=False)[source]¶ Compute action of Hessian on an image using ducc
\[R^\dagger \Sigma^{-1} R x\]where \(R\) is an implicit degridding operator and \(x\) is the image of shape
(band, nx, ny).The number of imaging bands
(band)must be less than or equal to the number of channels(chan)at which the data were obtained. The mapping from(chan)to(band)is described byfreq_bin_idxandfreq_bin_countsas described below.Parameters: uvw :
dask.array.Arrayuvw coordinates at which visibilities were obtained with shape
(row, 3).freq :
dask.array.ArrayObservational frequencies of shape
(chan,).model :
dask.array.ArrayModel image to degrid of shape
(band, nx, ny).weights :
dask.array.ArrayImaging weights of shape
(row, chan).freq_bin_idx :
dask.array.ArrayStarting indices of frequency bins for each imaging band of shape
(band,).freq_bin_counts :
dask.array.ArrayThe number of channels in each imaging band of shape
(band,).cell : float
The cell size of a pixel along the \(x\) direction in radians.
flag: :class:`dask.array.Array`, optional
Flags of shape
(row,chan). Will only process visibilities for which flag!=0celly : float, optional
The cell size of a pixel along the \(y\) direction in radians. By default same as cell size along \(x\) direction.
nu : int, optional
The number of pixels in the padded grid along the \(x\) direction. Chosen automatically by default.
nv : int, optional
The number of pixels in the padded grid along the \(y\) direction. Chosen automatically by default.
epsilon : float, optional
The precision of the gridder with respect to the direct Fourier transform. By deafult, this is set to
1e-5for single precision and1e-7for double precision.nthreads : int, optional
The number of threads to use. Defaults to one.
do_wstacking : bool, optional
Whether to correct for the w-term or not. Defaults to True
double_accum : bool, optional
If true ducc will accumulate in double precision regardless of the input type.
Returns: residual :
dask.array.ArrayResidual image corresponding to
modelof shape(band, nx, ny).
Utilities¶
estimate_cell_size(u, v, wavelength[, …]) |
Estimate the cell size in arcseconds given baseline u and v coordinates, as well as the wavelengths, \(\lambda\). |
-
africanus.gridding.util.estimate_cell_size(u, v, wavelength, factor=3.0, ny=None, nx=None)[source]¶ Estimate the cell size in arcseconds given baseline
uandvcoordinates, as well as thewavelengths, \(\lambda\).The cell size is computed as:
\[ \begin{align}\begin{aligned}\Delta u = 1.0 / \left( 2 \times \text{ factor } \times \max (\vert u \vert) / \min( \lambda) \right)\\\Delta v = 1.0 / \left( 2 \times \text{ factor } \times \max (\vert v \vert) / \min( \lambda) \right)\end{aligned}\end{align} \]If
nyandnxare provided the following checks are performed and exceptions are raised on failure:\[ \begin{align}\begin{aligned}\Delta u * \text{ ny } \leq \min (\lambda) / \min (\vert u \vert)\\\Delta v * \text{ nx } \leq \min (\lambda) / \min (\vert v \vert)\end{aligned}\end{align} \]Parameters: u :
numpy.ndarrayor floatMaximum
ucoordinate in metres.v :
numpy.ndarrayor floatMaximum
vcoordinate in metres.wavelength :
numpy.ndarrayor floatWavelengths, in metres.
factor : float, optional
Scaling factor
ny : int, optional
Grid y dimension
nx : int, optional
Grid x dimension
Returns: Cell size of
uandvin arcseconds with shape(2,)Raises: ValueError
If the cell size criteria are not matched.