Table of Contents
Calculates the scattering & transmission for a given sample material and size over a given wavelength range.
Name | Direction | Type | Default | Description |
---|---|---|---|---|
WavelengthRange | Input | string | Mandatory | Wavelength range to calculate transmission for. |
ChemicalFormula | Input | string | Mandatory | Sample chemical formula |
DensityType | Input | string | Mass Density | Use of Mass density or Number density. Allowed values: [‘Mass Density’, ‘Number Density’] |
Density | Input | number | 0.1 | Mass density (g/cm^3) or Number density (atoms/Angstrom^3). Default=0.1 |
Thickness | Input | number | 0.1 | Sample thickness (cm). Default=0.1 |
OutputWorkspace | Output | MatrixWorkspace | Mandatory | Outputs the sample transmission over the wavelength range as a function of wavelength. |
Calculates the theoretical scattering & transmission for a given sample over a given wavelength range.
The sample chemical formula is input for the SetSampleMaterial algorithm to calculate the cross-sections. The sample mass density/number density & thickness is input to then calculate the percentage scattering & transmission.
A flat plate sample which is perpendicular to the beam is assumed.
Example - Running CalculateSampleTransmission.
ws = CalculateSampleTransmission(WavelengthRange='2.0, 0.1, 10.0',
ChemicalFormula='H2-O')
print 'Transmission: %f, %f, %f ...' % tuple(ws.readY(0)[:3])
print 'Scattering: %f, %f, %f ...' % tuple(ws.readY(1)[:3])
Output:
Transmission: 0.981276, 0.981268, 0.981261 ...
Scattering: 0.018575, 0.018575, 0.018575 ...
Example - Running CalculateSampleTransmission with a specified number density and thickness.
ws = CalculateSampleTransmission(WavelengthRange='2.0, 0.1, 10.0',
ChemicalFormula='H2-O',
DensityType='Number Density',
Density=0.2,
Thickness=0.58)
print 'Transmission: %f, %f, %f ...' % tuple(ws.readY(0)[:3])
print 'Scattering: %f, %f, %f ...' % tuple(ws.readY(1)[:3])
Output:
Transmission: 0.001417, 0.001413, 0.001410 ...
Scattering: 0.998506, 0.998506, 0.998506 ...
Categories: Algorithms | Sample