# Path: ptsa/helper.py
# def pol2cart(theta,radius,z=None,radians=True):
#     """Converts corresponding angles (theta), radii, and (optional) height (z)
#     from polar (or, when height is given, cylindrical) coordinates
#     to Cartesian coordinates x, y, and z.
#     Theta is assumed to be in radians, but will be converted
#     from degrees if radians==False."""
#     if radians:
#         x = radius*np.cos(theta)
#         y = radius*np.sin(theta)
#     else:
#         x = radius*np.cos(deg2rad(theta))
#         y = radius*np.sin(deg2rad(theta))
#     if z is not None:
#         # make sure we have a copy
#         z=z.copy()
#         return x,y,z
#     else:
#         return x,y
# 
# def cart2pol(x,y,z=None,radians=True):
#     """Converts corresponding Cartesian coordinates x, y, and (optional) z
#     to polar (or, when z is given, cylindrical) coordinates
#     angle (theta), radius, and z.
#     By default theta is returned in radians, but will be converted
#     to degrees if radians==False."""    
#     if radians:
#         theta = np.arctan2(y,x)
#     else:
#         theta = rad2deg(np.arctan2(y,x))
#     radius = np.hypot(x,y)
#     if z is not None:
#         # make sure we have a copy
#         z=z.copy()
#         return theta,radius,z
#     else:
#         return theta,radius
# 
# def deg2rad(degrees):
#     """Convert degrees to radians."""
#     return degrees/180.*np.math.pi


import numpy as np
import matplotlib.pyplot as plt
from ptsa.helper import pol2cart, cart2pol, deg2rad
from scipy.interpolate import griddata
#emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
#ex: set sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
#   See the COPYING file distributed along with the PTSA package for the
#   copyright and license terms.
#
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##




default_head_props = {'head_linewidth': 3,
                      'head_linecolor': 'black',
                      'nose_linewidth': 2,
                      'ear_linewidth': 2,

# Path: ptsa/helper.py
# def pol2cart(theta,radius,z=None,radians=True):
#     """Converts corresponding angles (theta), radii, and (optional) height (z)
#     from polar (or, when height is given, cylindrical) coordinates
#     to Cartesian coordinates x, y, and z.
#     Theta is assumed to be in radians, but will be converted
#     from degrees if radians==False."""
#     if radians:
#         x = radius*np.cos(theta)
#         y = radius*np.sin(theta)
#     else:
#         x = radius*np.cos(deg2rad(theta))
#         y = radius*np.sin(deg2rad(theta))
#     if z is not None:
#         # make sure we have a copy
#         z=z.copy()
#         return x,y,z
#     else:
#         return x,y
# 
# def cart2pol(x,y,z=None,radians=True):
#     """Converts corresponding Cartesian coordinates x, y, and (optional) z
#     to polar (or, when z is given, cylindrical) coordinates
#     angle (theta), radius, and z.
#     By default theta is returned in radians, but will be converted
#     to degrees if radians==False."""    
#     if radians:
#         theta = np.arctan2(y,x)
#     else:
#         theta = rad2deg(np.arctan2(y,x))
#     radius = np.hypot(x,y)
#     if z is not None:
#         # make sure we have a copy
#         z=z.copy()
#         return theta,radius,z
#     else:
#         return theta,radius
# 
# def deg2rad(degrees):
#     """Convert degrees to radians."""
#     return degrees/180.*np.math.pi


# Path: ptsa/plotting/topo.py
import numpy as np
import matplotlib.pyplot as plt
from ptsa.helper import pol2cart, cart2pol, deg2rad
from scipy.interpolate import griddata

#emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
#ex: set sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
#   See the COPYING file distributed along with the PTSA package for the
#   copyright and license terms.
#
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##




default_head_props = {'head_linewidth': 3,
                      'head_linecolor': 'black',
                      'nose_linewidth': 2,
                      'ear_linewidth': 2,

                     }