processing_components/visibility/operations.py
def subtract_visibility(vis, model_vis, inplace=False):
    """ Subtract model_vis from vis, returning new visibility
    
    :param vis:
    :param model_vis:
    :return:
    """
    if isinstance(vis, Visibility):
        assert isinstance(model_vis, Visibility), model_vis
    elif isinstance(vis, BlockVisibility):
        assert isinstance(model_vis, BlockVisibility), model_vis
    else:
        raise RuntimeError("Types of vis and model visibility are invalid")
    
    assert vis.vis.shape == model_vis.vis.shape, "Observed %s and model visibilities %s have different shapes" \
                                                 % (vis.vis.shape, model_vis.vis.shape)
    
    if inplace:
        vis.data['vis'] = vis.data['vis'] - model_vis.data['vis']
        return vis
    else:
        residual_vis = copy_visibility(vis)
        residual_vis.data['vis'] = residual_vis.data['vis'] - model_vis.data['vis']
        return residual_vis
 Subtract model_vis from vis, returning new visibility
    
    :param vis:
    :param model_vis:
    :return:
    
Subtract model_vis from vis, returning new visibility
Subtract model_vis from vis returning new visibility
def subtract_visibility(vis, model_vis, inplace=False):
    if isinstance(vis, Visibility):
        assert isinstance(model_vis, Visibility), model_vis
    elif isinstance(vis, BlockVisibility):
        assert isinstance(model_vis, BlockVisibility), model_vis
    else:
        raise RuntimeError("Types of vis and model visibility are invalid")
    assert vis.vis.shape == model_vis.vis.shape, "Observed %s and model visibilities %s have different shapes" \
                                                 % (vis.vis.shape, model_vis.vis.shape)
    if inplace:
        vis.data['vis'] = vis.data['vis'] - model_vis.data['vis']
        return vis
    else:
        residual_vis = copy_visibility(vis)
        residual_vis.data['vis'] = residual_vis.data['vis'] - model_vis.data['vis']
        return residual_vis
def subtract_visibility ( vis , model_vis , inplace = False ) : if isinstance ( vis , Visibility ) : assert isinstance ( model_vis , Visibility ) , model_vis elif isinstance ( vis , BlockVisibility ) : assert isinstance ( model_vis , BlockVisibility ) , model_vis else : raise RuntimeError ( "Types of vis and model visibility are invalid" ) assert vis . vis . shape == model_vis . vis . shape , "Observed %s and model visibilities %s have different shapes" % ( vis . vis . shape , model_vis . vis . shape ) if inplace : vis . data [ 'vis' ] = vis . data [ 'vis' ] - model_vis . data [ 'vis' ] return vis else : residual_vis = copy_visibility ( vis ) residual_vis . data [ 'vis' ] = residual_vis . data [ 'vis' ] - model_vis . data [ 'vis' ] return residual_vis
Subtract model_vis from vis, returning new visibility
Subtract model_vis from vis returning new visibility
""" Subtract model_vis from vis, returning new visibility
    
    :param vis:
    :param model_vis:
    :return:
    """
None
vis
None
model_vis
None
inplace