DisPerSE - persistent structures identification - Field dataAutomatic identification of persistent structures in 2D or 3D.
keywords: Morse complex, topology, peak, void, source, wall, filament, cosmic web, cosmology, structure identification.2013-01-24T03:58:22+01:00thierry sousbieurn:md5:f62b3bf39b9948523836119476648bbfDotclearvtk field formaturn:md5:815da7c1d79dc8027044ce918cca30b32430-01-06T06:56:00+01:002012-05-28T16:33:34+02:00thierry sousbieField data <p>VTK formats are developed for the Visualization Tool Kit library (<a href="http://localhost/dotclear/index.php?post/vtk-formats">VTK</a>) and can be used for 3D visualization with software such as <a href="https://wci.llnl.gov/codes/visit/">VisIt</a> or <a href="http://www.paraview.org/">ParaView</a>. Only regular grids field types can be converted to VTK (for particle type fields, convert to <em>NDnet</em> <a href="http://localhost/dotclear/index.php?post/networks">unstructured network</a> format first and then use <em><a href="http://localhost/dotclear/index.php?post/netconv">netconv</a> -to vtk</em>). Regular grids are stored as <em>VTK image data</em> and can be output in fours different VTK formats:
<br /><br /></p>
<ul>
<li>-<strong>vtk</strong>: the legacy format</li>
<li>-<strong>vtk_ascii</strong>: ASCII version of the vtk format</li>
<li>-<strong>vti</strong>: a more recently developed XML version of the vtk format,</li>
<li>-<strong>vti_ascii</strong>: ASCII version of the vtu format</li>
</ul>
<p><br />
<br />
The specifications for these formats can be found in this <a href="http://localhost/dotclear/index.php?post/www.vtk.org/VTK/img/file-formats.pdf" title="VTK formats PDF">PDF</a> file. See also <a href="http://www.cacr.caltech.edu/~slombey/asci/vtk/vtk_formats.simple.html">here</a> and <a href="http://mathema.tician.de/node/430" title="there">there</a> for additional information.
<br />
<br />
<br />
<br /></p>SDL-image formaturn:md5:cdd6677cf033684304583dc51bad63db2430-01-05T06:56:00+01:002012-05-28T16:27:56+02:00thierry sousbieField data <p>This input format is used to read 2D regular grids encoded in a popular picture format readable by <a href="http://www.libsdl.org/projects/SDL_image/docs/SDL_image.html" title="SDL-image">SDL-image</a> library (jpg, png, gif, ...). When using this format as input to <a href="http://localhost/dotclear/index.php?post/mse">mse</a>, the field whose topology is computed is the luminosity L of the image, a weighted average of the RED, GREEN and BLUE components of the image:
<br />
<br /></p>
<pre>L = 0.2989*RED + 0.5870*GREEN + 0.1140*BLUE</pre>
<p><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></p>survey_ascii formaturn:md5:0642003343a6eb7fa09f2c323576fd942430-01-04T06:56:00+01:002012-05-28T17:16:07+02:00thierry sousbieField data <p>This is a simple ASCII format whose main purpose is to easily read coordinates of discretely sampled astrophysical surveys (e.g. such as an <a href="http://www.sdss.org/" title="SDSS">SDSS</a> galaxy catalog). It should be considered when using spherical coordinates systems or if distance is measured by redshift for instance.
<br />
<br />
In this format, particles properties are encoded in an ASCII array where each row corresponds to one particle and each column to one property. Each column must have a name defined in the header (the first line of the file, starting with character <em>#</em>). An survey_ascii file may look like this:
<br />
<br /></p>
<pre># ra dec z my_field
+2.115401e+02 +6.313433e-01 +2.666800e-01 1
+2.115633e+02 +7.550188e-01 +1.259900e-01 0
+2.115687e+02 +8.108763e-01 +3.646600e-01 0
+2.117158e+02 +6.393598e-01 +1.143600e-01 1
+2.116826e+02 +6.528485e-01 +2.455700e-01 1
+2.116993e+02 +6.509297e-01 +1.199000e-01 0
+2.115738e+02 +7.772653e-01 +3.240600e-01 0
+2.116198e+02 +6.950604e-01 +1.987300e-01 0
+2.116773e+02 +7.085776e-01 +2.561900e-01 1</pre>
<p><br />
<br />
The name of a column defines its role if it matches one of the following keywords:
<br />
<br /></p>
<table border="1"><caption> header keywords</caption><tr align="center"><td width="20%" style="background:grey">Keyword</td><td width="40%" style="background:grey">Meaning</td></tr>
<tr align="center"><td style="background:grey"> px </td><td> X coordinate of the particle</td></tr>
<tr align="center"><td style="background:grey"> py </td><td> Y coordinate of the particle</td></tr>
<tr align="center"><td style="background:grey"> pz </td><td> Z coordinate of the particle</td></tr>
<tr align="center"><td style="background:grey"> vx </td><td> X component of the velocity</td></tr>
<tr align="center"><td style="background:grey"> vy </td><td> Y component of the velocity</td></tr>
<tr align="center"><td style="background:grey"> vz </td><td> Z component of the velocity</td></tr>
<tr align="center"><td style="background:grey"> id </td><td> an index associated to the particle</td></tr>
<tr align="center"><td style="background:grey"> ra </td><td> The <a href="http://en.wikipedia.org/wiki/Right_ascension">right ascension</a> of the particle</td></tr>
<tr align="center"><td style="background:grey"> dec </td><td> The <a href="http://en.wikipedia.org/wiki/Declination">declination</a> of the particle</td></tr>
<tr align="center"><td style="background:grey"> z </td><td> The <a href="http://en.wikipedia.org/wiki/Redshift">redshift</a> of the particle.</td></tr>
</table>
<p><br />
<br />
When particles coordinates are defined with <em>ra</em>, <em>dec</em> or <em>z</em> (redshift), DisPerSE automatically transform them into cartesian coordinates using the standard LCDM model to compute distances (Omega_m=0.27, Omega_L=0.73 ). This transformation can be inverted on the output skeletons and networks using options <em>-toRaDecZ</em> and <em>-toRaDecDist</em> of <a href="http://localhost/dotclear/index.php?post/skelconv">skelconv</a> and <a href="http://localhost/dotclear/index.php?post/netconv">netconv</a>.</p>FITS formaturn:md5:4a123cf8572bc22997acb2ed219cd1372430-01-03T06:56:00+01:002012-05-28T16:21:06+02:00thierry sousbieField data <p>This field format is used to read 2D or 3D regular grids of arbitrary dimensions in the popular Flexible Image Transport System (<a href="http://en.wikipedia.org/wiki/FITS" title="FITSS format">FITS</a>) image format. A popular library for reading and writing FITS image in <em>C</em> or <em>FORTRAN</em> is <a href="http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html" title="FITS IO">CFITSIO</a>, which must be installed for DisPerSE to be able to use this kind of files.
<br />
<br />
This file format is also used for storing <a href="http://healpix.jpl.nasa.gov/" title="HEALPIX">HEALPIX</a> tesselations of the sphere. DisPerSE will automatically detect if the FITS file contains a HEALPIX tesselation.
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></p>NDfield formaturn:md5:3aaeb963f82937bce4a9fd6addb5f9582430-01-02T06:56:00+01:002012-05-28T15:56:08+02:00thierry sousbieField data <p>This is the native binary format of DisPerSE. Functions for reading and writing <em>NDfield</em> format in <em>C</em> can be found within the file <code>${DISPERSE_SRC}/src/C/NDfield.c</code> (see functions <em>Load_NDfield</em> and <em>Save_NDfield</em>).
<br />
<br />
When using the C functions from Disperse, data is loaded into the following <em>C</em> structure which is close to the actual structure of the file (see file <code>${DISPERSE_SRC}/src/C/NDfield.h</code>):</p>
<pre>#define ND_CHAR (1<<0)
#define ND_UCHAR (1<<1)
#define ND_SHORT (1<<2)
#define ND_USHORT (1<<3)
#define ND_INT (1<<4)
#define ND_UINT (1<<5)
#define ND_LONG (1<<6)
#define ND_ULONG (1<<7)
#define ND_FLOAT (1<<8)
#define ND_DOUBLE (1<<9)</pre>
<pre>typedef struct NDfield_str
{
char comment[80]; // a comment on the data
int dims[NDFIELD_MAX_DIMS]; // dimensions of the grid, must be [ndims,nparticles] when data represents sample particles coordinates (i.e. when fdims_index!=0)
int ndims; // number of dimensions of the space
int n_dims; // number of meaningfull values in dims array
int fdims_index; // if 0, the field is a regular grid of dimensions dims, else the file contains the dims[0] coordinates of dims[1] particles.
int datatype; // type of the data (one of the ND_... defined above)
double x0[NDFIELD_MAX_DIMS]; // origin of the bounding box
double delta[NDFIELD_MAX_DIMS]; // extent of the bounding box
char dummy[160]; // dummy data, for future extensions or for storing anything you want.
void *val; // pointer to data
long nval; // total number of particles (fdims_index==1) or pixels (fdims_index==0)
int datasize; // size in bytes of datatype type.
} NDfield;</pre>
<p><br />
<br />
The <em>NDfield</em> binary format is organized as follows (blocks are delimited by <em>dummy</em> variables indicating the size of the blocks for FORTRAN compatibility, but they are ignored in C):
<br />
<br /></p>
<table style="margin: 1em auto 1em auto"><caption>NDnet binary format</caption><tr ><td width="10%" >field</td><td width="10%" >type</td><td width="10%">size</td><td width="65%" >comment</td></tr>
<tr valign="top"><td style="background:grey">dummy</td><td style="background:grey">int(4B) </td><td style="background:grey">1</td><td style="background:grey"> for FORTRAN compatibility</td></tr>
<tr valign="top"><td>tag</td><td>char(1B)</td><td>16</td><td>identifies the file type. Value : "NDFIELD"</td></tr>
<tr valign="top"><td style="background:grey">dummy</td><td style="background:grey">int(4B) </td><td style="background:grey">1</td><td style="background:grey"></td></tr>
<tr valign="top"><td style="background:grey">dummy</td><td style="background:grey">int(4B) </td><td style="background:grey">1</td><td style="background:grey"></td></tr>
<tr valign="top"><td>ndims</td><td>int(4B)</td><td>1</td><td>number of dimensions of the embedding space</td></tr>
<tr valign="top"><td>dims</td><td>int(4B)</td><td>20</td><td>size of the grid in pixels along each dimension, or [ndims,nparticles] if data represents particle coordinates (i.e. fdims_index=1)</td></tr>
<tr valign="top"><td>fdims_index</td><td>int(4B)</td><td>1</td><td> 0 if data represents a regular grid, 1 if it represents coordinates of tracer particles</td></tr>
<tr valign="top"><td>datatype</td><td>int(4B)</td><td>1</td><td>type of data stored (see below)</td></tr>
<tr valign="top"><td>x0</td><td>double(8B)</td><td>20</td><td>origin of bounding box (first ndims val. are meaningfull)</td></tr>
<tr valign="top"><td>delta</td><td>double(8B)</td><td>20</td><td>size of bounding box (first ndims val. are meaningfull)</td></tr>
<tr valign="top"><td>dummy_ext</td><td>char(1B)</td><td>160</td><td>dummy data reserved for future extensions</td></tr>
<tr valign="top"><td style="background:grey">dummy</td><td style="background:grey">int(4B) </td><td style="background:grey">1</td><td style="background:grey"></td></tr>
<tr valign="top"><td style="background:grey">dummy</td><td style="background:grey">int(4B) </td><td style="background:grey">1</td><td style="background:grey"></td></tr>
<tr valign="top"><td>data</td><td>size of datatype</td><td>N</td><td>data itself (N may be the number of pixels or ndism times the number of particles)</td></tr>
<tr valign="top"><td style="background:grey">dummy</td><td style="background:grey">int(4B) </td><td style="background:grey">1</td><td style="background:grey"></td></tr>
</table>
<p><br />
<br /></p>
<table border="1"><caption> Possible data types</caption><tr align="center"><td width="20%" style="background:grey">name</td><td width="20%" style="background:grey">size (Bytes)</td><td width="20%" style="background:grey">type</td><td width="20%" style="background:grey">value</td></tr>
<tr align="center"><td style="background:grey"> ND_CHAR </td><td> 1 </td><td> integer </td><td> 1 (=1<<0)</td></tr>
<tr align="center"><td style="background:grey"> ND_UCHAR </td><td> 1 </td><td> integer </td><td> 2 (=1<<1)</td></tr>
<tr align="center"><td style="background:grey"> ND_SHORT </td><td> 2 </td><td> integer </td><td> 4 (=1<<2)</td></tr>
<tr align="center"><td style="background:grey"> ND_USHORT </td><td> 2 </td><td> integer </td><td> 8 (=1<<3)</td></tr>
<tr align="center"><td style="background:grey"> ND_INT </td><td> 4 </td><td> integer </td><td> 16 (=1<<4)</td></tr>
<tr align="center"><td style="background:grey"> ND_UINT </td><td> 4 </td><td> integer </td><td> 32 (=1<<5)</td></tr>
<tr align="center"><td style="background:grey"> ND_LONG </td><td> 8 </td><td> integer </td><td> 64 (=1<<6)</td></tr>
<tr align="center"><td style="background:grey"> ND_ULONG </td><td> 8 </td><td> integer </td><td> 128 (=1<<7)</td></tr>
<tr align="center"><td style="background:grey"> ND_FLOAT </td><td> 4 </td><td> float </td><td> 256 (=1<<8)</td></tr>
<tr align="center"><td style="background:grey"> ND_DOUBLE </td><td> 8 </td><td> float </td><td> 512 (=1<<9)</td></tr>
</table>NDfield_ascii formaturn:md5:13c96188942b97e6721220412233a1372430-01-02T06:56:00+01:002013-01-24T04:58:22+01:00thierry sousbieField data <p>A simple ASCII version of the <a href="http://localhost/dotclear/index.php?post/NDfield-format">NDfield</a> format used to represent either uniform grids or particles coordinates. Data type is always interpreted as double precision floating point.
<br />
<br /></p>
<table border="1"><caption> NDfield_ascii format</caption><tr ><td width="50%" ></td><td width="50%" ></td></tr>
<tr valign="top"><th>ANDFIELD COORDS</th><td>header (COORDS keyword is optional, if present, values are interpreted as coordinates, or else, as pixel values)</td></tr>
<tr valign="top"><th>[N_1 ... N_ndims]</th><td>size of the grid along each of the ndims dimensions (in pixels) or number of dimensions and number of particles if COORDS keyword is in the header (= [ndims,nparticles])</td></tr>
<tr valign="top"><th>BBOX [X0_1 ... X0_ndims] [delta_1 ... delta_ndims]</th><td>OPTIONAL: bounding box definition (origin and extent)</td></tr>
<tr valign="top"><th>V_1 V_2</th><td> values (any number of values can be on the same line)</td></tr>
<tr valign="top"><th>V_3</th><td> no particular formating is required</td></tr>
<tr valign="top"><th>...</th><td> Repeat enough time to define a number of values equal to the number of pixels or the number of particles (if COORDS keyword is in the header)</td></tr>
</table>Field filesurn:md5:c641a01169a789e3018403e8945394c82430-01-01T06:56:00+01:002012-07-13T14:51:29+02:00thierry sousbieField data <p>This file type is designed to store scalar fields sampled over regular grids (i.e. regular images in 2D, 3D and more) or, by extension, coordinates of tracer particles sampling an underlying density field. The main field format is <em>NDfield</em>, which allows to store any type of data (integer, simple or double precision floating point, ...) over arbitrary sized regular grids or as coordinates of tracer particles.
<br />
<br />
<strong><ins>Available formats</ins></strong>:
<br />
<br /></p>
<ul>
<li>-<strong><a href="http://localhost/dotclear/index.php?post/NDfield-format">NDfield</a></strong> (Read / Write):<br />This is the format used internally in DisPerSE, it is efficient and generic as it can store regular grids or sample particles coordinates indifferently.</li>
</ul>
<p><br /></p>
<ul>
<li>-<strong><a href="http://localhost/dotclear/index.php?post/NDfield_ascii-format">NDfield_ascii</a></strong> (Read / Write):<br />A simple ASCII version of the NDfield format, it is as versatile but data is always considered to be double precision floating point.</li>
</ul>
<p><br /></p>
<ul>
<li>-<strong><a href="http://localhost/dotclear/index.php?post/FITS-format">FITS</a></strong> (Read only):<br />Used to read 2D or 3D regular grids of arbitrary dimensions in the popular Flexible Image Transport System (<a href="http://en.wikipedia.org/wiki/FITS" title="FITSS format">FITS</a>) image format. Also used for <a href="http://healpix.jpl.nasa.gov/" title="HEALPIX">HEALPIX</a> tessellations of the sphere.</li>
</ul>
<p><br /></p>
<ul>
<li>-<strong><a href="http://localhost/dotclear/index.php?post/survey_ascii-format">survey_ascii</a></strong>(Read only):<br />A simple ASCII format whose main purpose is to easily read coordinates of discretely sampled astrophysical surveys (e.g. such as an <a href="http://www.sdss.org/" title="SDSS">SDSS</a> galaxy catalog). Try this if you use spherical coordinates or if distance is measured by redshift for instance.</li>
</ul>
<p><br /></p>
<ul>
<li>-<strong><a href="http://localhost/dotclear/index.php?post/SDL-image">SDL-image</a></strong> (Read only):<br />This input format is used to read 2D regular grids encoded in a popular picture format readable by <a href="http://www.libsdl.org/projects/SDL_image/docs/SDL_image.html" title="SDL-image">SDL-image</a> library (jpg, png, gif, ...).</li>
</ul>
<p><br /></p>
<ul>
<li>-<strong><a href="http://localhost/dotclear/index.php?post/vtk-field-format">vtk</a></strong>, <strong><a href="http://localhost/dotclear/index.php?post/vtk-field-format">vtk_ascii</a></strong>, <strong><a href="http://localhost/dotclear/index.php?post/vtk-field-format">vti</a></strong> and <strong><a href="http://localhost/dotclear/index.php?post/vtk-field-format">vti_ascii</a></strong> (Write only):<br />These formats are binary and ASCII legacy and XML <a href="http://www.vtk.org/">VTK</a> formats that are readable by several 3D visualization tools, such as <a href="https://wci.llnl.gov/codes/visit/">VisIt</a> or <a href="http://www.paraview.org/">ParaView</a> for instance.</li>
</ul>
<p><br /></p>
<ul>
<li>-<strong><a href="http://localhost/dotclear/index.php?post/networks">NDnet</a></strong> (Write only):<br /> Using this format, field files representing tracer particles coordinates can be converted to <a href="http://localhost/dotclear/index.php?post/networks">unstructured networks</a> (use <em><a href="http://localhost/dotclear/index.php?post/netconv">netconv</a></em> to convert <em>NDnet</em> files to other network formats). Regular grids conversion is not implemented yet due to the huge size of the output network.</li>
</ul>
<p><br />
<br /></p>