/[escript]/trunk/downunder/py_src/datasources.py
ViewVC logotype

Diff of /trunk/downunder/py_src/datasources.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4286 by caltinay, Thu Mar 7 00:11:36 2013 UTC revision 4287 by caltinay, Thu Mar 7 05:26:44 2013 UTC
# Line 22  __license__="""Licensed under the Open S Line 22  __license__="""Licensed under the Open S
22  http://www.opensource.org/licenses/osl-3.0.php"""  http://www.opensource.org/licenses/osl-3.0.php"""
23  __url__="https://launchpad.net/escript-finley"  __url__="https://launchpad.net/escript-finley"
24    
25  __all__ = ['simpleGeoMagneticFluxDensity', 'DataSource', 'ErMapperData', \  __all__ = ['DataSource', 'ErMapperData', \
26          'SyntheticDataBase', 'SyntheticFeatureData', 'SyntheticData',          'SyntheticDataBase', 'SyntheticFeatureData', 'SyntheticData',
27          'SmoothAnomaly']          'SmoothAnomaly']
28    
# Line 88  def LatLonToUTM(lon, lat, wkt_string=Non Line 88  def LatLonToUTM(lon, lat, wkt_string=Non
88      x,y=pyproj.transform(p_src, p_dest, lon, lat)      x,y=pyproj.transform(p_src, p_dest, lon, lat)
89      return x,y,zone      return x,y,zone
90    
 def simpleGeoMagneticFluxDensity(latitude, longitude=0.):  
     """  
     Returns an approximation of the geomagnetic flux density B at the given  
     `latitude`. The parameter `longitude` is currently ignored.  
   
     :rtype: ``tuple``  
     """  
     theta = (90-latitude)/180.*np.pi  
     B_0=U.Mu_0  * U.Magnetic_Dipole_Moment_Earth / (4 * np.pi *  U.R_Earth**3)  
     B_theta= B_0 * sin(theta)  
     B_r= 2 * B_0 * cos(theta)  
     return B_r, B_theta, 0.  
   
91  class DataSource(object):  class DataSource(object):
92      """      """
93      A class that provides survey data for the inversion process.      A class that provides survey data for the inversion process.

Legend:
Removed from v.4286  
changed lines
  Added in v.4287

  ViewVC Help
Powered by ViewVC 1.1.26