Esempio n. 1
0
def get_corrected_stack_using_vector(images, drift_vector, suffix=''):
    ''' Returns a drift corrected stack using the given drift vector.
    :param images: A list of length N containing ImagePlus objects.
    :param drift_matrix: A list of length N that contains the measured drift.
    '''
    shift_vector = shift_vector_from_drift_vector(drift_vector)
    stack = tools.stack_from_list_of_imp(shift_images(images, shift_vector))
    title = 'Drift corrected stack'
    if suffix:
        title += ' (%s)' % (suffix)
    corrected_stack = ImagePlus(title, stack)
    return corrected_stack