Changeset 14097


Ignore:
Timestamp:
06/07/12 10:18:54 (12 years ago)
Author:
neise
Message:
explained new makelibs.C script
File:
1 edited

Legend:

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

    r13389 r14097  
    5353
    5454    # this is needed for Python to find the pyfact classes and PyROOT
    55     export PYTHONPATH=$PYFACT
     55    export PYTHONPATH=$MY_PYFACT
    5656    export PYTHONPATH=$ROOTSYS/lib:$PYTHONPATH
    5757
     
    62623. Check out the repository
    6363===========================
    64 svn co https://fact.isdc.unige.ch/svn/fact/tools/pyscripts/
    65 
    66 4. Create pyfits_h.so library
     64svn co https://fact.isdc.unige.ch/svn/fact/tools/pyscripts py
     65
     66
     674a. Create the needed *.so libs @ ISDC
     68======================================
     69
     70FACT data are stored in (gzipped) fits files, but the data files are too large to be read by the existing tools:
     71
     72`pyfits <http://www.stsci.edu/institute/software_hardware/pyfits>` which uses `cfitsio <http://heasarc.gsfc.nasa.gov/fitsio/>`_.
     73
     74To mitigate this problem a C++ class defined in fits.h [#f1]_ is used. A simple possibility to create an interface of this C++ class is to use ROOT and later to import it using the
     75`pyroot <http://root.cern.ch/drupal/category/package-context/pyroot>`_ module.
     76
     77example::
     78  neise@isdc-viewer00:~/py/pyfact$ root -l -q makelibs.C
     79  root [0]
     80  Processing makelibs.C...
     81  Info in <TUnixSystem::ACLiC>: creating shared library /home_nfs/isdc/neise/test_py/pyfact/./izstream_h.so
     82  Info in <TUnixSystem::ACLiC>: creating shared library /home_nfs/isdc/neise/test_py/pyfact/./factfits_h.so
     83  [... quite some warnings ...]
     84 
     85  neise@isdc-viewer00:~/py/pyfact$ ls *.so
     86  calfactfits_h.so  factfits_h.so  izstream_h.so
     87
     884b. Create pyfits_h.so library
    6789=============================
     90
     91-----------This is a depricated section---------------
    6892
    6993FACT data are stored in (gzipped) fits files, but the data files are too large to be read by the existing tools:
     
    135159    pyfits.h  pyfits_h.d  pyfits_h.so
    136160
    137 
    138 
    139 Now you can check if the reading rawdata is working:
    140 
    141 $ ./pyfact.py
    142 
    143 this should print some data from a few events
     161Now you can check if the reading rawdata is working::
     162
     163  neise@isdc-viewer00:~/py/pyfact$ pyfact.py
     164  showing test of iterator of RawData class
     165  in order to test the SlowData classe please use: ./pyfact.py fits-file-name
     166  ev  1 data[0,0] =  -7.68806196438 start_cell[0] =  426 trigger type =  416
     167  ev  2 data[0,0] =  0.792280672486 start_cell[0] =  437 trigger type =  416
     168  ev  3 data[0,0] =  54.9490855517 start_cell[0] =  449 trigger type =  416
     169  ev  4 data[0,0] =  3.9482592671 start_cell[0] =  461 trigger type =  416
     170  ev  5 data[0,0] =  -66.4329317281 start_cell[0] =  474 trigger type =  416
     171  ev  6 data[0,0] =  8.2917625181 start_cell[0] =  485 trigger type =  416
     172  ev  7 data[0,0] =  -41.6565116079 start_cell[0] =  498 trigger type =  416
     173  ev  8 data[0,0] =  33.4668984163 start_cell[0] =  509 trigger type =  416
     174  ev  9 data[0,0] =  -28.520090549 start_cell[0] =  522 trigger type =  416
     175  ev  10 data[0,0] =  -20.4925692795 start_cell[0] =  533 trigger type =  416
     176
    144177
    1451785. Run examples
Note: See TracChangeset for help on using the changeset viewer.