# -*- coding: utf-8 -*-
"""
Created on Fri Apr 21 12:00:20 2017

linear and logarithmic physical constant and conversion factors cgs units

@author: ishort
"""

import math
import numpy

def c():
    return numpy.double(2.9979249E+10)       #// light speed in vaccuum in cm/s

def sigma():
    return numpy.double(5.670373E-5)   #//Stefan-Boltzmann constant ergs/s/cm^2/K^4
  
def k():
    return numpy.double(1.3806488E-16)          #// Boltzmann constant in ergs/K

def h():
    return numpy.double(6.62606957E-27)         #//Planck's constant in ergs sec

def ee(): 
    return numpy.double(4.80320425E-10)   #//fundamental charge unit in statcoulombs (cgs)

def mE(): 
    return numpy.double(9.10938291E-28)  #//electron mass (g)

def GConst():
    return numpy.double(6.674e-8)         #//Newton's gravitational constant (cgs)

#    //Conversion factors
def amu(): 
    return numpy.double(1.66053892E-24)  #// atomic mass unit in g

def eV(): 
    return numpy.double(1.602176565E-12)  #// eV in ergs

def rSun(): 
    return numpy.double(6.955e10)   #// solar radii to cm

def mSun(): 
    return numpy.double(1.9891e33)  #// solar masses to g

def lSun(): 
    return numpy.double(3.846e33)   #// solar bolometric luminosities to ergs/s

#For planetary transit light curve modelling
    
def rEarth():
    return numpy.double(6.371e8)  # cm

def mEarth():
    return numpy.double(5.972e27)  #g

def AU2cm():
    return numpy.double(1.50e13)  #cm

    

#//Natural logs more useful than base 10 logs - Eg. Formal soln module: 
#// Fundamental constants
def logC(): 
    return numpy.double(math.log(c()))
    
def logSigma(): 
    return numpy.double(math.log(sigma()))
    
def logK():
    return numpy.double(math.log(k()))
    
def logH(): 
    return numpy.double(math.log(h()))
    
def logEe():
    return numpy.double(math.log(ee()))
     #//Named so won't clash with log_10(e)

def logMe(): 
    return numpy.double(math.log(mE()))
        
def logGConst(): 
    return numpy.double(math.log(GConst()))
    
#//Conversion factors
def logAmu(): 
    return numpy.double(math.log(amu()))
    
def logEv():
    return numpy.double(math.log(eV()))
        
def logRSun(): 
    return numpy.double(math.log(rSun()))
    
def logMSun(): 
    return numpy.double(math.log(mSun()))
    
def logLSun(): 
    return numpy.double(math.log(lSun()))

#For planetary transit light curve modelling
    
def logREarth():
    return numpy.double(math.log(rEarth()))

def logMEarth():
    return numpy.double(math.log(mEarth()))

def logAU2cm():
    return numpy.double(math.log(AU2cm()))

