McStas logo McStas - A neutron ray-trace simulation package ILL; PSI; ESS Niels Bohr Institute DTU Physics

McStas

About McStas
 Conditions of use
 Authors/Contacts
 Project funding

Download
 Components
 Other Downloads (share)

Mailing list

Search web/mailinglist

Documentation
 Wiki (GitHub)
 McStas manual
 Publications

Links

Report bugs (GitHub)

Code-repository (GitHub)


Constants for unit conversion etc.

B.6  Constants for unit conversion etc.

The following predefined constants are useful for conversion between units





Name Value

Conversion from

Conversion to





DEG2RAD \(2 \pi / 360\)

Degrees

Radians

RAD2DEG \(360 / (2 \pi )\)

Radians

Degrees

MIN2RAD \(2 \pi / (360 \cdot 60)\)

Minutes of arc

Radians

RAD2MIN \((360\cdot 60) / (2 \pi )\)

Radians

Minutes of arc

V2K \(10^{-10} \cdot m_\mathrm {N}/\hbar \)

Velocity (m/s)

k-vector (Å\(^{-1}\))

K2V \(10^{10} \cdot \hbar / m_\mathrm {N}\)

k-vector (Å\(^{-1}\))

Velocity (m/s)

VS2E \(m_\mathrm {N} / (2 e)\)

Velocity squared (m\(^2\) s\(^{-2}\))

Neutron energy (meV)

SE2V \(\sqrt {2 e/m_\mathrm {N}}\)

Square root of neutron energy (meV\(^{1/2}\))

Velocity (m/s)

FWHM2RMS \(1/\sqrt {8\log (2)}\)

Full width half maximum

Root mean square (standard deviation)

RMS2FWHM \(\sqrt {8\log (2)}\)

Root mean square (standard deviation)

Full width half maximum

MNEUTRON \(1.67492 \cdot 10^{-27}\) kg

Neutron mass, \(m_\mathrm {n}\)

HBAR \(1.05459 \cdot 10^{-34}\) Js

Planck constant, \(\hbar \)

PI \(3.14159265...\)

\(\pi \)

FLT_MAX 3.40282347E+38F

a big float value






Last Modified: Tuesday, 06-Oct-2026 21:19:11 CEST
Search website mailinglist archive GitHub repos