contrib/stack/topsStack/mergeBurstsIon.py
def updateValid(frame1, frame2):
    '''
    update frame1 valid with frame2 valid
    '''

    min1 = frame1.bursts[0].burstNumber
    max1 = frame1.bursts[-1].burstNumber

    min2 = frame2.bursts[0].burstNumber
    max2 = frame2.bursts[-1].burstNumber

    minBurst = max(min1, min2)
    maxBurst = min(max1, max2)

    for ii in range(minBurst, maxBurst + 1):
        frame1.bursts[ii-min1].firstValidLine   = frame2.bursts[ii-min2].firstValidLine
        frame1.bursts[ii-min1].firstValidSample = frame2.bursts[ii-min2].firstValidSample
        frame1.bursts[ii-min1].numValidLines    = frame2.bursts[ii-min2].numValidLines
        frame1.bursts[ii-min1].numValidSamples  = frame2.bursts[ii-min2].numValidSamples


    return

    update frame1 valid with frame2 valid
    
update frame1 valid with frame2 valid
update frame1 valid with frame2 valid
def updateValid(frame1, frame2):
    min1 = frame1.bursts[0].burstNumber
    max1 = frame1.bursts[-1].burstNumber
    min2 = frame2.bursts[0].burstNumber
    max2 = frame2.bursts[-1].burstNumber
    minBurst = max(min1, min2)
    maxBurst = min(max1, max2)
    for ii in range(minBurst, maxBurst + 1):
        frame1.bursts[ii-min1].firstValidLine   = frame2.bursts[ii-min2].firstValidLine
        frame1.bursts[ii-min1].firstValidSample = frame2.bursts[ii-min2].firstValidSample
        frame1.bursts[ii-min1].numValidLines    = frame2.bursts[ii-min2].numValidLines
        frame1.bursts[ii-min1].numValidSamples  = frame2.bursts[ii-min2].numValidSamples
    return
def updateValid ( frame1 , frame2 ) : min1 = frame1 . bursts [ 0 ] . burstNumber max1 = frame1 . bursts [ - 1 ] . burstNumber min2 = frame2 . bursts [ 0 ] . burstNumber max2 = frame2 . bursts [ - 1 ] . burstNumber minBurst = max ( min1 , min2 ) maxBurst = min ( max1 , max2 ) for ii in range ( minBurst , maxBurst + 1 ) : frame1 . bursts [ ii - min1 ] . firstValidLine = frame2 . bursts [ ii - min2 ] . firstValidLine frame1 . bursts [ ii - min1 ] . firstValidSample = frame2 . bursts [ ii - min2 ] . firstValidSample frame1 . bursts [ ii - min1 ] . numValidLines = frame2 . bursts [ ii - min2 ] . numValidLines frame1 . bursts [ ii - min1 ] . numValidSamples = frame2 . bursts [ ii - min2 ] . numValidSamples return
update frame1 valid with frame2 valid
update frame1 valid with frame2 valid
'''
    update frame1 valid with frame2 valid
    '''
frame1
frame2