Last change
on this file since 14269 was 13406, checked in by neise, 13 years ago |
nothing special
|
-
Property svn:executable
set to
*
|
File size:
660 bytes
|
Line | |
---|
1 | #!/usr/bin/python -tti
|
---|
2 | #
|
---|
3 | # Example
|
---|
4 | # * looping over RawData class object
|
---|
5 | #
|
---|
6 |
|
---|
7 | from pyfact import RawData
|
---|
8 | from plotters import Plotter
|
---|
9 | from drs_spikes import DRSSpikes
|
---|
10 | import sys
|
---|
11 |
|
---|
12 | data_filename = '/home/dominik/py/test/20120304_018.fits.gz'
|
---|
13 | calib_filename = '/home/dominik/py/test/20120304_012.drs.fits.gz'
|
---|
14 |
|
---|
15 | if len(sys.argv) < 2:
|
---|
16 | print 'call: scriptname number-of-events-to-process'
|
---|
17 |
|
---|
18 | run = RawData(data_filename, calib_filename, return_dict = True)
|
---|
19 |
|
---|
20 | p = Plotter('test')
|
---|
21 |
|
---|
22 | for event in run:
|
---|
23 | index = event['event_id'].value
|
---|
24 | print event['trigger_type'].value ,
|
---|
25 | p(event['acal_data'][0])
|
---|
26 | if index == int(sys.argv[1]):
|
---|
27 | sys.exit(0)
|
---|
28 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.