Changeset 13325


Ignore:
Timestamp:
04/07/12 10:10:13 (12 years ago)
Author:
neise
Message:
removed doubled classes content and added some examples
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/pyscripts/doc/getting_started.rst

    r13324 r13325  
    2727
    28282. Environment variables
    29 =====================
     29========================
    3030set the following env variables depending on the SHELL you are using, for instance in .bashrc or .tcshrc
    3131
     
    4343
    44443. Check out the repository
    45 ========================
     45===========================
    4646svn co https://fact.isdc.unige.ch/svn/fact/tools/pyscripts/
    4747
    48484. Create pyfits_h.so library
    49 ========================
     49=============================
    5050FACT data are stored in (gzipped) fits files, but the data files are too large to be read by the existing tools:
    5151
     
    8282
    83835. Run examples
    84 ============
     84===============
    8585
     86*datafilepath* and *calibfilepath* should be adjusted in case you are not working
     87on the ISDC cluster.
    8688
    87 =======
    88 Classes
    89 =======
     89explore class RawData::
    9090
    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*'*'
    93104
    94 rawdata access
    95 -------
    96 .. autoclass:: pyfact.RawData
    97     :members:
     105loop over RawData::
    98106
    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']
    105115
    106116.. rubric:: Footnotes
Note: See TracChangeset for help on using the changeset viewer.