Example #1
0
 def sanity_compAirmasses(self):
   """
     Compare different airmass calculations
   """
   from PyAstronomy import pyasl
   for za in range(0,70,10):
     ampp = pyasl.airmassPP(za)
     amsp = pyasl.airmassSpherical(za, 0.0)
     self.assertAlmostEqual(ampp/amsp, 1.0, delta=0.01)
Example #2
0
 def sanity_airmassSphericalExample(self):
   """
     Example airmass spherical, homogeneous atmosphere.
   """
   from PyAstronomy import pyasl
   
   obsAlt = 2400.0
   
   for za in range(0,90,10):
     print "Zenith angle: %2d, airmass = %7.2f" % \
       (za, pyasl.airmassSpherical(za, obsAlt))
Example #3
0
def BSC_extinction(BSCatalogue, ObsAlt=0, A_V_zenith=0.2, Hatm=8):
    '''
    Учёт поглощения в модели атмосферы в виде сферического слоя над Землёй. 
    '''
    BSCatalogue.add_column(
        Column(np.zeros(len(BSCatalogue))), name='vmag_atmosph')
    for i in BSCatalogue:
        zenith_angle = 90 - i['alt']
        airmass = pyasl.airmassSpherical(zenith_angle, ObsAlt, yatm=Hatm)
        ext = A_V_zenith * airmass
        i['vmag_atmosph'] = i['vmag'] + ext
    return BSCatalogue