Last change
on this file since 16858 was 13460, checked in by neise, 13 years ago |
evolving
|
-
Property svn:executable
set to
*
|
File size:
708 bytes
|
Line | |
---|
1 | #!/usr/bin/python -tt
|
---|
2 | #
|
---|
3 | # Example
|
---|
4 | # * looping over RawData class object
|
---|
5 | #
|
---|
6 |
|
---|
7 | from pyfact import RawData
|
---|
8 | from drs_spikes import DRSSpikes_2D
|
---|
9 | from plotters import Plotter
|
---|
10 | import matplotlib.pyplot as plt
|
---|
11 | import sys
|
---|
12 |
|
---|
13 | data_filename = 'data/20120223_210.fits.gz'
|
---|
14 | calib_filename = 'data/20120223_206.drs.fits.gz'
|
---|
15 |
|
---|
16 | plt.ion()
|
---|
17 |
|
---|
18 | def plot_spikes(despiker, data):
|
---|
19 | #single figure
|
---|
20 | sf = plt.figure('singles')
|
---|
21 |
|
---|
22 |
|
---|
23 |
|
---|
24 | run = RawData(data_filename, calib_filename, return_dict = True, do_calibration=True)
|
---|
25 | despike = DRSSpikes_2D(user_action=plot_spikes)
|
---|
26 |
|
---|
27 | for event in run:
|
---|
28 | index = event['event_id'].value
|
---|
29 | print event['trigger_type'].value ,
|
---|
30 | if index == int(sys.argv[1]):
|
---|
31 | sys.exit(0)
|
---|
32 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.