#!/usr/bin/python -tt # # Example # * looping over RawData class object # from pyfact import RawData from drs_spikes import DRSSpikes_2D import sys data_filename = 'data/20120223_210.fits.gz' calib_filename = 'data/20120223_206.drs.fits.gz' run = RawData(data_filename, calib_filename, return_dict = True, do_calibration=True) despike = DRSSpikes_2D() for event in run: index = event['event_id'].value print event['trigger_type'].value , if index == int(sys.argv[1]): sys.exit(0)