Changeset 2927
- Timestamp:
- 09/06/10 16:55:55 (17 months ago)
- Location:
- trunk/nlib/samples
- Files:
-
- 3 modified
-
Isotropic_Sqw.comp (modified) (5 diffs)
-
PowderN.comp (modified) (7 diffs)
-
Single_crystal.comp (modified) (8 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 -
trunk/nlib/samples/PowderN.comp
r2923 r2927 49 49 * transparently, so that it can be used like a regular sample object. 50 50 * It supports the OFF and NOFF file format but not COFF (colored faces). 51 * Such files may be generated from XYZ data using qhull/powercrust, and 52 * viewed with geomview 51 * Such files may be generated from XYZ data using: 52 * qhull < coordinates.xyz Qx Qv Tv o > geomview.off 53 * and viewed with geomview or java -jar jroff.jar (see below). 53 54 * The default size of the object depends of the OFF file data, but its 54 55 * bounding box may be resized using xwidth,yheight and zdepth. … … 158 159 * weight: Atomic/molecular weight of material [g/mol] 159 160 * density: Density of material. rho=density/weight/1e24*N_A. [g/cm^3] 160 * nb_atoms: Number of atomsper unit cell [1]161 * nb_atoms: Number of sub-unit per unit cell, that is ratio of sigma for chemical formula to sigma per unit cell [1] 161 162 * 162 163 * %L … … 171 172 * Cross sections for compounds: http://www.ncnr.nist.gov/resources/sldcalc.html 172 173 * %L 173 * Fullprof powder refinement: http://www-llb.cea.fr/fullweb/fp2k/fp2k.htm174 * %L175 174 * Web Elements http://www.webelements.com/ 176 175 * %L 177 * Geomview and Object File Format (OFF) <http|://www.geomview.org> 178 * %L 179 * Powercrust/qhull <http://www.cs.utexas.edu/users/amenta/powercrust> 176 * Fullprof powder refinement: http://www.ill.eu/sites/fullprof/index.html 177 * %L 178 * Crystallographica software: http://www.crystallographica.com/ 179 * %L 180 * Geomview and Object File Format (OFF) <http://www.geomview.org> 181 * %L 182 * Java version of Geomview (display only) jroff.jar <http://www.holmes3d.net/graphics/roffview/> 183 * %L 184 * Powercrust/qhull <http://qhull.org> 180 185 * 181 186 * %E … … 276 281 "density", 277 282 "weight", 278 "nb_atoms", 283 "nb_atoms","multiplicity", 279 284 NULL); 280 285 … … 303 308 if (parsing[21] && !info->at_weight) info->at_weight =atof(parsing[21]); 304 309 if (parsing[22] && info->at_nb <= 1) info->at_nb =atof(parsing[22]); 305 for (i=0; i<=22; i++) if (parsing[i]) free(parsing[i]); 310 if (parsing[23] && info->at_nb <= 1) info->at_nb =atof(parsing[23]); 311 for (i=0; i<=23; i++) if (parsing[i]) free(parsing[i]); 306 312 free(parsing); 307 313 } … … 535 541 } 536 542 543 /* compute the scattering unit density from material weight and density */ 544 /* the weight of the scattering element is the chemical formula molecular weight 545 * times the nb of chemical formulae in the scattering element (nb_atoms) */ 537 546 if (!line_info.V_0 && line_info.at_nb > 0 538 547 && line_info.at_weight > 0 && line_info.rho > 0) { … … 541 550 line_info.V_0 = line_info.at_nb 542 551 /(line_info.rho/line_info.at_weight/1e24*6.02214199e23); 552 } 553 554 /* the scattering unit cross sections are the chemical formula onces 555 * times the nb of chemical formulae in the scattering element */ 556 if (line_info.at_nb > 0) { 557 line_info.sigma_a *= line_info.at_nb; line_info.sigma_i *= line_info.at_nb; 543 558 } 544 559 -
trunk/nlib/samples/Single_crystal.comp
r2923 r2927 36 36 * transparently, so that it can be used like a regular sample object. 37 37 * It supports the OFF and NOFF file format but not COFF (colored faces). 38 * Such files may be generated from XYZ data using qhull/powercrust, and 39 * viewed with geomview 38 * Such files may be generated from XYZ data using: 39 * qhull < coordinates.xyz Qx Qv Tv o > geomview.off 40 * and viewed with geomview or java -jar jroff.jar (see below). 40 41 * The default size of the object depends of the OFF file data, but its 41 42 * bounding box may be resized using xwidth,yheight and zdepth. … … 86 87 * ax=3.0282, by=3.0282, cz=3.0282/2) 87 88 * 88 * %BUGS:89 * The component is known not to work properly as a Bragg monochromator. The90 * reason is likely to relate to the internal definition of reciprocal space91 * orientation. Investigation undergoing.92 *93 89 * Also, always use a non-zero value of delta_d_d. 94 90 * … … 105 101 * The OFF file may be generated from XYZ coordinates using qhull/powercrust [str] 106 102 * delta_d_d: Lattice spacing variance, gaussian RMS [1] 107 * mosaic: Crystal mosaic (isotropic), gaussian RMS. Puts the crystal in the isotropic mosaic model state, thus disregarding other mosaicity parameters. [arc minutes] 103 * mosaic: Crystal mosaic (isotropic), gaussian RMS. Puts the crystal in the 104 * isotropic mosaic model state, thus disregarding other mosaicity parameters. [arc minutes] 108 105 * mosaic_a: Horizontal (rotation around lattice vector a) mosaic (anisotropic), gaussian RMS. 109 * Put the crystal in the anisotropic crystal vector state. I.e. model mosaicity 110 * through rotation around the crystal lattice vectors. Has precedence over 111 * in-plane mosaic model. [arc minutes] 112 * mosaic_b: Vertical (rotation around lattice vector b) mosaic (anisotropic), gaussian RMS. [arc minutes] 113 * mosaic_c: Out-of-plane (Rotation around lattice vector c) mosaic (anisotropic), gaussian RMS [arc minutes] 114 * mosaic_AB: In Plane mosaic rotation and plane vectors (anisotropic), mosaic_A, mosaic_B, A_h,A_k,A_l, B_h,B_k,B_l. Puts the crystal in the in-plane mosaic state. Vectors A and B define plane in which the crystal roation is defined, and mosaic_A, mosaic_B, denotes the resp. mosaicities (gaussian RMS) with respect to the the two reflections chosen by A and B (Miller indices). [arc_minutes, arc_minutes,1, 1, 1, 1, 1, 1] 106 * Put the crystal in the anisotropic crystal vector state. I.e. model mosaicity 107 * through rotation around the crystal lattice vectors. Has precedence over 108 * in-plane mosaic model. [arc minutes] 109 * mosaic_b: Vertical (rotation around lattice vector b) mosaic (anisotropic), 110 * gaussian RMS. [arc minutes] 111 * mosaic_c: Out-of-plane (Rotation around lattice vector c) mosaic (anisotropic), 112 * gaussian RMS [arc minutes] 113 * mosaic_AB: In Plane mosaic rotation and plane vectors (anisotropic), 114 * mosaic_A, mosaic_B, A_h,A_k,A_l, B_h,B_k,B_l. Puts the crystal in 115 * the in-plane mosaic state. Vectors A and B define plane in which 116 * the crystal roation is defined, and mosaic_A, mosaic_B, denotes the 117 * resp. mosaicities (gaussian RMS) with respect to the the two 118 * reflections chosen by A and B (Miller indices). [arc_minutes, arc_minutes,1, 1, 1, 1, 1, 1] 115 119 * 116 120 * recip_cell: Choice of direct/reciprocal (0/1) unit cell definition [1] … … 152 156 * Cross sections for compounds: http://www.ncnr.nist.gov/resources/sldcalc.html 153 157 * %L 154 * Geomview and Object File Format (OFF) <http|://www.geomview.org>158 * Fullprof powder refinement: http://www.ill.eu/sites/fullprof/index.html 155 159 * %L 156 * Powercrust/qhull <http://www.cs.utexas.edu/users/amenta/powercrust> 160 * Crystallographica software: http://www.crystallographica.com/ 161 * %L 162 * Geomview and Object File Format (OFF) <http://www.geomview.org> 163 * %L 164 * Java version of Geomview (display only) jroff.jar <http://www.holmes3d.net/graphics/roffview/> 165 * %L 166 * Powercrust/qhull <http://qhull.org> 157 167 * 158 168 * %E … … 333 343 "lattice_bb", 334 344 "lattice_cc", 335 "nb_atoms", 345 "nb_atoms","multiplicity", 336 346 NULL); 337 347 … … 354 364 if (parsing[15] && !info->m_cc) info->m_cc=atof(parsing[15]); 355 365 if (parsing[16]) nb_atoms=atof(parsing[16]); 356 for (i=0; i<=16; i++) if (parsing[i]) free(parsing[i]); 366 if (parsing[17]) nb_atoms=atof(parsing[17]); 367 for (i=0; i<=17; i++) if (parsing[i]) free(parsing[i]); 357 368 free(parsing); 358 369 } 359 370 } 371 372 if (nb_atoms > 1) { info->sigma_a *= nb_atoms; info->sigma_i *= nb_atoms; } 360 373 361 374 /* special cases for the structure definition */ … … 685 698 } 686 699 return(info->count = i); 687 } 700 } /* read_hkl_data */ 688 701 #endif /* !SINGLE_CRYSTAL_DECL */ 689 702 … … 719 732 hkl_info.sigma_a = sigma_abs; 720 733 hkl_info.sigma_i = sigma_inc; 721 hkl_info.recip = recip_cell;734 hkl_info.recip = recip_cell; 722 735 723 736 /* default format h,k,l,F,F2 */
