• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(758)  |  Call(638)  |  Derive(0)  |  Import(120)
atan(x)

Return the arc tangent (measured in radians) of x.

src/p/y/pylon-HEAD/examples/national_grid/svg2kml.py   pylon(Download)
__author__ = 'Richard Lincoln, r.w.lincoln@gmail.com'
 
from math import pi, atan, exp
import xml.etree.ElementTree as ET
from pathdata import svg
 
SVG_NS = "http://www.w3.org/2000/svg"
def metres2latlon(mx, my, origin_shift= 2 * pi * 6378137 / 2.0):
    """Converts XY point from Spherical Mercator EPSG:900913 to lat/lon in
    WGS84 Datum"""
    lon = (mx / origin_shift) * 180.0
    lat = (my / origin_shift) * 180.0
 
    lat = 180 / pi * (2 * atan( exp( lat * pi / 180.0)) - pi / 2.0)

src/h/e/heatsource-HEAD/src/Stream/PyHeatsource.py   heatsource(Download)
from __future__ import division
from math import pow, sqrt, sin, log, atan, sin, cos, pi, tan, acos, exp,radians, degrees, log10
from random import randint
from bisect import bisect
 
class HeatSourceError(Exception): pass
 
    SunApparentLong = (GeoMeanLongSun + SunEqofCenter) - 0.00569 - 0.00478 * sin(toRadians*((125.04 - 1934.136 * JDC)))
 
    Dummy1 = sin(toRadians*Obliquity) * sin(toRadians*SunApparentLong)
    Declination = toDegrees*(atan(Dummy1 / sqrt(-Dummy1 * Dummy1 + 1)))
 
    SunRadVector = (1.000001018 * (1 - pow(Eccentricity,2))) / (1 + Eccentricity * cos(toRadians*(GeoMeanAnomalySun + SunEqofCenter)))
 
    #=========================================================
    #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    #7 - Received by Bed
    Water_Path = d_w / cos(atan((sin(radians(Zenith)) / 1.3333) / sqrt(-(sin(radians(Zenith)) / 1.3333) * (sin(radians(Zenith)) / 1.3333) + 1)))         #Jerlov (1976)
    Trans_Stream = 0.415 - (0.194 * log10(Water_Path * 100))
    if Trans_Stream > 1:
        Trans_Stream = 1

src/o/b/obspy-HEAD/obspy.signal/trunk/obspy/signal/rotate.py   obspy(Download)
 
import warnings
import numpy as np
from math import sqrt, pi, sin, cos, asin, tan, atan, atan2
 
 
def rotate_NE_RT(n, e, ba):
    TanU1 = (1 - f) * tan(lat1)
    TanU2 = (1 - f) * tan(lat2)
 
    U1 = atan(TanU1)
    U2 = atan(TanU2)
 
    dlon = lon2 - lon1

src/b/a/badger-lib-HEAD/packages/geopy/geopy/distance.py   badger-lib(Download)
from math import atan, tan, sin, cos, pi, sqrt, atan2, acos, asin
from geopy.units import radians
from geopy import units, util
from geopy.point import Point
 
# Average great-circle radius in kilometers, from Wikipedia.
# Using a sphere with this radius results in an error of up to about 0.5%.
 
        delta_lng = lng2 - lng1
 
        reduced_lat1 = atan((1 - f) * tan(lat1))
        reduced_lat2 = atan((1 - f) * tan(lat2))
 
        sin_reduced1, cos_reduced1 = sin(reduced_lat1), cos(reduced_lat1)

src/o/b/obspy.signal-0.4.0/obspy/signal/rotate.py   obspy.signal(Download)
 
import warnings
import numpy as np
from math import sqrt, pi, sin, cos, asin, tan, atan, atan2
 
 
def rotate_NE_RT(n, e, ba):
    TanU1 = (1 - f) * tan(lat1)
    TanU2 = (1 - f) * tan(lat2)
 
    U1 = atan(TanU1)
    U2 = atan(TanU2)
 
    dlon = lon2 - lon1

src/p/y/pygear-HEAD/pygear.py   pygear(Download)
 
# Imports
from __future__ import division
from math import sin, asin, cos, acos, tan, atan, pi, degrees, radians, sqrt
from copy import *
from sys import maxint
from warnings import *
                       raise ValueError, 'tool fillet radius negative'
 
             # calculate pressure angle in transverse cross-section
             self.data.update({'alpha_t':degrees(atan(tan(radians(self.data.get(  \
                               'alpha_n')))/cos(radians(self.data.get('beta')))))})
 
             # service pitch diameter: value check
                       fil_end_point   = gp_Pnt2d(-s_yt/2, d_y/2)
                       inv_to_basecirc = False
                  else:  # base circle diameter greater than root form diameter
                       nu = atan(s_yt/d_y)
                       fil_end_point   = gp_Pnt2d(-self.data.get('d_b')*sin(nu),  \
                                                   self.data.get('d_b')*cos(nu))
                       inv_to_basecirc = True
        spinepol    = BRepBuilderAPI_MakePolygon()
        auxspinepol = BRepBuilderAPI_MakePolygon()
        delta_b     = self.data.get('b')/self.points_width
        beta_a      = atan(self.data.get('d_a')/self.data.get('d')*  \
                           tan(radians(self.data.get('beta'))))   # helix angle at tip diameter
        slope       = tan(pi/2-beta_a)*self.data.get('d_a')*pi
        delta_phi   = delta_b/slope*2*pi

src/w/x/wxmap2-HEAD/trunk/prc/lib/python/TCw2.py   wxmap2(Download)
 
import math
from math import atan2
from math import atan
from math import pi
from math import fabs
from math import cos
          if(difx > 0): theta=pi2 
          if(difx < 0): theta=3*pi/2.0
      else:
        theta=atan(1./slope)
        if (difx > 0.0):
          if(dify < 0.0): theta=pi-theta
        else:

src/g/e/geopy-0.94/geopy/distance.py   geopy(Download)
from math import atan, tan, sin, cos, pi, sqrt, atan2, acos, asin
from geopy.units import radians
from geopy import units, util
from geopy.point import Point
 
# Average great-circle radius in kilometers, from Wikipedia.
# Using a sphere with this radius results in an error of up to about 0.5%.
 
        delta_lng = lng2 - lng1
 
        reduced_lat1 = atan((1 - f) * tan(lat1))
        reduced_lat2 = atan((1 - f) * tan(lat2))
 
        sin_reduced1, cos_reduced1 = sin(reduced_lat1), cos(reduced_lat1)

src/w/x/wxmap2-HEAD/prc/lib/python/TCw2.py   wxmap2(Download)
 
import math
from math import atan2
from math import atan
from math import pi
from math import fabs
from math import cos
          if(difx > 0): theta=pi2 
          if(difx < 0): theta=3*pi/2.0
      else:
        theta=atan(1./slope)
        if (difx > 0.0):
          if(dify < 0.0): theta=pi-theta
        else:

src/p/r/prayertime-2.2/prayertime.py   prayertime(Download)
__all__ = ['Season', 'Calendar', 'Prayertime', 'Mazhab', \
        'as_pytime', 'as_pydatetime']
 
from math import degrees, radians, atan, asin, acos, cos, sin, tan 
from datetime import date, datetime
from time import strptime
 
 
        obliquity = 23.439-0.0000004*julian_day
 
        alpha = degrees(atan(cos(radians(obliquity))*tan(radians(lamda))))
 
        if 90 < lamda < 180 :
            alpha += 180
        asr_alt = 0
 
        if self.mazhab == Mazhab.Hanafi :
            asr_alt = 90 - degrees(atan(2+tan(radians(abs(latitude - self.dec)))))
        else:
            asr_alt = 90 - degrees(atan(1 + tan(radians(abs(latitude - self.dec)))))
 

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next