Python math.atan() Examples

The following are 30 code examples for showing how to use math.atan(). These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.

You may check out the related API usage on the sidebar.

You may also want to check out all available functions/classes of the module math , or try the search function .

Example 1
Project: indras_net   Author: gcallah   File: epidemic.py    License: GNU General Public License v3.0 6 votes vote down vote up
def opposing_angle(pos1, pos2):
    '''
    Returns the angle of the other_agent relative to the agent
    '''
    x_dif = pos2[0] - pos1[0]
    y_dif = pos2[1] - pos1[1]
    if (x_dif != 0 and y_dif != 0):
        if (x_dif > 0):
            new_angle = 180 + degrees(atan(y_dif / x_dif))
        else:
            new_angle = degrees(atan(y_dif / x_dif))
    elif (y_dif != 0):
        if(y_dif > 0):
            new_angle = 270
        else:
            new_angle = 90
    else:
        if(x_dif > 0):
            new_angle = 180
        else:
            new_angle = 0
    return new_angle 
Example 2
Project: soccer-matlab   Author: utra-robosoccer   File: pointCloudFromCameraImage.py    License: BSD 2-Clause "Simplified" License 6 votes vote down vote up
def getRayFromTo(mouseX,mouseY):
        width, height, viewMat, projMat, cameraUp, camForward, horizon,vertical, _,_,dist, camTarget = p.getDebugVisualizerCamera()
        camPos = [camTarget[0] - dist*camForward[0],camTarget[1] - dist*camForward[1],camTarget[2] - dist*camForward[2]]
        farPlane = 10000
        rayForward = [(camTarget[0]-camPos[0]),(camTarget[1]-camPos[1]),(camTarget[2]-camPos[2])]
        lenFwd = math.sqrt(rayForward[0]*rayForward[0]+rayForward[1]*rayForward[1]+rayForward[2]*rayForward[2])
        invLen = farPlane*1./lenFwd
        rayForward = [invLen*rayForward[0],invLen*rayForward[1],invLen*rayForward[2]]
        rayFrom = camPos
        oneOverWidth = float(1)/float(width)
        oneOverHeight = float(1)/float(height)

        dHor = [horizon[0] * oneOverWidth,horizon[1] * oneOverWidth,horizon[2] * oneOverWidth]
        dVer = [vertical[0] * oneOverHeight,vertical[1] * oneOverHeight,vertical[2] * oneOverHeight]
        rayToCenter=[rayFrom[0]+rayForward[0],rayFrom[1]+rayForward[1],rayFrom[2]+rayForward[2]]
        ortho=[- 0.5 * horizon[0] + 0.5 * vertical[0]+float(mouseX)*dHor[0]-float(mouseY)*dVer[0],
             - 0.5 * horizon[1] + 0.5 * vertical[1]+float(mouseX)*dHor[1]-float(mouseY)*dVer[1],
             - 0.5 * horizon[2] + 0.5 * vertical[2]+float(mouseX)*dHor[2]-float(mouseY)*dVer[2]]

        rayTo = [rayFrom[0]+rayForward[0]  +ortho[0],
                                        rayFrom[1]+rayForward[1]  +ortho[1],
                                        rayFrom[2]+rayForward[2]  +ortho[2]]
        lenOrtho = math.sqrt(ortho[0]*ortho[0]+ortho[1]*ortho[1]+ortho[2]*ortho[2])
        alpha = math.atan(lenOrtho/farPlane)
        return rayFrom,rayTo, alpha 
Example 3
Project: Localization   Author: kamalshadi   File: geometry.py    License: MIT License 6 votes vote down vote up
def c2s(self):
        R = self.dist(point(0, 0, 0))
        lg = math.atan(self.y / self.x)
        lat = acos(self.z / R)
        return (lg, lat, R)

    # ~ def transform(self,p1,p2):
    # ~ if isinstance(p2,point):
    # ~ v=vec(p1,p2)
    # ~ rot=v.angle()
    # ~ return self.transform(p1,rot)
    # ~ else:
    # ~ temp=self-p1
    # ~ rot=p2
    # ~ px=math.cos(rot)*temp.x+math.sin(rot)*temp.y
    # ~ py=-math.sin(rot)*temp.x+math.cos(rot)*temp.y
    # ~ return point(px,py) 
Example 4
Project: Arnold-For-Blender   Author: griffin-copperfield   File: __init__.py    License: GNU General Public License v3.0 6 votes vote down vote up
def _view_update_camera(aspect, v3d, rv3d, camera):
    zoom = rv3d.view_camera_zoom
    z = ((_SQRT2 + zoom / 50) ** 2) / 4

    cdata = v3d.camera.data
    fit = cdata.sensor_fit
    if fit == 'VERTICAL':
        sensor = cdata.sensor_height
        _sensor = (16 * sensor / 9) / z  # sensor / (18 / 32)
        z *= 9 / 16  # 18 / 32
    else:
        sensor = cdata.sensor_width
        _sensor = sensor / z
    lens = cdata.lens
    camera['fov'] = ('FLOAT', math.degrees(2 * math.atan(_sensor / (2 * lens))))

    offset_x, offset_y = rv3d.view_camera_offset
    shift_x = cdata.shift_x
    shift_y = cdata.shift_y
    shx = 2 * z * (2 * offset_x + shift_x)
    shy = 2 * z * (2 * offset_y + shift_y * aspect)
    camera['screen_window_min'] = ('VECTOR2', (-1, -1))
    camera['screen_window_max'] = ('VECTOR2', (1, 1))

    return (zoom, fit, sensor, lens, offset_x, offset_y, shift_x, shift_y) 
Example 5
Project: GTDWeb   Author: lanbing510   File: zoom.py    License: GNU General Public License v2.0 6 votes vote down vote up
def pixel_to_lonlat(self, px, zoom):
        "Converts a pixel to a longitude, latitude pair at the given zoom level."
        if len(px) != 2:
            raise TypeError('Pixel should be a sequence of two elements.')

        # Getting the number of pixels for the given zoom level.
        npix = self._npix[zoom]

        # Calculating the longitude value, using the degrees per pixel.
        lon = (px[0] - npix) / self._degpp[zoom]

        # Calculating the latitude value.
        lat = RTOD * (2 * atan(exp((px[1] - npix) / (-1.0 * self._radpp[zoom]))) - 0.5 * pi)

        # Returning the longitude, latitude coordinate pair.
        return (lon, lat) 
Example 6
Project: Reinforcement-Learning-for-Self-Driving-Cars   Author: songyanho   File: gauge.py    License: Apache License 2.0 6 votes vote down vote up
def _thick_line(self, start_point, end_point, fill, thickness):
        """Draws a line using polygons to give it a thickness"""

        if thickness == 1:
            self.line((start_point, end_point), fill=fill)
        else:
            # Angle of the line
            if end_point[0] == start_point[0]:
                # Catch a division by zero error
                a = math.pi / 2
            else:
                a = math.atan((end_point[1] - start_point[1]) / (end_point[0] - start_point[0]))

            sin = math.sin(a)
            cos = math.cos(a)
            xdelta = sin * thickness / 2.0
            ydelta = cos * thickness / 2.0

            points = ((start_point[0] - xdelta, start_point[1] + ydelta),
                      (start_point[0] + xdelta, start_point[1] - ydelta),
                      (end_point[0] + xdelta, end_point[1] - ydelta),
                      (end_point[0] - xdelta, end_point[1] + ydelta))

            self.polygon(points, fill=fill) 
Example 7
Project: scenario_runner   Author: carla-simulator   File: route_manipulation.py    License: MIT License 6 votes vote down vote up
def _location_to_gps(lat_ref, lon_ref, location):
    """
    Convert from world coordinates to GPS coordinates
    :param lat_ref: latitude reference for the current map
    :param lon_ref: longitude reference for the current map
    :param location: location to translate
    :return: dictionary with lat, lon and height
    """

    EARTH_RADIUS_EQUA = 6378137.0   # pylint: disable=invalid-name
    scale = math.cos(lat_ref * math.pi / 180.0)
    mx = scale * lon_ref * math.pi * EARTH_RADIUS_EQUA / 180.0
    my = scale * EARTH_RADIUS_EQUA * math.log(math.tan((90.0 + lat_ref) * math.pi / 360.0))
    mx += location.x
    my -= location.y

    lon = mx * 180.0 / (math.pi * EARTH_RADIUS_EQUA * scale)
    lat = 360.0 * math.atan(math.exp(my / (EARTH_RADIUS_EQUA * scale))) / math.pi - 90.0
    z = location.z

    return {'lat': lat, 'lon': lon, 'z': z} 
Example 8
Project: pyth   Author: isaacg1   File: macros.py    License: MIT License 6 votes vote down vote up
def trig(a, b=' '):
    if is_num(a) and isinstance(b, int):

        funcs = [math.sin, math.cos, math.tan,
                 math.asin, math.acos, math.atan,
                 math.degrees, math.radians,
                 math.sinh, math.cosh, math.tanh,
                 math.asinh, math.acosh, math.atanh]

        return funcs[b](a)

    if is_lst(a):
        width = max(len(row) for row in a)
        padded_matrix = [list(row) + (width - len(row)) * [b] for row in a]
        transpose = list(zip(*padded_matrix))
        if all(isinstance(row, str) for row in a) and isinstance(b, str):
            normalizer = ''.join
        else:
            normalizer = list
        norm_trans = [normalizer(padded_row) for padded_row in transpose]
        return norm_trans
    return unknown_types(trig, ".t", a, b) 
Example 9
Project: kotori   Author: daq-tools   File: geo.py    License: GNU Affero General Public License v3.0 6 votes vote down vote up
def turn_xyz_into_llh(x,y,z,system):
	"""Convert 3D Cartesian x,y,z into Lat, Long and Height
       See http://www.ordnancesurvey.co.uk/gps/docs/convertingcoordinates3D.pdf"""

	a = abe_values[system][0]
	b = abe_values[system][1]
	e2 = abe_values[system][2]

	p = math.sqrt(x*x + y*y)

	long = math.atan(y/x)
	lat_init = math.atan( z / (p * (1.0 - e2)) )
	v = a / math.sqrt( 1.0 - e2 * (math.sin(lat_init) * math.sin(lat_init)) )
	lat = math.atan( (z + e2*v*math.sin(lat_init)) / p )

	height = (p / math.cos(lat)) - v # Ignore if a bit out

	# Turn from radians back into degrees
	long = long / 2 / math.pi * 360
	lat = lat / 2 / math.pi * 360

	return [lat,long,height] 
Example 10
Project: orbit-predictor   Author: satellogic   File: coordinate_systems.py    License: MIT License 6 votes vote down vote up
def ecef_to_llh(ecef_km):
    # WGS-84 ellipsoid parameters */
    a = 6378.1370
    b = 6356.752314

    p = sqrt(ecef_km[0] ** 2 + ecef_km[1] ** 2)
    thet = atan(ecef_km[2] * a / (p * b))
    esq = 1.0 - (b / a) ** 2
    epsq = (a / b) ** 2 - 1.0

    lat = atan((ecef_km[2] + epsq * b * sin(thet) ** 3) / (p - esq * a * cos(thet) ** 3))
    lon = atan2(ecef_km[1], ecef_km[0])
    n = a * a / sqrt(a * a * cos(lat) ** 2 + b ** 2 * sin(lat) ** 2)
    h = p / cos(lat) - n

    lat = degrees(lat)
    lon = degrees(lon)
    return lat, lon, h 
Example 11
Project: orbit-predictor   Author: satellogic   File: angles.py    License: MIT License 6 votes vote down vote up
def ta_to_E(ta, ecc):
    """Eccentric anomaly from true anomaly.

    Parameters
    ----------
    ta : float
        True anomaly (rad).
    ecc : float
        Eccentricity.

    Returns
    -------
    E : float
        Eccentric anomaly.

    """
    E = 2 * atan(sqrt((1 - ecc) / (1 + ecc)) * tan(ta / 2))
    return E 
Example 12
Project: orbit-predictor   Author: satellogic   File: angles.py    License: MIT License 6 votes vote down vote up
def E_to_ta(E, ecc):
    """True anomaly from eccentric anomaly.

    Parameters
    ----------
    E : float
        Eccentric anomaly (rad).
    ecc : float
        Eccentricity.

    Returns
    -------
    ta : float
        True anomaly (rad).

    """
    ta = 2 * atan(sqrt((1 + ecc) / (1 - ecc)) * tan(E / 2))
    return ta 
Example 13
Project: ALPR-Indonesia   Author: muchlisinadi   File: DetectChars.py    License: MIT License 6 votes vote down vote up
def angleBetweenChars(firstChar, secondChar):
    fltAdj = float(abs(firstChar.intCenterX - secondChar.intCenterX))
    fltOpp = float(abs(firstChar.intCenterY - secondChar.intCenterY))

    if fltAdj != 0.0:                           # check to make sure we do not divide by zero if the center X positions are equal, float division by zero will cause a crash in Python
        fltAngleInRad = math.atan(fltOpp / fltAdj)      # if adjacent is not zero, calculate angle
    else:
        fltAngleInRad = 1.5708                          # if adjacent is zero, use this as the angle, this is to be consistent with the C++ version of this program
    # end if

    fltAngleInDeg = fltAngleInRad * (180.0 / math.pi)       # calculate angle in degrees

    return fltAngleInDeg
# end function

###################################################################################################
# if we have two chars overlapping or to close to each other to possibly be separate chars, remove the inner (smaller) char,
# this is to prevent including the same char twice if two contours are found for the same char,
# for example for the letter 'O' both the inner ring and the outer ring may be found as contours, but we should only include the char once 
Example 14
Project: pyvisgraph   Author: TaipanRex   File: visible_vertices.py    License: MIT License 6 votes vote down vote up
def angle(center, point):
    """Return the angle (radian) of point from center of the radian circle.
     ------p
     |   /
     |  /
    c|a/
    """
    dx = point.x - center.x
    dy = point.y - center.y
    if dx == 0:
        if dy < 0:
            return pi * 3 / 2
        return pi / 2
    if dy == 0:
        if dx < 0:
            return pi
        return 0
    if dx < 0:
        return pi + atan(dy / dx)
    if dy < 0:
        return 2 * pi + atan(dy / dx)
    return atan(dy / dx) 
Example 15
Project: unicorn-hat-hd   Author: pimoroni   File: demo.py    License: MIT License 5 votes vote down vote up
def tunnel(x, y, step):
    speed = step / 100.0
    x -= (u_width / 2)
    y -= (u_height / 2)
    xo = math.sin(step / 27.0) * 2
    yo = math.cos(step / 18.0) * 2
    x += xo
    y += yo
    if y == 0:
        if x < 0:
            angle = -(math.pi / 2)
        else:
            angle = (math.pi / 2)
    else:
        angle = math.atan(x / y)
    if y > 0:
        angle += math.pi
    angle /= 2 * math.pi  # convert angle to 0...1 range
    hyp = math.sqrt(math.pow(x, 2) + math.pow(y, 2))
    shade = hyp / 2.1
    shade = 1 if shade > 1 else shade
    angle += speed
    depth = speed + (hyp / 10)
    col1 = hue_to_rgb[step % 255]
    col1 = (col1[0] * 0.8, col1[1] * 0.8, col1[2] * 0.8)
    col2 = hue_to_rgb[step % 255]
    col2 = (col2[0] * 0.3, col2[1] * 0.3, col2[2] * 0.3)
    col = col1 if int(abs(angle * 6.0)) % 2 == 0 else col2
    td = .3 if int(abs(depth * 3.0)) % 2 == 0 else 0
    col = (col[0] + td, col[1] + td, col[2] + td)
    col = (col[0] * shade, col[1] * shade, col[2] * shade)
    return (col[0] * 255, col[1] * 255, col[2] * 255) 
Example 16
Project: indras_net   Author: gcallah   File: grid_env.py    License: GNU General Public License v3.0 5 votes vote down vote up
def get_angle(self, agent1, agent2, grid_view=None):
        """
        Use two agents to find the angle they make, using their coordinates
        """
        dy = abs(agent1.pos[Y] - agent2.pos[Y])
        dx = abs(agent1.pos[X] - agent2.pos[X])
        if(dy == 0):
            return 180
        if(dx == 0):
            return 90
        else:
            rad = math.atan(dy / dx)
            angle = rad * (180 / math.pi)
            return angle 
Example 17
Project: chainer-gqn   Author: musyoku   File: functions.py    License: MIT License 5 votes vote down vote up
def compute_yaw_and_pitch(vec):
    x, y, z = vec
    norm = np.linalg.norm(vec)
    if z < 0:
        yaw = math.pi + math.atan(x / z)
    elif x < 0:
        yaw = math.pi * 2 + math.atan(x / z)
    else:
        yaw = math.atan(x / z)
    pitch = -math.asin(y / norm)
    return yaw, pitch 
Example 18
Project: chainer-gqn   Author: musyoku   File: functions.py    License: MIT License 5 votes vote down vote up
def compute_yaw_and_pitch(vec):
    x, y, z = vec
    norm = np.linalg.norm(vec)
    if z < 0:
        yaw = math.pi + math.atan(x / z)
    elif x < 0:
        yaw = math.pi * 2 + math.atan(x / z)
    else:
        yaw = math.atan(x / z)
    pitch = -math.asin(y / norm)
    return yaw, pitch 
Example 19
Project: chainer-gqn   Author: musyoku   File: functions.py    License: MIT License 5 votes vote down vote up
def compute_yaw_and_pitch(vec):
    x, y, z = vec
    norm = np.linalg.norm(vec)
    if z < 0:
        yaw = math.pi + math.atan(x / z)
    elif x < 0:
        yaw = math.pi * 2 + math.atan(x / z)
    else:
        yaw = math.atan(x / z)
    pitch = -math.asin(y / norm)
    return yaw, pitch 
Example 20
Project: Localization   Author: kamalshadi   File: geometry.py    License: MIT License 5 votes vote down vote up
def angle(self, *args):
        x = self.dx
        y = self.dy
        z = self.dz

        if len(args) == 0:
            if self.mag() < res:
                return 0.0
            if x >= 0 and y >= 0:
                try:
                    return math.atan(y / x)
                except ZeroDivisionError:
                    return math.pi / 2
            elif x < 0 and y >= 0:
                return math.pi - math.atan(y / abs(x))
            elif x >= 0 and y < 0:
                try:
                    return -math.atan(abs(y) / x)
                except ZeroDivisionError:
                    return -math.pi / 2
            else:
                return math.atan(abs(y) / abs(x)) - math.pi
        elif len(args) == 1:
            b = args[0]
            try:
                rv = math.acos(self.dot(b) / (self.mag() * b.mag()))
                return rv
            except ZeroDivisionError:
                return 0.0 
Example 21
Project: hadrian   Author: modelop   File: link.py    License: Apache License 2.0 5 votes vote down vote up
def __call__(self, state, scope, pos, paramTypes, x):
        return unwrapForNorm(x, lambda y: 0.5 + (1./math.pi)*math.atan(y)) 
Example 22
Project: hadrian   Author: modelop   File: pfamath.py    License: Apache License 2.0 5 votes vote down vote up
def genpy(self, paramTypes, args, pos):
        return "math.atan({0})".format(*args) 
Example 23
Project: hadrian   Author: modelop   File: pfamath.py    License: Apache License 2.0 5 votes vote down vote up
def __call__(self, state, scope, pos, paramTypes, x):
        return math.atan(x) 
Example 24
Project: sphere   Author: qedus   File: sphere.py    License: MIT License 5 votes vote down vote up
def uv_to_st(cls, u):
        if cls.PROJECTION == cls.LINEAR_PROJECTION:
            return 0.5 * (u + 1)
        elif cls.PROJECTION == cls.TAN_PROJECTION:
            return (2 * (1.0 / math.pi)) * (math.atan(u) * math.pi / 4.0)
        elif cls.PROJECTION == cls.QUADRATIC_PROJECTION:
            if u >= 0:
                return 0.5 * math.sqrt(1 + 3 * u)
            else:
                return 1 - 0.5 * math.sqrt(1 - 3 * u)
        else:
            raise ValueError('unknown projection type') 
Example 25
Project: sphere   Author: qedus   File: sphere.py    License: MIT License 5 votes vote down vote up
def area(a, b, c):
    assert is_unit_length(a)
    assert is_unit_length(b)
    assert is_unit_length(c)

    sa = b.angle(c)
    sb = c.angle(a)
    sc = a.angle(b)
    s = 0.5 * (sa + sb + sc)
    if s >= 3e-4:
        s2 = s * s
        dmin = s - max(sa, max(sb, sc))
        if dmin < 1e-2 * s * s2 * s2:
            area = girard_area(a, b, c)
            if dmin < 2 * (0.1 * area):
                return area

    return 4 * math.atan(math.sqrt(max(0.0, math.tan(0.5 * s) \
                                    * math.tan(0.5 * (s - sa)) \
                                    * math.tan(0.5 * (s - sb)) \
                                    * math.tan(0.5 * (s - sc)))))


# Return true if the points A, B, C are strictly counterclockwise.  Return
# false if the points are clockwise or collinear (i.e. if they are all
# contained on some great circle).
#
# Due to numerical errors, situations may arise that are mathematically
# impossible, e.g. ABC may be considered strictly CCW while BCA is not.
# However, the implementation guarantees the following:
#
#   If simple_ccw(a,b,c), then !simple_ccw(c,b,a) for all a,b,c. 
Example 26
Project: rai-python   Author: MarcToussaint   File: transformations.py    License: MIT License 5 votes vote down vote up
def shear_from_matrix(matrix):
    """Return shear angle, direction and plane from shear matrix.
    >>> angle = (random.random() - 0.5) * 4*math.pi
    >>> direct = numpy.random.random(3) - 0.5
    >>> point = numpy.random.random(3) - 0.5
    >>> normal = numpy.cross(direct, numpy.random.random(3))
    >>> S0 = shear_matrix(angle, direct, point, normal)
    >>> angle, direct, point, normal = shear_from_matrix(S0)
    >>> S1 = shear_matrix(angle, direct, point, normal)
    >>> is_same_transform(S0, S1)
    True
    """
    M = numpy.array(matrix, dtype=numpy.float64, copy=False)
    M33 = M[:3, :3]
    # normal: cross independent eigenvectors corresponding to the eigenvalue 1
    l, V = numpy.linalg.eig(M33)
    i = numpy.where(abs(numpy.real(l) - 1.0) < 1e-4)[0]
    if len(i) < 2:
        raise ValueError("No two linear independent eigenvectors found %s" % l)
    V = numpy.real(V[:, i]).squeeze().T
    lenorm = -1.0
    for i0, i1 in ((0, 1), (0, 2), (1, 2)):
        n = numpy.cross(V[i0], V[i1])
        l = vector_norm(n)
        if l > lenorm:
            lenorm = l
            normal = n
    normal /= lenorm
    # direction and angle
    direction = numpy.dot(M33 - numpy.identity(3), normal)
    angle = vector_norm(direction)
    direction /= angle
    angle = math.atan(angle)
    # point: eigenvector corresponding to eigenvalue 1
    l, V = numpy.linalg.eig(M)
    i = numpy.where(abs(numpy.real(l) - 1.0) < 1e-8)[0]
    if not len(i):
        raise ValueError("no eigenvector corresponding to eigenvalue 1")
    point = numpy.real(V[:, i[-1]]).squeeze()
    point /= point[3]
    return angle, direction, point, normal 
Example 27
Project: Arnold-For-Blender   Author: griffin-copperfield   File: __init__.py    License: GNU General Public License v3.0 5 votes vote down vote up
def _view_update_persp(v3d, camera):
    lens = v3d.lens
    camera['fov'] = ('FLOAT', math.degrees(2 * math.atan(64.0 / (2 * lens))))
    camera['screen_window_min'] = ('VECTOR2', (-1, -1))
    camera['screen_window_max'] = ('VECTOR2', (1, 1))
    return (lens, ) 
Example 28
Project: PiClock   Author: n0bel   File: GoogleMercatorProjection.py    License: MIT License 5 votes vote down vote up
def fromPointToLatLng(self, point):
        origin = self.pixelOrigin_
        lng = (point.x - origin.x) / self.pixelsPerLonDegree_
        latRadians = (point.y - origin.y) / -self.pixelsPerLonRadian_
        lat = radiansToDegrees(2.0 * math.atan(math.exp(latRadians)) -
                               math.pi / 2.0)
        return LatLng(lat, lng) 
Example 29
Project: Traffic-Signs-and-Object-Detection   Author: dark-archerx   File: __init__.py    License: GNU General Public License v3.0 5 votes vote down vote up
def _pix_to_lat(k, latpix, ntiles, _TILESIZE, zoom):

    return math.degrees(math.pi/2 - 2 * math.atan(math.exp(((latpix + _pixels_to_degrees((k-ntiles/2)*_TILESIZE, zoom)) - _EARTHPIX) / _pixrad))) 
Example 30
Project: tributary   Author: timkpaine   File: ops.py    License: Apache License 2.0 5 votes vote down vote up
def Arctan(self):
    return unary(self, 'arctan(' + self._name_no_id() + ')', (lambda x: math.atan(self.value())))