Package pygeodesy :: Module geoids :: Class GeoidQuasi
[frames] | no frames]

Class GeoidQuasi

      object --+                
               |                
    named._Named --+            
                   |            
heights._HeightNamed --+        
                       |        
     heights._HeightBase --+    
                           |    
                  _GeoidBase --+
                               |
                              GeoidQuasi

Quasi-geoid height interpolator for 1-degree, whole Earth grids, used in package PyAxQG, for example.

Instance Methods
 
__init__(self, knots, dtype=<type 'float'>, kind=3, smooth=0, name='', **pars)
New GeoidQuasi interpolator.
 
__call__(self, *llis, **wrap_H)
Interpolate the geoid (or orthometric) height for one or more locations.
 
height(self, lats, lons, **wrap)
Interpolate the geoid height for one or several lat-/longitudes.
 
height_(self, *latlons, **wrap)
Interpolate the geoid height for each (latlons[i], latlons[i+1]) pair for i in range(0, len(latlons), 2).

Inherited from _GeoidBase: __enter__, __exit__, __repr__, __str__, center, close, highest, loweright, lowerleft, lowerright, lowest, outside, toStr, upperleft, upperright

Inherited from named._Named: __format__, __imatmul__, __matmul__, __rmatmul__, attrs, classof, copy, dup, methodname, rename, renamed, toRepr, toStr2

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties

Inherited from _GeoidBase: closed, cropped, dtype, endian, hits, kind, knots, mean, nBytes, name, nots, pgm, shape, sizeB, smooth, stdev, u2B

Inherited from heights._HeightBase: numpy, scipy, scipy_interpolate

Inherited from heights._HeightNamed: datum, kmin, wrap

Inherited from named._Named: classname, classnaming, iteration, named, named2, named3, named4, sizeof, typename

Inherited from object: __class__

Method Details

__init__ (self, knots, dtype=<type 'float'>, kind=3, smooth=0, name='', **pars)
(Constructor)

 

New GeoidQuasi interpolator.

Arguments:
  • knots - Geoid heights in row-major order (iterator over nlat * nlon scalars from slat north and wlon east).
  • dtype - NumPy dtype to use for the knots (str or numpy.dtype).
  • kind - scipy.interpolate order (int), use 1..5 for RectBivariateSpline or -1, -3 or -5 for bisplrep/-ev or interp2d linear, cubic respectively quintic, see note for more details.
  • smooth - Spline smoothing factor for kind=1..5 only (float).
  • name - Optional geoid name=NN (str).
  • pars - Optional geoid parameters, overriding the defaults (slat=-90.0, wlon=-180.0, dlat=1.0, dlon=1.0, nlat=181 and nlon=361).
Raises:
  • ImportError - Package numpy or scipy not found or not installed.
  • SciPyError - A scipy issue.
  • SciPyWarning - A scipy warning as exception.
Overrides: object.__init__

Note: Specify kind=-1, -3 or -5 to use scipy.interpolate.interp2d before or scipy.interpolate.bisplrep/-ev since Scipy version 1.14.

__call__ (self, *llis, **wrap_H)
(Call operator)

 

Interpolate the geoid (or orthometric) height for one or more locations.

Arguments:
  • llis - One or several locations (each LatLon), all positional.
  • wrap_H - Keyword arguments wrap=False (bool) and H=False (bool). Use wrap=True to wrap or normalize all llis locations. If H is True, return the orthometric height instead of the geoid height at each location.
Returns:
A single geoid (or orthometric) height (float) or a list or tuple of geoid (or orthometric) heights (each float).
Raises:
  • GeoidError - Insufficient number of llis, an invalid lli or the egm*.pgm geoid file is closed.
  • RangeError - An lli is outside this geoid's lat- or longitude range.
  • SciPyError - A scipy issue.
  • SciPyWarning - A scipy warning as exception.
Overrides: heights._HeightNamed.__call__

Note: To obtain orthometric heights, each llis location must have an ellipsoid height or h attribute, otherwise height=0 is used.

See Also: Function pygeodesy.heightOrthometric.

height (self, lats, lons, **wrap)

 

Interpolate the geoid height for one or several lat-/longitudes.

Arguments:
  • lats - Latitude or latitudes (each degrees).
  • lons - Longitude or longitudes (each degrees).
  • wrap - Use wrap=True to wrap or normalize all lats and lons.
Returns:
A single geoid height (float) or a list of geoid heights (each float).
Raises:
  • GeoidError - Insufficient or unequal number of lats and lons.
  • RangeError - A lat or lon is outside this geoid's lat- or longitude range.
  • SciPyError - A scipy issue.
  • SciPyWarning - A scipy warning as exception.
Overrides: heights._HeightNamed.height

height_ (self, *latlons, **wrap)

 

Interpolate the geoid height for each (latlons[i], latlons[i+1]) pair for i in range(0, len(latlons), 2).

Arguments:
  • latlons - Alternating lat-/longitude pairs (each degrees), all positional.
Returns:
A tuple of geoid heights (each float).
Overrides: heights._HeightNamed.height_

See Also: Method height for further details.