Changeset 2927 for trunk/nlib/samples/Isotropic_Sqw.comp
- Timestamp:
- 09/06/10 16:55:55 (21 months ago)
- Files:
-
- 1 modified
-
trunk/nlib/samples/Isotropic_Sqw.comp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/nlib/samples/Isotropic_Sqw.comp
r2923 r2927 67 67 * transparently, so that it can be used like a regular sample object. 68 68 * It supports the OFF and NOFF file format but not COFF (colored faces). 69 * Such files may be generated from XYZ data using qhull/powercrust, and 70 * viewed with geomview 69 * Such files may be generated from XYZ data using: 70 * qhull < coordinates.xyz Qx Qv Tv o > geomview.off 71 * and viewed with geomview or java -jar jroff.jar (see below). 71 72 * The default size of the object depends of the OFF file data, but its 72 73 * bounding box may be resized using xwidth,yheight and zdepth. … … 167 168 * sigma_inc:[barns] Incoherent Scattering cross-section. Use -1 to unactivate. 168 169 * sigma_abs:[barns] Absorption cross-section at 2200 m/s. Use -1 to unactivate. 169 * V_rho: [AA-3] Density of atoms (nb atoms/unit cell V_0).170 * V_rho: [AA-3] Density of scattering elements (nb atoms/unit cell V_0). 170 171 * T: [K] Temperature of sample, detailed balance 171 172 * … … 236 237 * Cross sections for compounds: http://www.ncnr.nist.gov/resources/sldcalc.html 237 238 * %L 239 * Web Elements http://www.webelements.com/ 240 * %L 241 * Fullprof powder refinement: http://www.ill.eu/sites/fullprof/index.html 242 * %L 243 * Crystallographica software: http://www.crystallographica.com/ 244 * %L 238 245 * Example data file <a href="../data/He4_liq_coh.sqw">He4_liq_coh.sqw</a> 239 246 * %L 240 247 * The <a href="PowderN.html">PowderN</a> component. 241 248 * %L 242 * Web Elements http://www.webelements.com/243 * %L244 249 * The test/example instrument <a href="../examples/Test_Isotropic_Sqw.instr">Test_Isotropic_Sqw.instr</a>. 245 250 * %L 246 * Geomview and Object File Format (OFF) <http |://www.geomview.org>251 * Geomview and Object File Format (OFF) <http://www.geomview.org> 247 252 * %L 248 * Powercrust/qhull <http://www.cs.utexas.edu/users/amenta/powercrust> 253 * Java version of Geomview (display only) jroff.jar <http://www.holmes3d.net/graphics/roffview/> 254 * %L 255 * Powercrust/qhull <http://qhull.org> 249 256 * %E 250 257 *****************************************************************************/ … … 754 761 "density", 755 762 "weight", 756 "nb_atoms", 763 "nb_atoms","multiplicity", 757 764 NULL); 758 765 if (parsing) { … … 781 788 if (parsing[22] ) mat_weight =atof(parsing[22]); 782 789 if (parsing[23] ) mat_at_nb =atof(parsing[23]); 783 for (i=0; i<=23; i++) if (parsing[i]) free(parsing[i]); 790 if (parsing[24] ) mat_at_nb =atof(parsing[24]); 791 for (i=0; i<=24; i++) if (parsing[i]) free(parsing[i]); 784 792 free(parsing); 785 793 } 786 794 795 /* compute the scattering unit density from material weight and density */ 796 /* the weight of the scattering element is the chemical formula molecular weight 797 * times the nb of chemical formulae in the scattering element (nb_atoms) */ 787 798 if (!Sqw->rho && mat_density > 0 && mat_weight > 0 && mat_at_nb > 0) { 788 799 /* molar volume [cm^3/mol] = weight [g/mol] / density [g/cm^3] */ 789 800 /* atom density per Angs^3 = [mol/cm^3] * N_Avogadro *(1e-8)^3 */ 790 Sqw->rho = mat_density/mat_weight/1e24*6.02214199e23/mat_at_nb; 791 if (Sqw->verbose_output > 0) printf("Isotropic_Sqw: %s: Computing atom density V_rho=%g [AA^-3] from file %s\n", Sqw->compname, Sqw->rho, file); 801 Sqw->rho = mat_density/(mat_weight*mat_at_nb)/1e24*6.02214199e23; 802 if (Sqw->verbose_output > 0) printf("Isotropic_Sqw: %s: Computing scattering unit density V_rho=%g [AA^-3] from file %s\n", Sqw->compname, Sqw->rho, file); 803 } 804 805 /* the scattering unit cross sections are the chemical formula onces 806 * times the nb of chemical formulae in the scattering element */ 807 if (mat_at_nb > 0) { 808 Sqw->s_abs *= mat_at_nb; Sqw->s_inc *= mat_at_nb; Sqw->s_coh *= mat_at_nb; 792 809 } 793 810
