McXtrace logo

McXtrace - An X-ray ray-trace simulation package

Synchrotron SOLEIL DTU Physics

McXtrace

About McXtrace
 Publications
 Project Partners
 Project People
 Goal

Download
 Components

Documentation
 Manual
 Commands
 Wiki (GitHub)
 Tutorial

Mailing list

Links

Search

Code-repository (GitHub)

Report bugs (GitHub)


McXtrace: Isotropic_Sqw

[ Identification | Description | Input parameters | Links ]

The Isotropic_Sqw Component

Isotropic sample handling multiple scattering and absorption for a general S(q,w) (coherent)

Identification

  • Site:
  • Author: E. Farhi, V. Hugouvieux
  • Origin: Synchrotron SOLEIL
  • Date: March 2022

Description

An isotropic sample handling multiple scattering and including as input the
dynamic structure factor of the chosen sample (e.g. from Molecular
Dynamics). Handles elastic/inelastic, coherent scattering (Thomson) -
depending on the input S(q,w) - with multiple scattering and absorption.
Only the norm of q is handled (not the vector), and thus suitable for
liquids, gazes, amorphous and powder samples.

The implementation will automatically nornalise S(q,w) so that S(q) -> 1 at
large q (parameter norm=-1). Alternatively, the S(q,w) data will be multiplied
by 'norm' for positive values. Use norm=0 or 1 to use the raw data as input.

The material temperature can be defined in the S(q,w) data files (see below)
or set manually as parameter T. Setting T=-1 disables detailed balance.
Setting T=-2 attempts to guess the temperature from the input S(q,w) data
which must then be non-classical and extend on both energy sides (+/-).
To use the S(q,w) data as is, without temperature effect, set T=-1 and norm=1.

Both non symmetric (quantum) and classical S(q,w) data sets can be given by mean
of the 'classical' parameter (see below).

Additionally, for single order scattering (order=1), you may restrict the
vertical spreading of the scattering area using d_phi parameter.

An important option to enhance statistics is to set 'p_interact' to, say,
30 percent (0.3) in order to force a fraction of the beam to scatter. This
will result on a larger number of scattered events, retaining intensity.

Sample shape:
Sample shape may be a cylinder, a sphere, a box or any other shape
box/plate:       xwidth x yheight x zdepth (thickness=0)
hollow box/plate:xwidth x yheight x zdepth and thickness>0
cylinder:        radius x yheight (thickness=0)
hollow cylinder: radius x yheight and thickness>0
sphere:          radius (yheight=0 thickness=0)
hollow sphere:   radius and thickness>0 (yheight=0)
any shape:       geometry=OFF file

The complex geometry option handles any closed non-convex polyhedra.
It computes the intersection points of the photon ray with the object
transparently, so that it can be used like a regular sample object.
It supports the OFF, PLY and NOFF file format but not COFF (colored faces).
Such files may be generated from XYZ data using:
qhull < coordinates.xyz Qx Qv Tv o > geomview.off
or
powercrust coordinates.xyz
and viewed with geomview or java -jar jroff.jar (see below).
The default size of the object depends of the OFF file data, but its
bounding box may be resized using xwidth,yheight and zdepth.

Concentric components:
This component has the ability to contain other components when used in
hollow cylinder geometry (namely sample environment, e.g. cryostat and
furnace structure). Such component 'shells' should be split into input and
output side surrounding the 'inside' components. First part must then use
'concentric=1' flag to enter the inside part. The component itself must be
repeated to mark the end of the concentric zone. The number of concentric
shells and number of components inside is not limited.

COMPONENT S_in = Isotropic_Sqw(Sqw_coh="Al.laz", concentric=1, ...)
AT (0,0,0) RELATIVE sample_position

COMPONENT something_inside ... // e.g. the sample itself or other materials

COMPONENT S_out = COPY(S_in)(concentric=0)
AT (0,0,0) RELATIVE sample_position

Sqw file format:
File format for S(Q,w) (coherent) should contain 3 numerical
blocks, defining q axis values (vector), then energy axis values (vector in meV),
then a matrix with one line per q axis value, containing Sqw values for
each energy axis value. Comments (starting with '#') and non numerical lines
are ignored and used to separate blocks. Sampling must be regular.
Some parameters can be specified in comment lines, namely (00 is a numerical value):

# sigma_coh   00 coherent scattering cross section in [barn], e.g. 0.66524*f
# Temperature 00 in [K]
# V_rho       00 atom density per Angs^3
# density     00 in [g/cm^3]
# weight      00 in [g/mol]
# classical   00 [0=contains Bose factor (measurement) ; 1=classical symmetric]

Example:
# q axis values
# vector of m values in Angstroem-1
0.001000 .... 3.591000
# w axis values
# vector of n values in meV
0.001391 ... 1.681391
# sqw values (one line per q axis value)
# matrix of S(q,w) values (m rows x n values), one line per q value,
9.721422  10.599145 ... 0.000000
10.054191 11.025244 ... 0.000000
...
0.000000            ... 3.860253

See for instance file He4_liq_coh.sqw. Such files may be obtained from e.g. INX,
When the provided S(q,w) data is obtained from the classical correlation function
G(r,t), which is real and symmetric in time, the 'classical=1' parameter
should be set in order to multiply the file data with exp(hw/2kT). Otherwise,
the S(q,w) is NOT symmetrised (classical). If the S(q,w) data set includes both
negative and positive energy values, setting 'classical=-1' will attempt to
guess what type of S(q,w) it is. The temperature can also be determined this way.
In case you do not know if the data is classical or quantum, assume it is usually classical
at high temperatures, and quantum otherwise (T  < typical mode excitations).
The positive energy values correspond to Stokes processes, i.e. material gains
energy, and photons loose energy. The energy range is symmetrized to allow up
and down scattering, taking into account detailed balance exp(-hw/2kT).

You may also generate such S(q,w) 2D files using iFit 

Powder file format:
Files for coherent elastic powder scattering may also be used.
Format specification follows the same principle as in the PowderN
component, with parameters:

powder_format=
Crystallographica: { 4,5,7,0,0,0,0, 0,0 }
Fullprof:          { 4,0,8,0,0,5,0, 0,0 }
Undefined:         { 0,0,0,0,0,0,0, 0,0 }
Lazy:              {17,6,0,0,0,0,0,13,0 }
qSq:               {-1,0,0,0,0,0,1, 0,0 }  // special case for [q,Sq] table
or:                {j,d,F2,DW,Delta_d/d,1/2d,q,F,strain}

or column indexes (starting from 1) given as comments in the file header
(e.g. '#column_j 4'). Refer to the PowderN component for more details.
Delta_d/d and Debye-Waller factor may be specified for all lines with the
'powder_Dd' and 'powder_DW' parameters.
The reflection list should be ordered by decreasing d-spacing values.

Additionally a special [q,Sq] format is also defined with:
powder_format=qSq
for which column 1 is 'q' and column 2 is 'S(q)'.

Examples:
1- liq-4He parameters
Isotropic_Sqw(..., Sqw_coh="He4_liq_coh.sqw", T=10, p_interact=0.3)

2- powder sample
Isotropic_Sqw(..., Sqw_coh="Al.laz")

%BUGS:
When used in concentric mode, multiple bouncing scattering
(traversing the hollow part) is not taken into account.

Input parameters

Parameters in boldface are required; the others are optional.
NameUnitDescriptionDefault
powder_formatno quotesname or definition of column indexes in file{0,0,0,0,0,0,0,0,0}
Sqw_cohstrName of the file containing the values of Q, w and S(Q,w) Coherent part; Q in Angs-1, E in meV, S(q,w) in meV-1. Use 0, NULL or "" to disable.0
geometrystrName of an Object File Format (OFF) or PLY file for complex geometry. The OFF/PLY file may be generated from XYZ coordinates using qhull/powercrust0
materialstrAbsorption file."NULL"
radiusmOuter radius of sample in (x,z) plane. cylinder/sphere.0
thicknessmThickness of hollow sample Negative value extends the hollow volume outside of the box/cylinder.0
xwidthmwidth for a box sample shape0
yheightmHeight of sample in vertical direction for box/cylinder shapes0
zdepthmdepth for a box sample shape0
threshold1Value under which S(Q,w) is not accounted for. to set according to the S(Q,w) values, i.e. not too low.1e-20
order1Limit multiple scattering up to given order 0:all (default), 1:single, 2:double, ...0
TKTemperature of sample, detailed balance. Use T=-1 to disable it, and T=-2 to guess it from non-classical S(q,w) input.0
verbose1Verbosity level (0:silent, 1:normal, 2:verbose, 3:debug). A verbosity>1 also computes dispersions and S(q,w) analysis.1
d_phidegscattering vertical angular spreading (usually the height of the next component/detector). Use 0 for full space. This is only relevant for single scattering (order=1).0
concentric1Indicate that this component has a hollow geometry and may contain other components. It should then be duplicated after the inside part (only for box, cylinder, sphere) [1]0
rhoAA-3Density of scattering elements (nb atoms/unit cell V_0).0
sigma_cohbarnsThomson cross-section of the material. For an atom, this is f*0.665 barns, where f is the number of free electrons, f -> atomic number Z. Default is for a single free electron.0.66524
classical1Assumes the S(q,w) data from the files is a classical S(q,w), and multiply that data by exp(hw/2kT) on up/down energy sides. Use 0 when obtained from raw experiments, 1 from molecular dynamics. Use -1 to guess from a data set including both energy sides.-1
powder_Dd1global Delta_d/d spreading, or 0 if ideal.0
powder_DW1global Debey-Waller factor, if not in |F2| or 1.0
powder_VcAA^3volume of the unit cell0
densityg/cm^3density of material. V_rho=density/weight/1e24*N_A0
weightg/molatomic/molecular weight of material0
p_interact1Force a given fraction of the beam to scatter, keeping intensity right, to enhance small signals (-1 unactivate).-1
norm1Normalize S(q,w) when -1 (default). Use raw data when 1, multiplier for S(q,w) when norm>0.-1
powder_barns10 when |F2| data in powder file are fm^2, 1 when in barns (barns=1 for laz, barns=0 for lau type files).1
quantum_correctionstrSpecify the type of quantum correction to use "Boltzmann"/"Schofield","harmonic"/"Bader" or "standard"/"Frommhold" (default)"Frommhold"
AT ( , , ) RELATIVE
ROTATED ( , , ) RELATIVE

Links

  • Source code for Isotropic_Sqw.comp.
  • Atomic form factors f http://lampx.tugraz.at/~hadley/ss1/crystaldiffraction/atomicformfactors/formfactors.php
  • E. Farhi, V. Hugouvieux, M.R. Johnson, and W. Kob, Journal of Computational Physics 228 (2009) 5251-5261 "Virtual experiments: Combining realistic neutron scattering instrument and sample simulations"
  • H. Schober, Collection SFN 10 (2010) 159-336
  • Baron, Introduction to High-Resolution Inelastic X-Ray Scattering, 2020 (29b), http://arxiv.org/abs/1504.01098, p13 eq (1)
  • Sturm, Z. Naturforsch. 48a, 233-242 (1993), eq (9,10,16).
  • Schulke, Electron Dynamics by Inelastic X-ray Scattering, ISBN 978-0-19-851017-8, (2007) eq (1.5)

[ Identification | Description | Input parameters | Links ]

Generated on 2023-12-19 19:37:45


Last Modified: Tuesday, 13-Feb-2024 16:50:14 CET
Search website mailinglist archive GitHub repos