Changeset 13325
- Timestamp:
- 04/07/12 10:10:13 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/pyscripts/doc/getting_started.rst
r13324 r13325 27 27 28 28 2. Environment variables 29 ===================== 29 ======================== 30 30 set the following env variables depending on the SHELL you are using, for instance in .bashrc or .tcshrc 31 31 … … 43 43 44 44 3. Check out the repository 45 ======================== 45 =========================== 46 46 svn co https://fact.isdc.unige.ch/svn/fact/tools/pyscripts/ 47 47 48 48 4. Create pyfits_h.so library 49 ======================== 49 ============================= 50 50 FACT data are stored in (gzipped) fits files, but the data files are too large to be read by the existing tools: 51 51 … … 82 82 83 83 5. Run examples 84 ============ 84 =============== 85 85 86 *datafilepath* and *calibfilepath* should be adjusted in case you are not working 87 on the ISDC cluster. 86 88 87 ======= 88 Classes 89 ======= 89 explore class RawData:: 90 90 91 pyfact.py 92 ========= 91 import pyfact 92 datafilepath = '/data00/fact-construction/raw/2012/03/04/20120304_018.fits.gz' 93 calibfilepath = '/data00/fact-construction/raw/2012/03/04/20120304_012.drs.fits.gz' 94 run = pyfact.RawData( datafilepath, calibfilepath, return_dict = True) 95 event = run.next() 96 97 type(event) 98 99 print 70*'*' 100 for key in event: 101 print 'key :', key 102 print 'value:', event[key] 103 print 70*'*' 93 104 94 rawdata access 95 ------- 96 .. autoclass:: pyfact.RawData 97 :members: 105 loop over RawData:: 98 106 99 100 fnames of a data run 101 -------------------- 102 .. autoclass:: pyfact.fnames 103 :members: 104 107 import pyfact 108 datafilepath = '/data00/fact-construction/raw/2012/03/04/20120304_018.fits.gz' 109 calibfilepath = '/data00/fact-construction/raw/2012/03/04/20120304_012.drs.fits.gz' 110 run = pyfact.RawData( datafilepath, calibfilepath, return_dict = True) 111 112 for event in run: 113 print 'event_id:', event['event_id'] 114 # the data can be found in event['acal_data'] 105 115 106 116 .. rubric:: Footnotes
Note:
See TracChangeset
for help on using the changeset viewer.