public class ReflectivityCalculator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
maxPoints
The maximum number of points used by the convolution routine.
|
static int |
maxRoughSize
The maximum number of layers of roughness that can be created when
generating the interfacial profile.
|
Constructor and Description |
---|
ReflectivityCalculator() |
Modifier and Type | Method and Description |
---|---|
void |
convolute(double[] waveVector,
double deltaQ0,
double deltaQ1ByQ,
double wavelength,
int numPoints,
int numLowPoints,
int numHighPoints,
double[] refFit)
This operation convolutes the data in refFit with a Gaussian resolution
function in q, calculated from theta, delThe, and delLamOLam.
|
double[] |
convoluteReflectivity(double deltaQ0,
double deltaQ1ByQ,
double wavelength,
boolean getRQ4,
double[] waveVector,
Tile[] tiles)
This operation computes the convolution of the reflectivity with a
variable Gaussian resolution function.
|
Tile[] |
generateTiles(Slab[] slabs,
int numRough,
double[] zInt,
double[] rufInt)
This operation generates a list of Tiles from the slabs with the
corresponding number of ordinate steps.
|
int |
getHighExtensionLength(double[] waveVector,
double deltaQ0,
double deltaQ1ByQ,
int numPoints)
This operation calculates the length of the high-Q extension of the data
to be convoluted with the delt-Q full-width half-maximum Gaussian
resolution function.
|
void |
getInterfacialProfile(int numRough,
double[] zInt,
double[] rufInt)
This operation generates the interfacial profile using an error function
of numRough ordinate steps based on those of the hyperbolic tangent.
|
int |
getLowExtensionLength(double[] waveVector,
double deltaQ0,
double deltaQ1ByQ,
int numPoints)
This operation calculates the length of the low-Q extension of the data
to be convoluted with the delt-Q full-width half-maximum Gaussian
resolution function.
|
double |
getModSqrdSpecRef(double waveVectorQ,
double wavelength,
Tile[] tiles)
This operation returns the value of the squared modulus of the specular
reflectivity for a single wave vector Q.
|
ReflectivityProfile |
getReflectivityProfile(Slab[] slabs,
int numRough,
double deltaQ0,
double deltaQ1ByQ,
double wavelength,
double[] waveVector,
boolean getRQ4)
This operation returns the reflectivity profile for the given wave vector
and set of slabs that define the material.
|
ScatteringDensityProfile |
getScatteringDensityProfile(Tile[] tiles)
This operation computes the neutron scattering density profile for a set
of tiles.
|
public static final int maxPoints
public static final int maxRoughSize
public double getModSqrdSpecRef(double waveVectorQ, double wavelength, Tile[] tiles)
waveVectorQ
- the value of the wave vectorwavelength
- the wavelength of the incident neutronstiles
- the list of Tiles that contains the physical parameters needed
for the calculation, including the scattering densities,
absorption parameters and thicknesses.public void convolute(double[] waveVector, double deltaQ0, double deltaQ1ByQ, double wavelength, int numPoints, int numLowPoints, int numHighPoints, double[] refFit)
waveVector
- the wave vector (Q) plus additional space for the convolution.
This array should have length = numPoints + numLowPoints.deltaQ0
- the zeroth order term of a Taylor expansion of the
reflectometer resolution function dQ = dQ_0 + (dQ/Q)_1 x Q +
...deltaQ1ByQ
- the zeroth order term of the Q resolution Taylor expansionwavelength
- the wavelength of the incident neutronsnumPoints
- the number of points in the wave vectornumLowPoints
- the number of points in the low-Q extension to q used for
convolution of the data with the resolution function. Returned
by ExtResFixedLambda.numHighPoints
- the number of points in the high-Q extension to q used for
convolution of the data with the resolution function. Returned
by ExtResFixedLambda.refFit
- OUTPUT - the specular reflectivity values for each Q in q
convoluted with instrumental resolution.public int getLowExtensionLength(double[] waveVector, double deltaQ0, double deltaQ1ByQ, int numPoints)
waveVector
- the wave vector (Q) plus additional space for the convolution.
This array should have length = numPoints + numLowPoints.deltaQ0
- the zeroth order term of a Taylor expansion of the
reflectometer resolution function dQ = dQ_0 + (dQ/Q)_1 x Q +
...deltaQ1ByQ
- the zeroth order term of the Q resolution Taylor expansionnumPoints
- the number of points in the wave vectorpublic int getHighExtensionLength(double[] waveVector, double deltaQ0, double deltaQ1ByQ, int numPoints)
waveVector
- the wave vector (Q) plus additional space for the convolution.
This array should have length = numPoints + numLowPoints.deltaQ0
- the zeroth order term of a Taylor expansion of the
reflectometer resolution function dQ = dQ_0 + (dQ/Q)_1 x Q +
...deltaQ1ByQ
- the zeroth order term of the Q resolution Taylor expansionnumPoints
- the number of points in the wave vectorpublic void getInterfacialProfile(int numRough, double[] zInt, double[] rufInt) throws org.apache.commons.math.MathException
numRough
- the number of ordinate stepszInt
- FIXME! This array must be preallocated with a size n =
maxRoughSize.rufInt
- FIXME! This array must be preallocated with a size n =
maxRoughSize.org.apache.commons.math.MathException
- Thrown if the error function cannot be calculatedpublic Tile[] generateTiles(Slab[] slabs, int numRough, double[] zInt, double[] rufInt) throws org.apache.commons.math.MathException
slabs
- the slabs of materials that define the systemnumRough
- the number of ordinate stepszInt
- FIXME! This array must be preallocated with a size n =
maxRoughSize.rufInt
- FIXME! This array must be preallocated with a size n =
maxRoughSize.org.apache.commons.math.MathException
- Thrown if the error function cannot be calculatedpublic double[] convoluteReflectivity(double deltaQ0, double deltaQ1ByQ, double wavelength, boolean getRQ4, double[] waveVector, Tile[] tiles)
deltaQ0
- - FIXME!deltaQ1ByQ
- - FIXME!wavelength
- - FIXME!getRQ4
- - FIXME! True if the routine should compute rq^4, false
otherwise.waveVector
- The wave vector - FIXME!tiles
- The tiles that define the layered structure of the materials.public ScatteringDensityProfile getScatteringDensityProfile(Tile[] tiles)
tiles
- the set of tiles that define the materialpublic ReflectivityProfile getReflectivityProfile(Slab[] slabs, int numRough, double deltaQ0, double deltaQ1ByQ, double wavelength, double[] waveVector, boolean getRQ4)
slabs
- the slabs that define the materialnumRough
- the number of layers of roughnessdeltaQ0
- FIXME!deltaQ1ByQ
- FIXME!wavelength
- FIXME!waveVector
- the wave vectorgetRQ4
- true if the RQ^4 should be calculated, false otherwise