Esempio n. 1
0
    for fra in range(frame):
        print ('frame No.%s' %fra)

        for x in range (4,number_x-3):
            for y in range (4,number_y-3):
                if scidata[fra,y,x] > event_th :
                    if scidata[fra,y,x] > scidata[fra,y-1,x] and scidata[fra,y,x] > scidata[fra,y+1,x] \
                    and scidata[fra,y,x] > scidata[fra,y,x-1] and scidata[fra,y,x] > scidata[fra,y,x+1] \
                    and scidata[fra,y,x] > scidata[fra,y-1,x-1] and scidata[fra,y,x] > scidata[fra,y-1,x+1] \
                    and scidata[fra,y,x] > scidata[fra,y+1,x-1] and scidata[fra,y,x] > scidata[fra,y+1,x+1] :
                        my.Arg = arg
                        my.Frame = fra
                        my.Event_th = event_th
                        my.Split_th = split_th
                        my.X = x
                        my.Y = y
                        for j in range(-3,4) :
                            for i in range(-3,4) :
                                n = (i+4)+(7*((j+4)-1))
                                exec("my.PH%s = scidata[fra,y+j,x+i]" %n ) #not good
                        tr.Fill()


f.Write()
f.Close()

hdulist_back.close
hdulist_X.close

Esempio n. 2
0
for i in range(1,11) :
    print 'tree = %s' %i
    tree = root.Get('tree%s' %i)
    entry = tree.GetEntries()

    for j in range(entry) :
        tree.GetEntry(j)
        print 'entry = %s' %j
        if tree.PH17 < 9.279 and tree.PH18 < 9.279 and tree.PH19 < 9.279 and tree.PH24 < 9.279 \
        and tree.PH26 < 9.279 and tree.PH31 < 9.279 and tree.PH32 < 9.279 and tree.PH33 < 9.279 :

            my.Arg = tree.Arg
            my.Frame = tree.Frame
            my.Event_th = tree.Event_th
            my.Split_th = 9.279
            my.X = tree.X
            my.Y = tree.Y
            my.Xray = tree.PH25
            my.PH17 = tree.PH17
            my.PH18 = tree.PH18
            my.PH19 = tree.PH19
            my.PH24 = tree.PH24
            my.PH25 = tree.PH25
            my.PH26 = tree.PH26
            my.PH31 = tree.PH31
            my.PH32 = tree.PH32
            my.PH33 = tree.PH33

            tr.Fill()

f.Write()
Esempio n. 3
0
        and tree.PH13 < 9.279 and tree.PH16 < 9.279 and tree.PH20 < 9.279 and tree.PH23 < 9.279 \
        and tree.PH27 < 9.279 and tree.PH30 < 9.279 and tree.PH34 < 9.279 and tree.PH37 < 9.279 \
        and tree.PH38 < 9.279 and tree.PH39 < 9.279 and tree.PH40 < 9.279 and tree.PH41 < 9.279 :
            #grade2
            if tree.PH32 > 9.279 and tree.PH17 < 9.279 and tree.PH18 < 9.279 and tree.PH19 < 9.279 and tree.PH24 < 9.279 and tree.PH26 < 9.279 and tree.PH31 < 9.279 and tree.PH33 < 9.279 \
            and tree.PH38 < 9.279 and tree.PH39 < 9.279 and tree.PH40 < 9.279 :
                Xray2 = tree.PH25 + tree.PH32
                if Xray2 > 3400:
                    print "(Arg,frame,x,y,Xray) = (%s,%s,%s,%s,%s)" % (
                        tree.Arg, tree.Frame, tree.X, tree.Y, Xray2)

                my2.Arg = tree.Arg
                my2.Frame = tree.Frame
                my2.Event_th = tree.Event_th
                my2.Split_th = 9.279
                my2.X = tree.X
                my2.Y = tree.Y
                my2.Xray = Xray2
                my2.PH17 = tree.PH17
                my2.PH18 = tree.PH18
                my2.PH19 = tree.PH19
                my2.PH24 = tree.PH24
                my2.PH25 = tree.PH25
                my2.PH26 = tree.PH26
                my2.PH31 = tree.PH31
                my2.PH32 = tree.PH32
                my2.PH33 = tree.PH33

                tr2.Fill()

            elif tree.PH18 > 9.279 and tree.PH17 < 9.279 and tree.PH19 < 9.279 and tree.PH24 < 9.279 and tree.PH26 < 9.279 and tree.PH31 < 9.279 and tree.PH32 < 9.279 and tree.PH33 < 9.279 \