processing_components/imaging/base.py
def predict_2d(vis: Union[BlockVisibility, Visibility], model: Image, gcfcf=None,
               **kwargs) -> Union[BlockVisibility, Visibility]:
    """ Predict using convolutional degridding.

    This is at the bottom of the layering i.e. all transforms are eventually expressed in terms of
    this function. Any shifting needed is performed here.

    :param vis: Visibility to be predicted
    :param model: model image
    :param gcfcf: (Grid correction function i.e. in image space, Convolution function i.e. in uv space)
    :return: resulting visibility (in place works)
    """
    
    if model is None:
        return vis
    
    assert isinstance(vis, Visibility), vis

    _, _, ny, nx = model.data.shape
    
    if gcfcf is None:
        gcf, cf = create_pswf_convolutionfunction(model,
                                                  support=get_parameter(kwargs, "support", 6),
                                                  oversampling=get_parameter(kwargs, "oversampling", 128))
    else:
        gcf, cf = gcfcf
    
    griddata = create_griddata_from_image(model)
    griddata = fft_image_to_griddata(model, griddata, gcf)
    vis = degrid_visibility_from_griddata(vis, griddata=griddata, cf=cf)
    
    # Now we can shift the visibility from the image frame to the original visibility frame
    svis = shift_vis_to_image(vis, model, tangent=True, inverse=True)
    
    return svis
 Predict using convolutional degridding.

    This is at the bottom of the layering i.e. all transforms are eventually expressed in terms of
    this function. Any shifting needed is performed here.

    :param vis: Visibility to be predicted
    :param model: model image
    :param gcfcf: (Grid correction function i.e. in image space, Convolution function i.e. in uv space)
    :return: resulting visibility (in place works)
    
Predict using convolutional degridding.
This is at the bottom of the layering i.e. all transforms are eventually expressed in terms of
this function. Any shifting needed is performed here.
Predict using convolutional degridding . This is at the bottom of the layering i . e . all transforms are eventually expressed in terms of this function . Any shifting needed is performed here .
def predict_2d(vis: Union[BlockVisibility, Visibility], model: Image, gcfcf=None,
               **kwargs) -> Union[BlockVisibility, Visibility]:
    if model is None:
        return vis
    assert isinstance(vis, Visibility), vis
    _, _, ny, nx = model.data.shape
    if gcfcf is None:
        gcf, cf = create_pswf_convolutionfunction(model,
                                                  support=get_parameter(kwargs, "support", 6),
                                                  oversampling=get_parameter(kwargs, "oversampling", 128))
    else:
        gcf, cf = gcfcf
    griddata = create_griddata_from_image(model)
    griddata = fft_image_to_griddata(model, griddata, gcf)
    vis = degrid_visibility_from_griddata(vis, griddata=griddata, cf=cf)
    svis = shift_vis_to_image(vis, model, tangent=True, inverse=True)
    return svis
def predict_2d ( vis : Union [ BlockVisibility , Visibility ] , model : Image , gcfcf = None , ** kwargs ) -> Union [ BlockVisibility , Visibility ] : if model is None : return vis assert isinstance ( vis , Visibility ) , vis _ , _ , ny , nx = model . data . shape if gcfcf is None : gcf , cf = create_pswf_convolutionfunction ( model , support = get_parameter ( kwargs , "support" , 6 ) , oversampling = get_parameter ( kwargs , "oversampling" , 128 ) ) else : gcf , cf = gcfcf griddata = create_griddata_from_image ( model ) griddata = fft_image_to_griddata ( model , griddata , gcf ) vis = degrid_visibility_from_griddata ( vis , griddata = griddata , cf = cf ) svis = shift_vis_to_image ( vis , model , tangent = True , inverse = True ) return svis
Predict using convolutional degridding.
Predict using convolutional degridding .
""" Predict using convolutional degridding.

    This is at the bottom of the layering i.e. all transforms are eventually expressed in terms of
    this function. Any shifting needed is performed here.

    :param vis: Visibility to be predicted
    :param model: model image
    :param gcfcf: (Grid correction function i.e. in image space, Convolution function i.e. in uv space)
    :return: resulting visibility (in place works)
    """ # Now we can shift the visibility from the image frame to the original visibility frame
resulting visibility (in place works)
resulting visibility ( in place works )
vis
Union[BlockVisibility, Visibility]
Visibility to be predicted
Visibility to be predicted
model
Image
None
gcfcf
(Grid correction function i.e. in image space, Convolution function i.e. in uv space)
( Grid correction function i . e . in image space Convolution function i . e . in uv space )