workflows/serial/simulation/simulation_serial.py
def corrupt_list_serial_workflow(vis_list, gt_list=None, seed=None, **kwargs):
    """ Create a graph to apply gain errors to a vis_list

    :param vis_list:
    :param gt_list: Optional gain table graph
    :param kwargs:
    :return:
    """
    
    def corrupt_vis(vis, gt, **kwargs):
        if isinstance(vis, Visibility):
            bv = convert_visibility_to_blockvisibility(vis)
        else:
            bv = vis
        if gt is None:
            gt = create_gaintable_from_blockvisibility(bv, **kwargs)
            gt = simulate_gaintable(gt, **kwargs)
            bv = apply_gaintable(bv, gt)
            
        if isinstance(vis, Visibility):
            return convert_blockvisibility_to_visibility(bv)
        else:
            return bv
    
    if gt_list is None:
        return [corrupt_vis(vis_list[ivis], None, **kwargs)
                for ivis, v in enumerate(vis_list)]
    else:
        return [corrupt_vis(vis_list[ivis], gt_list[ivis], **kwargs)
                for ivis, v in enumerate(vis_list)]
 Create a graph to apply gain errors to a vis_list

    :param vis_list:
    :param gt_list: Optional gain table graph
    :param kwargs:
    :return:
    
Create a graph to apply gain errors to a vis_list
Create a graph to apply gain errors to a vis_list
def corrupt_list_serial_workflow(vis_list, gt_list=None, seed=None, **kwargs):
    def corrupt_vis(vis, gt, **kwargs):
        if isinstance(vis, Visibility):
            bv = convert_visibility_to_blockvisibility(vis)
        else:
            bv = vis
        if gt is None:
            gt = create_gaintable_from_blockvisibility(bv, **kwargs)
            gt = simulate_gaintable(gt, **kwargs)
            bv = apply_gaintable(bv, gt)
        if isinstance(vis, Visibility):
            return convert_blockvisibility_to_visibility(bv)
        else:
            return bv
    if gt_list is None:
        return [corrupt_vis(vis_list[ivis], None, **kwargs)
                for ivis, v in enumerate(vis_list)]
    else:
        return [corrupt_vis(vis_list[ivis], gt_list[ivis], **kwargs)
                for ivis, v in enumerate(vis_list)]
def corrupt_list_serial_workflow ( vis_list , gt_list = None , seed = None , ** kwargs ) : def corrupt_vis ( vis , gt , ** kwargs ) : if isinstance ( vis , Visibility ) : bv = convert_visibility_to_blockvisibility ( vis ) else : bv = vis if gt is None : gt = create_gaintable_from_blockvisibility ( bv , ** kwargs ) gt = simulate_gaintable ( gt , ** kwargs ) bv = apply_gaintable ( bv , gt ) if isinstance ( vis , Visibility ) : return convert_blockvisibility_to_visibility ( bv ) else : return bv if gt_list is None : return [ corrupt_vis ( vis_list [ ivis ] , None , ** kwargs ) for ivis , v in enumerate ( vis_list ) ] else : return [ corrupt_vis ( vis_list [ ivis ] , gt_list [ ivis ] , ** kwargs ) for ivis , v in enumerate ( vis_list ) ]
Create a graph to apply gain errors to a vis_list
Create a graph to apply gain errors to a vis_list
""" Create a graph to apply gain errors to a vis_list

    :param vis_list:
    :param gt_list: Optional gain table graph
    :param kwargs:
    :return:
    """
None
vis_list
None
gt_list
Optional gain table graph
Optional gain table graph
seed
kwargs
None