workflows/arlexecute/skymodel/skymodel_arlexecute.py
def crosssubtract_datamodels_skymodel_list_arlexecute_workflow(obsvis, modelvis_list):
    """Form data models by subtracting sum from the observed and adding back each model in turn
    
    vmodel[p] = vobs - sum(i!=p) modelvis[i]
    
    This is the E step in the Expectation-Maximisation algorithm.

    :param obsvis: "Observed" visibility
    :param modelvis_list: List of Visibility data model predictions
    :return: List of (image, weight) tuples)
   """
    # Now do the meaty part. We probably want to refactor this for performance once it works.
    def vsum(ov, mv):
        # Observed vis minus the sum of all predictions
        verr = copy_visibility(ov)
        for m in mv:
            verr.data['vis'] -= m.data['vis']
        # Now add back each model in turn
        result = list()
        for m in mv:
            vr = copy_visibility(verr)
            vr.data['vis'] += m.data['vis']
            result.append(vr)
        assert len(result) == len(mv)
        return result
        
    return arlexecute.execute(vsum, nout=len(modelvis_list))(obsvis, modelvis_list)
Form data models by subtracting sum from the observed and adding back each model in turn
    
    vmodel[p] = vobs - sum(i!=p) modelvis[i]
    
    This is the E step in the Expectation-Maximisation algorithm.

    :param obsvis: "Observed" visibility
    :param modelvis_list: List of Visibility data model predictions
    :return: List of (image, weight) tuples)
   
Form data models by subtracting sum from the observed and adding back each model in turn
vmodel[p] = vobs - sum(i!=p) modelvis[i]

This is the E step in the Expectation-Maximisation algorithm.
Form data models by subtracting sum from the observed and adding back each model in turn vmodel [ p ] = vobs - sum ( i! = p ) modelvis [ i ] This is the E step in the Expectation - Maximisation algorithm .
def crosssubtract_datamodels_skymodel_list_arlexecute_workflow(obsvis, modelvis_list):
    def vsum(ov, mv):
        verr = copy_visibility(ov)
        for m in mv:
            verr.data['vis'] -= m.data['vis']
        result = list()
        for m in mv:
            vr = copy_visibility(verr)
            vr.data['vis'] += m.data['vis']
            result.append(vr)
        assert len(result) == len(mv)
        return result
    return arlexecute.execute(vsum, nout=len(modelvis_list))(obsvis, modelvis_list)
def crosssubtract_datamodels_skymodel_list_arlexecute_workflow ( obsvis , modelvis_list ) : def vsum ( ov , mv ) : verr = copy_visibility ( ov ) for m in mv : verr . data [ 'vis' ] -= m . data [ 'vis' ] result = list ( ) for m in mv : vr = copy_visibility ( verr ) vr . data [ 'vis' ] += m . data [ 'vis' ] result . append ( vr ) assert len ( result ) == len ( mv ) return result return arlexecute . execute ( vsum , nout = len ( modelvis_list ) ) ( obsvis , modelvis_list )
Form data models by subtracting sum from the observed and adding back each model in turn
vmodel[p] = vobs - sum(i!=p) modelvis[i]
Form data models by subtracting sum from the observed and adding back each model in turn vmodel [ p ] = vobs - sum ( i! = p ) modelvis [ i ]
"""Form data models by subtracting sum from the observed and adding back each model in turn
    
    vmodel[p] = vobs - sum(i!=p) modelvis[i]
    
    This is the E step in the Expectation-Maximisation algorithm.

    :param obsvis: "Observed" visibility
    :param modelvis_list: List of Visibility data model predictions
    :return: List of (image, weight) tuples)
   """ # Now do the meaty part. We probably want to refactor this for performance once it works. # Observed vis minus the sum of all predictions # Now add back each model in turn
List of (image, weight) tuples)
List of ( image weight ) tuples )
obsvis
None
modelvis_list
List of Visibility data model predictions
List of Visibility data model predictions