l and m components in the last dimension. frequency : :class:`numpy.ndarray` frequencies of shape :code:`(chan,)` dtype : np.dtype, optional Datatype of result. Should be either np.complex64 or np.complex128. If ``None``, :func:`numpy.result_type` is used to infer the data type from the inputs. """, returns=""" Returns ------- visibilties : :class:`numpy.ndarray` complex of shape :code:`(row, chan, corr)` """) im_to_vis.__doc__ = doc_tuple_to_str(im_to_vis_docs) vis_to_im_docs = _DFT_DOCSTRING( preamble=""" Computes visibility to image mapping of an ideal interferometer: .. math:: {\\Large \\sum_k e^{ 2 \\pi i (u_k l + v_k m + w_k (n - 1))} \\cdot V_k} """, # noqa parameters=""" Parameters ----------
""" Dask wrapper for vis_to_im function """ if vis.chunks[0] != uvw.chunks[0]: raise ValueError("Vis chunks and uvw chunks must " "match on first axis") if vis.chunks[1] != frequency.chunks[0]: raise ValueError("Vis chunks must match frequency " "chunks on second axis") if vis.chunks != flags.chunks: raise ValueError("Vis chunks must match flags " "chunks on all axes") ims = da.core.blockwise(_vis_to_im_wrapper, ("row", "source", "chan", "corr"), vis, ("row", "chan", "corr"), uvw, ("row", "(u,v,w)"), lm, ("source", "(l,m)"), frequency, ("chan", ), flags, ("row", "chan", "corr"), adjust_chunks={"row": 1}, dtype=dtype, dtype_=dtype) return ims.sum(axis=0) im_to_vis.__doc__ = doc_tuple_to_str( im_to_vis_docs, [(":class:`numpy.ndarray`", ":class:`dask.array.Array`")]) vis_to_im.__doc__ = doc_tuple_to_str( vis_to_im_docs, [(":class:`numpy.ndarray`", ":class:`dask.array.Array`")])