from PyARTS import arts_geometry
from PyARTS import arts
from PyARTS import artsXML
from PyARTS import arts_types
import unittest
from scipy import *


#class two_points2LOSTest(unittest.TestCase):
#    def testAccuracy(self):
#        """two_points2LOS should return the los for an ARTS
#        propagation path"""
#        rte_los={'za':150,'aa':130}
#        lat_grid=artsXML.load('../data/lat_grid.xml')
#        lon_grid=artsXML.load('../data/lon_grid.xml')
#        rte_pos={'r_or_z':100e3+arts_geometry.EARTH_RADIUS,
#                 'lat':0.5*(lat_grid[0]+lat_grid[-1]),
#                 'lon':0.5*(lon_grid[0]+lon_grid[-1])}
#        ppath=arts.ppathCalc({'p_grid':'../data/p_grid.xml',
#                              'lat_grid':'../data/lat_grid.xml',
#                              'lon_grid':'../data/lon_grid.xml',
#                              'atm_basename':'../data/tropical',
#                              'abs_species':arts_types.AbsSpecies(O3=None),
#                              'z_surface':500,
#                              'r_geoid':arts_geometry.EARTH_RADIUS,
#                              'rte_los':rte_los,
#                              'rte_pos':rte_pos})
#        
#        sensor_pos=atleast_2d(array((rte_pos['r_or_z'],rte_pos['lat'],rte_pos['lon'])))
#        other_pos=atleast_2d(ppath['PropagationPathPointPositions'][-1,:])
#        los=arts_geometry.two_points2LOS(sensor_pos,other_pos)
#        assert(abs(los[0,0]-rte_los['za'])<0.001),'zenith angles are different'
#        assert(abs(los[0,1]-rte_los['aa'])<0.001),'azimuth angles are different'
        
        
                              

        
if __name__=='__main__':
    unittest.main()
