Beispiel #1
0
#
# Create a cut and set its range
#
from hippo import Cut
cut1 = Cut(events, ('zenith_angle', ))
canvas.addDisplay(cut1)
cut1.setCutRange(80., 100., 'x')

#
# Create a another cut and set its range
#
cut2 = Cut(events, ('energy', ))
canvas.addDisplay(cut2)
cut2.setCutRange(1e3, 1e4, 'x')
cut2.setLog('x', True)
cut2.setLog('y', True)

cuts = (cut1, cut2)
#
# Add the list of cuts to display
#
## datarep = hist.getDataRep()
## datarep.applyCuts ( cuts )
hist.applyCuts(cuts)

#
# If applying only one cut one would do
# datarep.applyCut ( cut1 )
#
print "Added multiple cuts to one display"
Beispiel #2
0
#
# Create a another cut and set its range
#
cut2 = Cut ( events, ( 'energy', ) )
canvas.addDisplay ( cut2 )
cut2.setCutRange ( 1e3, 1e4, 'x' )
cut2.setLog ( 'x', True )
cut2.setLog ( 'y', True )

cuts = ( cut1, cut2 )
#
# Add the list of cuts to display
#
datarep = hist.getDataRep()
datarep.applyCuts ( cuts )
hist.applyCuts ( cuts )

#
# If applying only one cut one would do
# datarep.applyCut ( cut1 )
#
print "Added multiple cuts to one display"


#
# Now we use nummary's boolean arrays to create cut
#
hist2 = Display ( "Histogram", events, ('GLON', ) )
canvas.addDisplay ( hist2 )

# first cut