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 |
NumberDensity | Input | number | 0.1 | Number denisty per atom (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 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.568102, 0.567976, 0.567851 ...
Scattering: 0.429309, 0.429309, 0.429309 ...
Example - Running CalculateSampleTransmission with a specified number density and thickness.
ws = CalculateSampleTransmission(WavelengthRange='2.0, 0.1, 10.0',
ChemicalFormula='H2-O',
NumberDensity=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