workflows/shared/imaging/imaging_shared.py
def sum_invert_results(image_list, normalize=True):
    """ Sum a set of invert results with appropriate weighting

    :param image_list: List of [image, sum weights] pairs
    :return: image, sum of weights
    """
    if len(image_list) == 1:
        return image_list[0]
    
    im = create_empty_image_like(image_list[0][0])
    sumwt = image_list[0][1].copy()
    sumwt *= 0.0

    for i, arg in enumerate(image_list):
        if arg is not None:
            im.data += arg[1][..., numpy.newaxis, numpy.newaxis] * arg[0].data
            sumwt += arg[1]

    if normalize:
        im = normalize_sumwt(im, sumwt)
    return im, sumwt
 Sum a set of invert results with appropriate weighting

    :param image_list: List of [image, sum weights] pairs
    :return: image, sum of weights
    
Sum a set of invert results with appropriate weighting
Sum a set of invert results with appropriate weighting
def sum_invert_results(image_list, normalize=True):
    if len(image_list) == 1:
        return image_list[0]
    im = create_empty_image_like(image_list[0][0])
    sumwt = image_list[0][1].copy()
    sumwt *= 0.0
    for i, arg in enumerate(image_list):
        if arg is not None:
            im.data += arg[1][..., numpy.newaxis, numpy.newaxis] * arg[0].data
            sumwt += arg[1]
    if normalize:
        im = normalize_sumwt(im, sumwt)
    return im, sumwt
def sum_invert_results ( image_list , normalize = True ) : if len ( image_list ) == 1 : return image_list [ 0 ] im = create_empty_image_like ( image_list [ 0 ] [ 0 ] ) sumwt = image_list [ 0 ] [ 1 ] . copy ( ) sumwt *= 0.0 for i , arg in enumerate ( image_list ) : if arg is not None : im . data += arg [ 1 ] [ ... , numpy . newaxis , numpy . newaxis ] * arg [ 0 ] . data sumwt += arg [ 1 ] if normalize : im = normalize_sumwt ( im , sumwt ) return im , sumwt
Sum a set of invert results with appropriate weighting
Sum a set of invert results with appropriate weighting
""" Sum a set of invert results with appropriate weighting

    :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
normalize