Show
Ignore:
Timestamp:
09/06/10 16:53:14 (21 months ago)
Author:
farhi
Message:

samples: inc: updated header for use of OFF files

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/nlib/samples/Incoherent.comp

    r2923 r2926  
    4848*   transparently, so that it can be used like a regular sample object. 
    4949*   It supports the OFF and NOFF file format but not COFF (colored faces).  
    50 *   Such files may be generated from XYZ data using qhull/powercrust, and  
    51 *   viewed with geomview 
     50*   Such files may be generated from XYZ data using: 
     51*     qhull < coordinates.xyz Qx Qv Tv o > geomview.off  
     52*   and viewed with geomview or java -jar jroff.jar (see below). 
    5253*   The default size of the object depends of the OFF file data, but its  
    5354*   bounding box may be resized using xwidth,yheight and zdepth. 
     
    7475* focus_aw:   horiz. angular dimension of a rectangular area [deg] 
    7576* focus_ah:   vert.  angular dimension of a rectangular area [deg] 
    76 * sigma_abs:  Absorbtion cross section pr. unit cell [barns] 
     77* sigma_abs:  Absorbtion cross section pr. unit cell at 2200 m/s [barns] 
    7778* sigma_inc:  Incoherent scattering cross section pr. unit cell [barns] 
    7879* Vc:         Unit cell volume [AA^3] 
     
    99100* The test/example instrument <a href="../examples/QENS_test.instr">QENS_test.instr</a>. 
    100101* %L 
    101 * Geomview and Object File Format (OFF) <http|://www.geomview.org> 
    102 * %L 
    103 * Powercrust/qhull <http://www.cs.utexas.edu/users/amenta/powercrust> 
     102* Geomview and Object File Format (OFF) <http://www.geomview.org> 
     103* %L 
     104* Java version of Geomview (display only) jroff.jar <http://www.holmes3d.net/graphics/roffview/>  
     105* %L 
     106* Powercrust/qhull <http://qhull.org> 
    104107* 
    105108* %E 
     
    152155  } 
    153156  else if (xwidth && yheight && zdepth)  VarsInc.shape=1; /* box */ 
    154   else if (radius > 0 && yheight)        VarsInc.shape=0; /* cylinder */ 
     157  else if (radius > 0 &&  yheight)       VarsInc.shape=0; /* cylinder */ 
    155158  else if (radius > 0 && !yheight)       VarsInc.shape=2; /* sphere */ 
    156159 
     
    178181  } 
    179182 
    180   VarsInc.sigma_a=sigma_abs; 
    181   VarsInc.sigma_i=sigma_inc; 
    182   VarsInc.rho = (pack/Vc); 
    183   VarsInc.my_s=(VarsInc.rho * 100 * VarsInc.sigma_i); 
    184   VarsInc.my_a_v=(VarsInc.rho * 100 * VarsInc.sigma_a); 
     183  VarsInc.sigma_a= sigma_abs; 
     184  VarsInc.sigma_i= sigma_inc; 
     185  VarsInc.rho    = (pack/Vc); 
     186  VarsInc.my_s   = (VarsInc.rho * 100 * VarsInc.sigma_i); 
     187  VarsInc.my_a_v = (VarsInc.rho * 100 * VarsInc.sigma_a); 
    185188 
    186189  /* now compute target coords if a component index is supplied */