Last change
on this file since 17893 was 13385, checked in by neise, 13 years ago |
initial
|
-
Property svn:executable
set to
*
|
File size:
535 bytes
|
Line | |
---|
1 | #!/usr/bin/python -tt
|
---|
2 | #
|
---|
3 | # Example
|
---|
4 | # * looping over RawData class object
|
---|
5 | #
|
---|
6 |
|
---|
7 | from pyfact import RawData
|
---|
8 | import sys
|
---|
9 |
|
---|
10 | data_filename = 'data/20120223_210.fits.gz'
|
---|
11 | calib_filename = 'data/20120223_206.drs.fits.gz'
|
---|
12 |
|
---|
13 | if len(sys.argv) < 2:
|
---|
14 | print 'call: scriptname number-of-events-to-process'
|
---|
15 |
|
---|
16 | run = RawData(data_filename, calib_filename, return_dict = True, do_calibration=True)
|
---|
17 |
|
---|
18 |
|
---|
19 | for event in run:
|
---|
20 | index = event['event_id'].value
|
---|
21 | print event['trigger_type'].value ,
|
---|
22 | if index == int(sys.argv[1]):
|
---|
23 | sys.exit(0)
|
---|
24 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.