<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>HippoDraw Documenation</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> <link rel="shortcut icon" href="lib/hippoApp.ico"> </head><body> <!-- Generated by Doxygen 1.7.3 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li class="current"><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> </div> <div class="header"> <div class="headertitle"> <h1>Data source file formats </h1> </div> </div> <div class="contents"> <div class="textblock"><p>Depending how <b>HippoDraw</b> was configured when built, it supports creating a data source by reading a file in several formats.</p> <p>The file formats supported are</p> <ul> <li><a class="el" href="files_root.html#file_ascii">ASCII file</a> </li> <li><a class="el" href="files_root.html#file_fits">FITS files</a> (optional) </li> <li><a class="el" href="files_root.html#file_root">ROOT files</a> (optional)</li> </ul> <p>The file may be read using either the <a class="el" href="canvas_root.html#canvas_menu_file">File menu</a> on the canvas window or by Python using the <a class="el" href="python_interact.html">Python extension module tutorial</a>.</p> <h2><a class="anchor" id="file_ascii"></a> ASCII file</h2> <p>The <b>HippoDraw</b> application can read and write NTuple data to a plain text file. The format is quite simple. Here is the contents of such a file.</p> <div class="fragment"><pre class="fragment"> Mark II Z0 scan Energy Sigma binsize error 90.73999786 29 0.25999999 5.9000001 91.05999756 30 0.23 3.1500001 91.43000031 28.39999962 0.25999999 3 91.5 28.79999924 0.28999999 5.80000019 92.16000366 21.95000076 0.22 7.9000001 92.22000122 22.89999962 0.25 3.0999999 92.95999908 13.5 0.20999999 4.5999999 89.23999786 4.5 0.28 3.5 89.98000336 10.80000019 0.27000001 4.5999999 90.34999847 24.20000076 0.25999999 3.5999999 </pre></div><p>The first line is the title. It can contain any number of spaces and is terminated by the new line character. The second line contains the labels. You can't see it but they are separated by the tab character to allow blanks to be in the labels. The remaining lines are the data, row by row. Any white space can separate the data. The title line and labels line can be missing. The labels can't be pure numbers, or it will be read as data.</p> <h2><a class="anchor" id="file_fits"></a> FITS files</h2> <p><a href="http://heasarc.gsfc.nasa.gov/docs/heasarc/fits.html">FITS</a> (Flexible Image Transport System) is the standard astronomical data format endorsed by both NASA and the IAU. If <b>HippoDraw</b> was configured with CFITSIO, then FITS file containing images and binary or ASCII tables are supported. A FITS file can be read with C++ or Python using the FitsController class. The example of <a class="el" href="examples_page.html#examples_fits_file">Reading and writing FITS files</a> with Python shows how it is done and is available in the <em>examples</em> subdirectory of the installation.</p> <h2><a class="anchor" id="file_root"></a> ROOT files</h2> <p>Limited support for reading data from a ROOT file is supported if <b>HippoDraw</b> was configured for ROOT support. The C++ <a class="el" href="ntuple_root.html#ntuple_roottuple">RootNTuple class</a> explains these limitations. A ROOT file can be read with C++ or Python using the RootController class. The example of <a class="el" href="examples_page.html#examples_root_file">Using data from a ROOT file</a> with Python shows how it is done and is available in the <em>examples</em> subdirectory of the installation. </p> </div></div> <hr size="1"><address style="align: right;"><small> Generated for HippoDraw by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0> </a> </small></address> </body> </html>