Jpp 19.3.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
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
3Requires `pip install docopt numpy utm km3astro`
4
5Usage:
6 get_convergence_angle.py <easting> <northing> <zone> <letter>
7
8Arguments:
9 easting UTM Easting of the site
10 northing UTM Northing of the site
11 zone UTM zone
12 letter UTM letter
13'''
14from docopt import docopt
15from km3astro.coord import convergence_angle
16import utm
17import numpy
18
19args = docopt(__doc__, version='0.1')
20easting = args['<easting>']
21northing = args['<northing>']
22zone = args['<zone>']
23letter = args['<letter>']
24
25latitude, longitude = utm.to_latlon(float(easting), float(northing), int(zone), letter)
26conv_angle = convergence_angle(latitude/180.*numpy.pi,longitude/180.*numpy.pi)*180./numpy.pi
27print("lat, long", latitude, longitude)
28print("convergence angle",conv_angle)
void print(const TH1 &h1, std::ostream &out)
Print histogram parameters.