File: lsconstants.h

package info (click to toggle)
healpix-cxx 3.50.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 3,008 kB
  • sloc: cpp: 13,882; ansic: 5,930; sh: 4,451; makefile: 216
file content (93 lines) | stat: -rw-r--r-- 2,982 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
 *  This file is part of libcxxsupport.
 *
 *  libcxxsupport is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  libcxxsupport is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with libcxxsupport; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

/*
 *  libcxxsupport is being developed at the Max-Planck-Institut fuer Astrophysik
 *  and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt
 *  (DLR).
 */

/*! \file lsconstants.h
 *  Mathematical, physical and technical constants for LevelS.
 */

#ifndef PLANCK_CONSTANTS_H
#define PLANCK_CONSTANTS_H

/*! \defgroup mathconstgroup Mathematical constants */
/*! \{ */

const double pi=3.141592653589793238462643383279502884197;
const double twopi=6.283185307179586476925286766559005768394;
const double inv_twopi=1.0/twopi;
const double fourpi=12.56637061435917295385057353311801153679;
const double halfpi=1.570796326794896619231321691639751442099;
const double inv_halfpi=0.6366197723675813430755350534900574;
const double inv_sqrt4pi = 0.2820947917738781434740397257803862929220;

const double ln2 = 0.6931471805599453094172321214581766;
const double inv_ln2 = 1.4426950408889634073599246810018921;
const double ln10 = 2.3025850929940456840179914546843642;

const double onethird=1.0/3.0;
const double twothird=2.0/3.0;
const double fourthird=4.0/3.0;

const double degr2rad=pi/180.0;
const double arcmin2rad=degr2rad/60;
const double rad2degr=180.0/pi;

//! Ratio between FWHM and sigma of a Gauss curve (\f$\sqrt{8\ln2}\f$).
const double sigma2fwhm=2.3548200450309493; // sqrt(8*log(2.))
const double fwhm2sigma=1/sigma2fwhm;

/*! \} */

/*! \defgroup physconstgroup Physical constants */
/*! \{ */

const double Jansky2SI=1.0e-26;
const double SI2Jansky=1.0e+26;

//! Light speed in m/s (CODATA 2006)
const double speedOfLight=2.99792458e8;

//! Boltzmann's constant in J/K (CODATA 2006)
const double kBoltzmann=1.3806504e-23;

//! Stefan-Boltzmann constant in W/m^2/K^4 (CODATA 2006)
const double sigmaStefanBoltzmann=5.6704e-8;

//! Planck's constant in J s (CODATA 2006)
const double hPlanck=6.62606896e-34;

//! Astronomical unit in m
const double astronomicalUnit=1.49597870691e11;

//! Solar constant in W/m^2
const double solarConstant=1368.0;

//! Average CMB temperature in K (Fixsen, ApJ 709 (2009), arXiv:0911.1955)
const double tcmb = 2.72548;

//! offset (in seconds) between Jan 1, 1958 and Jan 1, 1970
const double sec_58_70 = 378691200.;

/*! \} */

#endif