Debian Codegraph @

cextern/healpix/src/cxx/cxxsupport/lsconstants.h

raw
1 /*
2 * This file is part of libcxxsupport.
3 *
4 * libcxxsupport is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * libcxxsupport is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with libcxxsupport; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19 /*
20 * libcxxsupport is being developed at the Max-Planck-Institut fuer Astrophysik
21 * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt
22 * (DLR).
23 */
24
25 /*! \file lsconstants.h
26 * Mathematical, physical and technical constants for LevelS.
27 */
28
29 #ifndef PLANCK_CONSTANTS_H
30 #define PLANCK_CONSTANTS_H
31
32 /*! \defgroup mathconstgroup Mathematical constants */
33 /*! \{ */
34
35 const double pi=3.141592653589793238462643383279502884197;
36 const double twopi=6.283185307179586476925286766559005768394;
37 const double inv_twopi=1.0/twopi;
38 const double fourpi=12.56637061435917295385057353311801153679;
39 const double halfpi=1.570796326794896619231321691639751442099;
40 const double inv_halfpi=0.6366197723675813430755350534900574;
41 const double inv_sqrt4pi = 0.2820947917738781434740397257803862929220;
42
43 const double ln2 = 0.6931471805599453094172321214581766;
44 const double inv_ln2 = 1.4426950408889634073599246810018921;
45 const double ln10 = 2.3025850929940456840179914546843642;
46
47 const double onethird=1.0/3.0;
48 const double twothird=2.0/3.0;
49 const double fourthird=4.0/3.0;
50
51 const double degr2rad=pi/180.0;
52 const double arcmin2rad=degr2rad/60;
53 const double rad2degr=180.0/pi;
54
55 //! Ratio between FWHM and sigma of a Gauss curve (\f$\sqrt{8\ln2}\f$).
56 const double sigma2fwhm=2.3548200450309493; // sqrt(8*log(2.))
57 const double fwhm2sigma=1/sigma2fwhm;
58
59 /*! \} */
60
61 /*! \defgroup physconstgroup Physical constants */
62 /*! \{ */
63
64 const double Jansky2SI=1.0e-26;
65 const double SI2Jansky=1.0e+26;
66
67 //! Light speed in m/s (CODATA 2006)
68 const double speedOfLight=2.99792458e8;
69
70 //! Boltzmann's constant in J/K (CODATA 2006)
71 const double kBoltzmann=1.3806504e-23;
72
73 //! Stefan-Boltzmann constant in W/m^2/K^4 (CODATA 2006)
74 const double sigmaStefanBoltzmann=5.6704e-8;
75
76 //! Planck's constant in J s (CODATA 2006)
77 const double hPlanck=6.62606896e-34;
78
79 //! Astronomical unit in m
80 const double astronomicalUnit=1.49597870691e11;
81
82 //! Solar constant in W/m^2
83 const double solarConstant=1368.0;
84
85 //! Average CMB temperature in K (Fixsen, ApJ 709 (2009), arXiv:0911.1955)
86 const double tcmb = 2.72548;
87
88 //! offset (in seconds) between Jan 1, 1958 and Jan 1, 1970
89 const double sec_58_70 = 378691200.;
90
91 /*! \} */
92
93 #endif