|
Last change
on this file since 17841 was 14215, checked in by neise, 14 years ago |
|
more
|
-
Property svn:executable
set to
*
|
|
File size:
785 bytes
|
| Line | |
|---|
| 1 | #!/usr/bin/python -tti
|
|---|
| 2 | #
|
|---|
| 3 | #
|
|---|
| 4 |
|
|---|
| 5 | from pyfact import RawData
|
|---|
| 6 | import sys
|
|---|
| 7 | from ROOT import TFile, TCanvas, TH2F, TTree, TStyle, TObject
|
|---|
| 8 | import numpy as np
|
|---|
| 9 |
|
|---|
| 10 | data_filename = '/fact/raw/2012/06/06/20120606_116.fits.gz'
|
|---|
| 11 | calib_filename = '/fact/raw/2012/06/06/20120606_112.drs.fits.gz'
|
|---|
| 12 |
|
|---|
| 13 | run = RawData(data_filename, calib_filename, use_CalFactFits = False, do_calibration = False)
|
|---|
| 14 | npix = run.npix
|
|---|
| 15 |
|
|---|
| 16 | rootfile = TFile('20120606_116_diff_wo_offset_sub.root', "RECREATE")
|
|---|
| 17 | h = TH2F('h', 'diffs', npix, -0.5, npix-0.5, 4801, -2400.5, 2400.5)
|
|---|
| 18 |
|
|---|
| 19 | for event in run:
|
|---|
| 20 | index = event['event_id'].value
|
|---|
| 21 | print index, '/', run.nevents
|
|---|
| 22 | cal_data = event['data']
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 | for pixel in range(npix):
|
|---|
| 26 | for d in np.diff(cal_data[pixel,:]):
|
|---|
| 27 | h.Fill(pixel, d)
|
|---|
| 28 |
|
|---|
| 29 | h.Write()
|
|---|
| 30 | rootfile.Close()
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.