workflows/shared/imaging/imaging_shared.py
def sum_invert_results_local(image_list):
    """ Sum a set of invert results with appropriate weighting
    without normalize_sumwt at the end
    :param image_list: List of [image, sum weights] pairs
    :return: image, sum of weights
    """
    
    first = True
    sumwt = 0.0
    im = None
    for i, arg in enumerate(image_list):
        if arg is not None:
            if isinstance(arg[1], numpy.ndarray):
                scale = arg[1][..., numpy.newaxis, numpy.newaxis]
            else:
                scale = arg[1]
            if first:
                im = copy_image(arg[0])
                im.data *= scale
                sumwt = arg[1].copy()
                first = False
            else:
                im.data += scale * arg[0].data
                sumwt += arg[1]
    
    assert not first, "No invert results"
    return im, sumwt
 Sum a set of invert results with appropriate weighting
    without normalize_sumwt at the end
    :param image_list: List of [image, sum weights] pairs
    :return: image, sum of weights
    
Sum a set of invert results with appropriate weighting
without normalize_sumwt at the end
Sum a set of invert results with appropriate weighting without normalize_sumwt at the end
def sum_invert_results_local(image_list):
    first = True
    sumwt = 0.0
    im = None
    for i, arg in enumerate(image_list):
        if arg is not None:
            if isinstance(arg[1], numpy.ndarray):
                scale = arg[1][..., numpy.newaxis, numpy.newaxis]
            else:
                scale = arg[1]
            if first:
                im = copy_image(arg[0])
                im.data *= scale
                sumwt = arg[1].copy()
                first = False
            else:
                im.data += scale * arg[0].data
                sumwt += arg[1]
    assert not first, "No invert results"
    return im, sumwt
def sum_invert_results_local ( image_list ) : first = True sumwt = 0.0 im = None for i , arg in enumerate ( image_list ) : if arg is not None : if isinstance ( arg [ 1 ] , numpy . ndarray ) : scale = arg [ 1 ] [ ... , numpy . newaxis , numpy . newaxis ] else : scale = arg [ 1 ] if first : im = copy_image ( arg [ 0 ] ) im . data *= scale sumwt = arg [ 1 ] . copy ( ) first = False else : im . data += scale * arg [ 0 ] . data sumwt += arg [ 1 ] assert not first , "No invert results" return im , sumwt
Sum a set of invert results with appropriate weighting
without normalize_sumwt at the end
Sum a set of invert results with appropriate weighting without normalize_sumwt at the end
""" Sum a set of invert results with appropriate weighting
    without normalize_sumwt at the end
    :param image_list: List of [image, sum weights] pairs
    :return: image, sum of weights
    """
image, sum of weights
image sum of weights
image_list
List of [image, sum weights] pairs
List of [ image sum weights ] pairs