Xraytrace documentation

raytracing software for x-ray standing wave calculations

User Tools

Site Tools


input_reference

Input syntax reference

Parameter file format and options

Here follows a list of all the parameters and their options that can be used within parameter file. Some of them have meaning only if used with other parameters, please refer to other parts of documentation or examples in case of doubts.

POOL
double double double

- sets the dx, dy and dz for the computational domain. All the other parameters (number of voxels) are taken from the material geometry VTK file.

MEDIUM_SAMPLE
filename.vtk filename.table

- sets the file where geometry should be loaded from and material table file associated with it (see below). Input VTK file is a structured ASCII file. It can be e.g. the VTK output file from GSvit.

MEDIUM_VECTOR_SAMPLE
int int int filename.vector filename.table

- sets the computational domain size and vector input in the GSvit format (only material number is following the vector object definition).

OUTPUT
filename.vtk

- sets file where the local intensity should be output (and if)

OUTPUT_RESULT
result.txt

- sets file where the sum result should be output (and if)

VERBOSE
integer

- sets verbosity level. Below 3 this means not many messages and should be used for normal work. Above 3 this means a lot of details of every individual ray. Value of 10 means also debugging data for each ray and no intensity decay in output field data. Default value is 0.

COMP
double double double double

- sets ray direction in theta, phi coordinates, in degrees, with similar orientation as used in GSvit. Ray should be incident to the center of computational domain. If there is a material at the boundary, it does not refract there, and goes directly inside. As third parameter, this command also sets the radius of the beam - rays are randomly shifted in this radius to produce an idealaly collimated beam. Finally, wavelength is supplied, in meters. Default value is 90 degrees theta, 0 degrees phi, 1 voxel radius, which corresponds to ray propagating in x direction (towards positive values). See image below for angles meaning (polarisation angle psi is not used so far):

CENTER
0/1

- sets if the ray evaluation should be centered to cell in coherent calculations.

RAYS
integer

- sets total number of rays to be casted. Value around 10000 should be fine for beams of radius around 10. Set to unity if you want to understand better what is happenning, ideally with increasing verbosity level and decreasing the beam radius. Default value is 1.

COHERENCE
integer double

- sets coherence on/off. Default is 0, meaning off. If coherence is switched on, all the rays have the same phase at the beginning and amplitudes are summed instead of intensities. Second parameter is the phase itself, in degrees.

SOURCEMULT
double double double

- multiplies apparent source radius in x, y and z direction to create elliptical shape.

SOURCE_METHOD
int

- switches between the default ray source (0) and advanced sources: 1: whole boundary source, 2: top boundary + periodic bc source

SOURCE_MATCUT
int

- cut source parts not illuminating given material index. 0, which is vacuum, means illuminate all.

NORMALIZE
double int

- normalizes result by value obtained at given angle for given material.

MULTSTEP
double

- multiplies the raytracing step by a double. Default is 1, which means approximately a voxel size.

TEST
integer

- creates test material file skipping any vtk loading.

1 creates aritifical material half space of size 50 x 1000 x 500

AVERAGE
integer

- sets the local averaging radius for local plane (surface normal) evaluation. Default value is 2. This option is not used if a minimal inteface method is used. Note that for very small incident angles averaging might be problematic (see also Interface method).

INTERFACE_METHOD
integer

- sets the surface/interface normal calculation method, 0 - simple weighing, 1 - RS, 2 - gradient based, 3 - minimal (single voxel), 4 - conformal modeling. Simple weighting gives slightly wrong angles and should not be used, RS method provides local plane fitting, gradient method is an approximate method using gradient of material within the sample, minimal method only looks to adjacent voxels and therefore can only produce normals of individual voxel faces. All the averaging based methods may fail at large angles hitting edges of objects (where real staircased object normal is too much different from averaged one); if it fails algorithm automatically uses the minimal method for the particular reflection/transmission. Conformal modeling is the most complex method and is still experimental. Default value is 2.

MAXDEPTH
integer

- sets maximum depth of secondary rays for multiple reflections - i.e. maximum number of rays produced from one incident ray. Default value is 10.

PHASES
integer

- sets number of phases to use in calculation, directly prolongs the process. Default value is 1.

CUTMAT
integer

- sets the material to which rays should not enter from source. Default is -1 which means not doing it.

TERMINATE_LIMIT
double

- sets ray termination intensity limit, e.g. 1e-15 which is default value. Incident intensity of a ray is 1 and if the intensity fails below this criterium it is not propagated further.

REGIME
integer

- sets regime of calculation. 0 means illumination only - ray illuminates first material that is not zero and dies. 1 means rays illuminating volume, passing through without any optical effects. 2 means geometrical optics, 3 means only reflections like from perfect metal at any material interface Default value is 2.

MAXSTEP
integer

- set maximum number of steps for every individual ray computation. Normally, the ray progresses by one voxel in each step, so this value should not be smaller than size of the computational domain. If it is not enough, software issues a warning. Default value is 100000.

PERIODIC_XY
xstart ystart xend yend optimize

Creates periodic BC. If optimization is requested, end boundary is shifted towards making it periodic with respect of incident signal wavelength and angles.

SIMPLE
0/1

Run simple calculation according to Bedzyk, X-ray Standing wave techniques, assuming that material 2 is the reflecting one, and the XSW is in z. Material and data below surface plane have no meaning and are not evaluated.

MEGASIMPLE
0/1 matindex

Run megasimple calculation according to Bedzyk, X-ray Standing wave techniques, assuming that material 2 is the reflecting one, and the XSW is in z. Only single material is evaluated. Not all the vector commands work properly.

COLLECT
integer 0/1

Collect (or not collect) sums of only some individual material number.

COLLECT_ALL
0/1

Collect all sums.

SCAN_THETA
90.01 91.5 0.01

Do multiple calculation to scan across some theta range, with given step.

STRIP_OUTPUT
0/1

Strip the vacuum from output vtk file (intensity one).

Material table file format and options

Material table file is a plain text file where each line represents one material in the following format:

index material_type (Material string unused_double) / (refractive_index beta unused_double unused_double) where index should match the material index in the geometry .vtk file. Material with zero index is expected to be also outside of the computational domain, usually this is vacuum. Under special circumstances it could be also other material, but this is untested for many algorithms.

Material types can be 0 (then the real and imaginary part of refractive index, density and attenuation coefficient are provided) or 99 followed by material string (eg. Si) and two double values to potentially override density and attenuation coefficient.

input_reference.txt · Last modified: 2020/05/15 11:04 by pklapetek