Coverage for python/lsst/sims/photUtils/PhysicalParameters.py : 46%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" A class to store physical constants and other immutable parameters used by the sims_photUtils code """
#the quantities below are in nanometers self._minwavelen = 300.0 self._maxwavelen = 1150.0 self._wavelenstep = 0.1
self._lightspeed = 299792458.0 # speed of light, = 2.9979e8 m/s self._planck = 6.626068e-27 # planck's constant, = 6.626068e-27 ergs*seconds self._nm2m = 1.00e-9 # nanometers to meters conversion = 1e-9 m/nm self._ergsetc2jansky = 1.00e23 # erg/cm2/s/Hz to Jansky units (fnu)
def minwavelen(self): """ minimum wavelength in nanometers """ return self._minwavelen
def minwavelen(self, value): raise RuntimeError('Cannot change the value of minwavelen')
def maxwavelen(self): """ maximum wavelength in nanometers """ return self._maxwavelen
def maxwavelen(self, value): raise RuntimeError('Cannot change the value of maxwavelen')
def wavelenstep(self): """ wavelength step in nanometers """ return self._wavelenstep
def wavelenstep(self, value): raise RuntimeError('Cannot change the value of wavelenstep')
def lightspeed(self): """ speed of light in meters per second """ return self._lightspeed
def lightspeed(self, value): raise RuntimeError('Cannot change the value of lightspeed ' + '(Einstein does not approve)')
def nm2m(self): """ conversion factor to go from nm to m """ return self._nm2m
def nm2m(self, value): raise RuntimeError('Cannot change the value of nm2m')
def ergsetc2jansky(self): """ conversion factor to go from ergs/sec/cm^2 to Janskys """ return self._ergsetc2jansky
def ergsetc2jansky(self, value): raise RuntimeError('Cannot change the value of ergsetc2Jansky')
def planck(self): """ Planck's constant in ergs*seconds """ return self._planck
def planck(self, value): raise RuntimeError('Cannot change the value of planck') |