deprecated_code/workflows/mpi/pipelines/pipeline_mpi.py
def continuum_imaging_list_mpi_workflow(vis_list, model_imagelist,
                                        context,gcfcf=None,
                                               vis_slices=1, facets=1,  comm=MPI.COMM_WORLD,
                                        **kwargs):
    """ Create graph for the continuum imaging pipeline.

    Same as ICAL but with no selfcal.

    :param vis_list: rank0
    :param model_imagelist: rank0
    :param context: Imaging context
    :param kwargs: Parameters for functions in components
    :return:
    """
    rank = comm.Get_rank()
    size = comm.Get_size()
    log.info('%d: continuum_imaging_list_mpi_workflow: vis_list len %d model_imagelist len %d'
          %(rank,len(vis_list),len(model_imagelist)))
    if gcfcf is None:
        if rank==0:
            gcfcf = [create_pswf_convolutionfunction(model_imagelist[0])]
    gcfcf = comm.bcast(gcfcf,root=0)
    psf_imagelist = invert_list_mpi_workflow(vis_list, model_imagelist, dopsf=True, context=context,vis_slices=vis_slices, facets=facets, gcfcf=gcfcf,  **kwargs)
    
    residual_imagelist = residual_list_mpi_workflow(vis_list, model_imagelist, context=context,vis_slices=vis_slices, facets=facets, gcfcf=gcfcf,  **kwargs)
    deconvolve_model_imagelist = deconvolve_list_mpi_workflow(residual_imagelist, psf_imagelist,
                                                                        model_imagelist,
                                                                        prefix='cycle 0',
                                                                        **kwargs)
    
    nmajor = get_parameter(kwargs, "nmajor", 5)
    if nmajor > 1:
        for cycle in range(nmajor):
            prefix = "cycle %d" % (cycle + 1)
            residual_imagelist = residual_list_mpi_workflow(vis_list, deconvolve_model_imagelist,
                                                                   context=context,vis_slices=vis_slices, facets=facets, gcfcf=gcfcf,  **kwargs)
            deconvolve_model_imagelist = deconvolve_list_mpi_workflow(residual_imagelist, psf_imagelist,
                                                                                deconvolve_model_imagelist,
                                                                                prefix=prefix,
                                                                                **kwargs)
    
    residual_imagelist = residual_list_mpi_workflow(vis_list, deconvolve_model_imagelist, context=context,vis_slices=vis_slices, facets=facets, gcfcf=gcfcf, 
                                                           **kwargs)
    restore_imagelist = restore_list_mpi_workflow(deconvolve_model_imagelist, psf_imagelist, residual_imagelist)
    return (deconvolve_model_imagelist, residual_imagelist, restore_imagelist)
 Create graph for the continuum imaging pipeline.

    Same as ICAL but with no selfcal.

    :param vis_list: rank0
    :param model_imagelist: rank0
    :param context: Imaging context
    :param kwargs: Parameters for functions in components
    :return:
    
Create graph for the continuum imaging pipeline.
Same as ICAL but with no selfcal.
Create graph for the continuum imaging pipeline . Same as ICAL but with no selfcal .
def continuum_imaging_list_mpi_workflow(vis_list, model_imagelist,
                                        context,gcfcf=None,
                                               vis_slices=1, facets=1,  comm=MPI.COMM_WORLD,
                                        **kwargs):
    rank = comm.Get_rank()
    size = comm.Get_size()
    log.info('%d: continuum_imaging_list_mpi_workflow: vis_list len %d model_imagelist len %d'
          %(rank,len(vis_list),len(model_imagelist)))
    if gcfcf is None:
        if rank==0:
            gcfcf = [create_pswf_convolutionfunction(model_imagelist[0])]
    gcfcf = comm.bcast(gcfcf,root=0)
    psf_imagelist = invert_list_mpi_workflow(vis_list, model_imagelist, dopsf=True, context=context,vis_slices=vis_slices, facets=facets, gcfcf=gcfcf,  **kwargs)
    residual_imagelist = residual_list_mpi_workflow(vis_list, model_imagelist, context=context,vis_slices=vis_slices, facets=facets, gcfcf=gcfcf,  **kwargs)
    deconvolve_model_imagelist = deconvolve_list_mpi_workflow(residual_imagelist, psf_imagelist,
                                                                        model_imagelist,
                                                                        prefix='cycle 0',
                                                                        **kwargs)
    nmajor = get_parameter(kwargs, "nmajor", 5)
    if nmajor > 1:
        for cycle in range(nmajor):
            prefix = "cycle %d" % (cycle + 1)
            residual_imagelist = residual_list_mpi_workflow(vis_list, deconvolve_model_imagelist,
                                                                   context=context,vis_slices=vis_slices, facets=facets, gcfcf=gcfcf,  **kwargs)
            deconvolve_model_imagelist = deconvolve_list_mpi_workflow(residual_imagelist, psf_imagelist,
                                                                                deconvolve_model_imagelist,
                                                                                prefix=prefix,
                                                                                **kwargs)
    residual_imagelist = residual_list_mpi_workflow(vis_list, deconvolve_model_imagelist, context=context,vis_slices=vis_slices, facets=facets, gcfcf=gcfcf, 
                                                           **kwargs)
    restore_imagelist = restore_list_mpi_workflow(deconvolve_model_imagelist, psf_imagelist, residual_imagelist)
    return (deconvolve_model_imagelist, residual_imagelist, restore_imagelist)
def continuum_imaging_list_mpi_workflow ( vis_list , model_imagelist , context , gcfcf = None , vis_slices = 1 , facets = 1 , comm = MPI . COMM_WORLD , ** kwargs ) : rank = comm . Get_rank ( ) size = comm . Get_size ( ) log . info ( '%d: continuum_imaging_list_mpi_workflow: vis_list len %d model_imagelist len %d' % ( rank , len ( vis_list ) , len ( model_imagelist ) ) ) if gcfcf is None : if rank == 0 : gcfcf = [ create_pswf_convolutionfunction ( model_imagelist [ 0 ] ) ] gcfcf = comm . bcast ( gcfcf , root = 0 ) psf_imagelist = invert_list_mpi_workflow ( vis_list , model_imagelist , dopsf = True , context = context , vis_slices = vis_slices , facets = facets , gcfcf = gcfcf , ** kwargs ) residual_imagelist = residual_list_mpi_workflow ( vis_list , model_imagelist , context = context , vis_slices = vis_slices , facets = facets , gcfcf = gcfcf , ** kwargs ) deconvolve_model_imagelist = deconvolve_list_mpi_workflow ( residual_imagelist , psf_imagelist , model_imagelist , prefix = 'cycle 0' , ** kwargs ) nmajor = get_parameter ( kwargs , "nmajor" , 5 ) if nmajor > 1 : for cycle in range ( nmajor ) : prefix = "cycle %d" % ( cycle + 1 ) residual_imagelist = residual_list_mpi_workflow ( vis_list , deconvolve_model_imagelist , context = context , vis_slices = vis_slices , facets = facets , gcfcf = gcfcf , ** kwargs ) deconvolve_model_imagelist = deconvolve_list_mpi_workflow ( residual_imagelist , psf_imagelist , deconvolve_model_imagelist , prefix = prefix , ** kwargs ) residual_imagelist = residual_list_mpi_workflow ( vis_list , deconvolve_model_imagelist , context = context , vis_slices = vis_slices , facets = facets , gcfcf = gcfcf , ** kwargs ) restore_imagelist = restore_list_mpi_workflow ( deconvolve_model_imagelist , psf_imagelist , residual_imagelist ) return ( deconvolve_model_imagelist , residual_imagelist , restore_imagelist )
Create graph for the continuum imaging pipeline.
Create graph for the continuum imaging pipeline .
""" Create graph for the continuum imaging pipeline.

    Same as ICAL but with no selfcal.

    :param vis_list: rank0
    :param model_imagelist: rank0
    :param context: Imaging context
    :param kwargs: Parameters for functions in components
    :return:
    """
None
vis_list
None
model_imagelist
None
context
None
gcfcf
vis_slices
facets
comm
kwargs
Parameters for functions in components
Parameters for functions in components