processing_components/griddata/gridding.py
def grid_weight_to_griddata(vis, griddata, cf):
    """Grid Visibility weight onto a GridData

    :param vis: Visibility to be gridded
    :param griddata: GridData
    :param kwargs:
    :return: GridData
    """
    assert isinstance(vis, Visibility), vis
    
    nchan, npol, nz, ny, nx = griddata.shape
    sumwt = numpy.zeros([nchan, npol])
    pu_grid, pu_offset, pv_grid, pv_offset, pwg_grid, pwg_fraction, pwc_grid, pwc_fraction, pfreq_grid = \
        convolution_mapping(vis, griddata, cf)
    _, _, _, _, _, gv, gu = cf.shape
    coords = zip(vis.imaging_weight, pfreq_grid, pu_grid, pv_grid, pwg_grid)
    griddata.data[...] = 0.0
    
    for vwt, chan, xx, yy, zzg in coords:
        griddata.data[chan, :, zzg, yy, xx] += vwt
        sumwt[chan, :] += vwt
    
    return griddata, sumwt
Grid Visibility weight onto a GridData

    :param vis: Visibility to be gridded
    :param griddata: GridData
    :param kwargs:
    :return: GridData
    
Grid Visibility weight onto a GridData
Grid Visibility weight onto a GridData
def grid_weight_to_griddata(vis, griddata, cf):
    assert isinstance(vis, Visibility), vis
    nchan, npol, nz, ny, nx = griddata.shape
    sumwt = numpy.zeros([nchan, npol])
    pu_grid, pu_offset, pv_grid, pv_offset, pwg_grid, pwg_fraction, pwc_grid, pwc_fraction, pfreq_grid = \
        convolution_mapping(vis, griddata, cf)
    _, _, _, _, _, gv, gu = cf.shape
    coords = zip(vis.imaging_weight, pfreq_grid, pu_grid, pv_grid, pwg_grid)
    griddata.data[...] = 0.0
    for vwt, chan, xx, yy, zzg in coords:
        griddata.data[chan, :, zzg, yy, xx] += vwt
        sumwt[chan, :] += vwt
    return griddata, sumwt
def grid_weight_to_griddata ( vis , griddata , cf ) : assert isinstance ( vis , Visibility ) , vis nchan , npol , nz , ny , nx = griddata . shape sumwt = numpy . zeros ( [ nchan , npol ] ) pu_grid , pu_offset , pv_grid , pv_offset , pwg_grid , pwg_fraction , pwc_grid , pwc_fraction , pfreq_grid = convolution_mapping ( vis , griddata , cf ) _ , _ , _ , _ , _ , gv , gu = cf . shape coords = zip ( vis . imaging_weight , pfreq_grid , pu_grid , pv_grid , pwg_grid ) griddata . data [ ... ] = 0.0 for vwt , chan , xx , yy , zzg in coords : griddata . data [ chan , : , zzg , yy , xx ] += vwt sumwt [ chan , : ] += vwt return griddata , sumwt
Grid Visibility weight onto a GridData
Grid Visibility weight onto a GridData
"""Grid Visibility weight onto a GridData

    :param vis: Visibility to be gridded
    :param griddata: GridData
    :param kwargs:
    :return: GridData
    """
None
vis
Visibility to be gridded
Visibility to be gridded
griddata
None
cf
kwargs
None