Home > Applications > SpinW > m_files > sw_converter.m

iFit/sw_converter

PURPOSE ^

converts energy and momentum units for a given particle

SYNOPSIS ^

function out = sw_converter(value, unitIn, unitOut, particleName)

DESCRIPTION ^

 converts energy and momentum units for a given particle

 out = SW_CONVERTER(value, unitIn, unitOut, {particleName}) 

 Input:

 particleName      Name of the particle:
                       'neutron'   default
                       'proton'
                       'electron'
                       'photon'
 value             Numerical input value, can be arbitrary matrix.
 unitIn            Units of the input value:
                       'A-1'       momentum in Angstrom^-1.
                       'k'         -||-
                       'Angstrom'  wavelength in Angstrom.
                       'lambda'    -||-
                       'A'         -||-
                       'Kelvin'    temperature in Kelvin.
                       'K'         -||-
                       'mps'       speed in m/s.
                       'meV'       energy in meV.
                       'THz'       frequency in Thz.
                       'cm-1'      2*pi/lambda in cm^-1.
                       'eV'        energy in eV.
                       'fs'        wave period time in fs.
                       'ps'        wave period time in ps.
                       'nm'        wavelength in nm.
                       'um'        wavelength in um.
 unitOut           Units of the output value, same options as for unitIn.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Mon 26-Nov-2018 15:08:42 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1