Jpp  debug
the software that should make you happy
get_convergence_angle.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 '''Calculate convergence angle from UTM coordinates in degrees
3 Requires `pip install docopt numpy utm km3astro`
4 
5 Usage:
6  get_convergence_angle.py <easting> <northing> <zone> <letter>
7 
8 Arguments:
9  easting UTM Easting of the site
10  northing UTM Northing of the site
11  zone UTM zone
12  letter UTM letter
13 '''
14 from docopt import docopt
15 from km3astro.coord import convergence_angle
16 import utm
17 import numpy
18 
19 args = docopt(__doc__, version='0.1')
20 easting = args['<easting>']
21 northing = args['<northing>']
22 zone = args['<zone>']
23 letter = args['<letter>']
24 
25 latitude, longitude = utm.to_latlon(float(easting), float(northing), int(zone), letter)
26 conv_angle = convergence_angle(latitude/180.*numpy.pi,longitude/180.*numpy.pi)*180./numpy.pi
27 print("lat, long", latitude, longitude)
28 print("convergence angle",conv_angle)
std::ostream & print(std::ostream &out, const JTestSummary &summary, const char delimiter=' ', const bool useColors=true)
Print test summary.