<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Astronomical and physics constants in SI units. The constants
available (with approximate values) are:
"""
# This docstring is extended by __init__.py

import numpy as np
from .constant import Constant

# PHYSICAL CONSTANTS

# Planck constant
h = Constant(6.62606957e-34, 0.00000029e-34,
             "Planck constant",
             'CODATA 2010', 'J.s')

# Reduced Planck constant
hbar = Constant(h * 0.5 / np.pi, h.error * 0.5 / np.pi,
                "Reduced Planck constant",
                'CODATA 2010', 'J.s')

# Boltzmann constant
k_B = Constant(1.3806488e-23, 0.0000013e-23,
               "Boltzmann constant",
               'CODATA 2010', 'J/K')

# Speed of light
c = Constant(2.99792458e8, 0.,
             "Speed of light in vacuum",
             'CODATA 2010', 'm/s')

# Gravitional constant
G = Constant(6.67384e-11, 0.00080e-11,
             "Gravitational constant",
             'CODATA 2010', 'm^3/kg/s^2')

# Proton mass
m_p = Constant(1.672621777e-27, 0.000000074e-27,
               "Proton mass",
               'CODATA 2010', 'kg')

# Neutron mass
m_n = Constant(1.674927351e-27, 0.000000074e-27,
               "Neutron mass",
               'CODATA 2010', 'kg')

# Electron mass
m_e = Constant(9.10938291e-31, 0.00000040e-31,
               "Electron mass",
               'CODATA 2010', 'kg')

# Stefan-Boltzmann constant
sigma_sb = Constant(5.670373e-8, 0.000021e-8,
                    "Stefan-Boltzmann constant",
                    'CODATA 2010', 'W/m^2/K^4')

# Electron charge
e = Constant(1.602176565e-19, 0.000000035e-19,
             "Electron charge",
             'CODATA 2010', 'C')

# Avogadro's number
N_A = Constant(6.02214129e23, 0.00000027e23,
               "Avogadro's number",
               'CODATA 2010', '/mol')

# Gas constant
R = Constant(8.3144621, 0.0000075,
             "Gas constant",
             'CODATA 2010', 'J/mol/K')

# Rydberg constant
Ryd = Constant(10973731.568539, 0.000055,
               'Rydberg constant',
               'CODATA 2010', 'm^-1')

# DISTANCE

# Astronomical Unit
au = Constant(1.4959787066e11, 0.00000000005e11,
              "Astronomical Unit",
              "Allen's Astrophysical Quantities 4th Ed.", 'm')

# Parsec
pc = Constant(3.0856776e16, 0.00000005e16,
              "Parsec",
              "Allen's Astrophysical Quantities 4th Ed.", 'm')

# Kiloparsec
kpc = Constant(3.0856776e19, 0.00000005e19,
              "Kiloparsec",
              "Allen's Astrophysical Quantities 4th Ed.", 'm')

# SOLAR QUANTITIES

# Solar luminosity
L_sun = Constant(3.846e26, 0.0005e26,
                 "Solar luminosity",
                 "Allen's Astrophysical Quantities 4th Ed.", 'W')

# Solar mass
M_sun = Constant(1.9891e30, 0.00005e30,
                 "Solar mass",
                 "Allen's Astrophysical Quantities 4th Ed.", 'kg')<commit_msg>Updated value of au constant to exact value adopted by IAU 2012 Resolution B2. Also updated pc to be calculated from exact value of au.<commit_after># Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Astronomical and physics constants in SI units. The constants
available (with approximate values) are:
"""
# This docstring is extended by __init__.py

import numpy as np
from .constant import Constant

# PHYSICAL CONSTANTS

# Planck constant
h = Constant(6.62606957e-34, 0.00000029e-34,
             "Planck constant",
             'CODATA 2010', 'J.s')

# Reduced Planck constant
hbar = Constant(h * 0.5 / np.pi, h.error * 0.5 / np.pi,
                "Reduced Planck constant",
                'CODATA 2010', 'J.s')

# Boltzmann constant
k_B = Constant(1.3806488e-23, 0.0000013e-23,
               "Boltzmann constant",
               'CODATA 2010', 'J/K')

# Speed of light
c = Constant(2.99792458e8, 0.,
             "Speed of light in vacuum",
             'CODATA 2010', 'm/s')

# Gravitional constant
G = Constant(6.67384e-11, 0.00080e-11,
             "Gravitational constant",
             'CODATA 2010', 'm^3/kg/s^2')

# Proton mass
m_p = Constant(1.672621777e-27, 0.000000074e-27,
               "Proton mass",
               'CODATA 2010', 'kg')

# Neutron mass
m_n = Constant(1.674927351e-27, 0.000000074e-27,
               "Neutron mass",
               'CODATA 2010', 'kg')

# Electron mass
m_e = Constant(9.10938291e-31, 0.00000040e-31,
               "Electron mass",
               'CODATA 2010', 'kg')

# Stefan-Boltzmann constant
sigma_sb = Constant(5.670373e-8, 0.000021e-8,
                    "Stefan-Boltzmann constant",
                    'CODATA 2010', 'W/m^2/K^4')

# Electron charge
e = Constant(1.602176565e-19, 0.000000035e-19,
             "Electron charge",
             'CODATA 2010', 'C')

# Avogadro's number
N_A = Constant(6.02214129e23, 0.00000027e23,
               "Avogadro's number",
               'CODATA 2010', '/mol')

# Gas constant
R = Constant(8.3144621, 0.0000075,
             "Gas constant",
             'CODATA 2010', 'J/mol/K')

# Rydberg constant
Ryd = Constant(10973731.568539, 0.000055,
               'Rydberg constant',
               'CODATA 2010', 'm^-1')

# DISTANCE

# Astronomical Unit
au = Constant(1.49597870700e11, 0.0,
              "Astronomical Unit",
              "IAU 2012 Resolution B2", 'm')

# Parsec

pc = Constant(au / np.tan(np.radians(1./3600.)),
              au.error / np.tan(np.radians(1./3600.)),
              "Parsec",
              "Derived from au", 'm')

# Kiloparsec
kpc = Constant(1000. * au / np.tan(np.radians(1./3600.)),
               1000. * au.error / np.tan(np.radians(1./3600.)),
              "Kiloparsec",
              "Derived from au", 'm')

# SOLAR QUANTITIES

# Solar luminosity
L_sun = Constant(3.846e26, 0.0005e26,
                 "Solar luminosity",
                 "Allen's Astrophysical Quantities 4th Ed.", 'W')

# Solar mass
M_sun = Constant(1.9891e30, 0.00005e30,
                 "Solar mass",
                 "Allen's Astrophysical Quantities 4th Ed.", 'kg')
{'fraction_non_alphanumeric': 0.1277020285999335, 'fraction_numerical': 0.13069504489524442, 'mean_word_length': 2.098918083462133, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 9, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4589752', 'n_tokens_mistral': 2632, 'n_tokens_neox': 2046, 'n_words': 512}