Changeset 13324 for fact/tools/pyscripts/doc/_build/html/_sources
- Timestamp:
- 04/05/12 17:32:54 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/pyscripts/doc/_build/html/_sources/getting_started.txt
r13316 r13324 39 39 * pyscript/tools 40 40 * pyscripts/ecamples 41 * py42 41 43 42 the absolute path depends on where you have checked (or will check) out the pyscripts repository … … 47 46 svn co https://fact.isdc.unige.ch/svn/fact/tools/pyscripts/ 48 47 49 4. Create pyfits library48 4. Create pyfits_h.so library 50 49 ======================== 51 FACT data are stored in (gzipped) fits files, but the data files are too large to be read by the default tool:50 FACT data are stored in (gzipped) fits files, but the data files are too large to be read by the existing tools: 52 51 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/>`_. 54 53 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 54 To 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. 56 56 57 `pyroot http://root.cern.ch/drupal/category/package-context/pyroot>` module. 57 got to the directory: pyscripts/pyfact 58 58 59 59 simple:: 60 60 61 [ pceth118] /home/luster/py >root62 ROOT 5.28/00 h (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) 63 63 CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010 64 64 Type ? for help. Commands must be C++ statements. 65 65 Enclose multiple statements between { }. 66 66 67 root [0] .L fits.h++ 67 Info in <TUnixSystem::ACLiC>: creating shared library /home /luster/py/./fits_h.so68 Info in <TUnixSystem::ACLiC>: creating shared library /home_nfs/isdc/lusterma/pyscripts/pyfact/./fits_h.so 68 69 root [1] 69 70 71 This might not work for whatenver reason then it should be done like this:: 70 72 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 77 Now you can check if the reading rawdata is working: 78 79 $ pyfact.py 80 81 this should print some data from a few events 71 82 72 83 5. Run examples … … 93 104 94 105 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.