Ignore:
Timestamp:
04/05/12 17:32:54 (13 years ago)
Author:
lusterma
Message:
updated
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/pyscripts/doc/_build/html/_sources/getting_started.txt

    r13316 r13324  
    3939    * pyscript/tools
    4040    * pyscripts/ecamples
    41     * py
    4241
    4342the absolute path depends on where you have checked (or will check) out the pyscripts repository
     
    4746svn co https://fact.isdc.unige.ch/svn/fact/tools/pyscripts/
    4847
    49 4. Create pyfits library
     484. Create pyfits_h.so library
    5049========================
    51 FACT data are stored in (gzipped) fits files, but the data files are too large to be read by the default tool:
     50FACT data are stored in (gzipped) fits files, but the data files are too large to be read by the existing tools:
    5251
    53 `pyfits <http://www.stsci.edu/institute/software_hardware/pyfits>`.
     52`pyfits <http://www.stsci.edu/institute/software_hardware/pyfits>` which uses `cfitsio <http://heasarc.gsfc.nasa.gov/fitsio/>`_.
    5453
    55 To mitigate this problem a C++ class defined in `fits.h` is used. A simple possibility to create an interface of this C++ class and python is to use the
     54To 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
     55`pyroot <http://root.cern.ch/drupal/category/package-context/pyroot>`_ module.
    5656
    57 `pyroot http://root.cern.ch/drupal/category/package-context/pyroot>` module.
     57got to the directory: pyscripts/pyfact
    5858
    5959simple::
    6060
    61   [pceth118] /home/luster/py > root
    62   ROOT 5.28/00h (branches/v5-28-00-patches@42209, Feb 13 2012, 23:52:00 on linux)
     61  [lusterma@isdc-cn02 pyfact]$ root
     62  ROOT 5.28/00 (trunk@37585, Dec 14 2010, 15:20:27 on linuxx8664gcc)
    6363  CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
    6464  Type ? for help. Commands must be C++ statements.
    6565  Enclose multiple statements between { }.
     66
    6667  root [0] .L fits.h++
    67   Info in <TUnixSystem::ACLiC>: creating shared library /home/luster/py/./fits_h.so
     68  Info in <TUnixSystem::ACLiC>: creating shared library /home_nfs/isdc/lusterma/pyscripts/pyfact/./fits_h.so
    6869  root [1]
    6970
     71This might not work for whatenver reason then it should be done like this::
    7072
     73  $rootcint -f my_dict.C -c fits.h izstream.h
     74  $g++ -fPIC -c -I$ROOTSYS/include my_dict.C -o my_dict.o
     75  $g++ -o fits_h.so -shared my_dict.o
     76
     77Now you can check if the reading rawdata is working:
     78
     79$ pyfact.py
     80
     81this should print some data from a few events
    7182
    72835. Run examples
     
    93104
    94105
     106.. rubric:: Footnotes
     107.. [#f1] fits.h (here named pyfits.h) is part of MARS and was written by T.Bretz, it was added to this repository for convienience
Note: See TracChangeset for help on using the changeset viewer.