Skip to content

Commit

Permalink
doc done
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Mar 8, 2019
1 parent 7d5e634 commit 4a5bac9
Show file tree
Hide file tree
Showing 14 changed files with 872 additions and 452 deletions.
12 changes: 11 additions & 1 deletion pymap3d/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,17 @@
deg : bool = True means degrees. False = radians.
Most functions accept NumPy arrays of any shape.
Most functions accept NumPy arrays of any shape, as well as compatible data types
including AstroPy, Pandas and Xarray that have Numpy-like data properties.
For clarity, we omit all these types in the docs, and just specify the scalar type.
Other languages
---------------
Companion packages exist for:
* Matlab / GNU Octave: [Matmap3D](https://github.com/scivision/matmap3d)
* Fortran: [Maptran3D](https://github.com/scivision/maptran3d)
"""
from .timeconv import str2dt # noqa: F401
from .azelradec import radec2azel, azel2radec # noqa: F401
Expand Down
125 changes: 67 additions & 58 deletions pymap3d/aer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,31 @@ def ecef2aer(x: float, y: float, z: float,
Parameters
----------
x : float
y : float
z : float
x : float or numpy.ndarray of float
ECEF x coordinate (meters)
y : float or numpy.ndarray of float
ECEF y coordinate (meters)
z : float or numpy.ndarray of float
ECEF z coordinate (meters)
lat0 : float
Observer geodetic latitude
Observer geodetic latitude
lon0 : float
Observer geodetic longitude
Observer geodetic longitude
h0 : float
observer altitude above geodetic ellipsoid (meters)
ell : Ellipsoid, optional
reference ellipsoid
reference ellipsoid
deg : bool, optional
degrees input/output (False: radians in/out)
degrees input/output (False: radians in/out)
Returns
-------
az : float
azimuth (degrees) [0,360)
el : float
elevation (degrees/radians) [0,90]
srange : float
slant range [meters] [0,Infinity)
az : float or numpy.ndarray of float
azimuth to target
el : float or numpy.ndarray of float
elevation to target
srange : float or numpy.ndarray of float
slant range [meters]
"""
xEast, yNorth, zUp = ecef2enu(x, y, z, lat0, lon0, h0, ell, deg=deg)

Expand All @@ -56,16 +59,16 @@ def geodetic2aer(lat: float, lon: float, h: float,
Parameters
----------
lat : float
target geodetic latitude
lon : float
target geodetic longitude
h : float
target altitude above geodetic ellipsoid (meters)
lat : float or numpy.ndarray of float
target geodetic latitude
lon : float or numpy.ndarray of float
target geodetic longitude
h : float or numpy.ndarray of float
target altitude above geodetic ellipsoid (meters)
lat0 : float
Observer geodetic latitude
Observer geodetic latitude
lon0 : float
Observer geodetic longitude
Observer geodetic longitude
h0 : float
observer altitude above geodetic ellipsoid (meters)
ell : Ellipsoid, optional
Expand All @@ -75,12 +78,12 @@ def geodetic2aer(lat: float, lon: float, h: float,
Returns
-------
az : float
azimuth (degrees) [0,360)
el : float
elevation (degrees/radians) [0,90]
srange : float
slant range [meters] [0,Infinity)
az : float or numpy.ndarray of float
azimuth
el : float or numpy.ndarray of float
elevation
srange : float or numpy.ndarray of float
slant range [meters]
"""
e, n, u = geodetic2enu(lat, lon, h, lat0, lon0, h0, ell, deg=deg)

Expand All @@ -95,15 +98,14 @@ def aer2geodetic(az: float, el: float, srange: float,
gives geodetic coordinates of a point with az, el, range
from an observer at lat0, lon0, h0
Parameters
----------
az : float
azimuth (degrees) [0,360)
el : float
elevation (degrees/radians) [0,90]
srange : float
slant range [meters] [0,Infinity)
az : float or numpy.ndarray of float
azimuth to target
el : float or numpy.ndarray of float
elevation to target
srange : float or numpy.ndarray of float
slant range [meters]
lat0 : float
Observer geodetic latitude
lon0 : float
Expand All @@ -120,11 +122,11 @@ def aer2geodetic(az: float, el: float, srange: float,
In reference ellipsoid system:
lat : float
lat : float or numpy.ndarray of float
geodetic latitude
lon : float
lon : float or numpy.ndarray of float
geodetic longitude
alt : float
alt : float or numpy.ndarray of float
altitude above ellipsoid (meters)
"""
x, y, z = aer2ecef(az, el, srange, lat0, lon0, h0, ell=ell, deg=deg)
Expand Down Expand Up @@ -157,11 +159,11 @@ def eci2aer(eci: Tuple[float, float, float],
Returns
-------
az : float
azimuth (degrees) [0,360)
azimuth to target
el : float
elevation (degrees/radians) [0,90]
elevation to target
srange : float
slant range [meters] [0,Infinity)
slant range [meters]
"""
ecef = np.atleast_2d(eci2ecef(eci, t, useastropy))

Expand All @@ -177,12 +179,12 @@ def aer2eci(az: float, el: float, srange: float,
Parameters
----------
az : float
azimuth (degrees) [0,360)
el : float
elevation (degrees/radians) [0,90]
srange : float
slant range [meters] [0,Infinity)
az : float or numpy.ndarray of float
azimuth to target
el : float or numpy.ndarray of float
elevation to target
srange : float or numpy.ndarray of float
slant range [meters]
lat0 : float
Observer geodetic latitude
lon0 : float
Expand All @@ -201,9 +203,12 @@ def aer2eci(az: float, el: float, srange: float,
Earth Centered Inertial x,y,z
x : float
y : float
z : float
x : float or numpy.ndarray of float
ECEF x coordinate (meters)
y : float or numpy.ndarray of float
ECEF y coordinate (meters)
z : float or numpy.ndarray of float
ECEF z coordinate (meters)
"""
x, y, z = aer2ecef(az, el, srange, lat0, lon0, h0, ell, deg)

Expand All @@ -218,12 +223,12 @@ def aer2ecef(az: float, el: float, srange: float,
Parameters
----------
az : float
azimuth (degrees) [0,360)
el : float
elevation (degrees/radians) [0,90]
srange : float
slant range [meters] [0,Infinity)
az : float or numpy.ndarray of float
azimuth to target
el : float or numpy.ndarray of float
elevation to target
srange : float or numpy.ndarray of float
slant range [meters]
lat0 : float
Observer geodetic latitude
lon0 : float
Expand All @@ -240,9 +245,13 @@ def aer2ecef(az: float, el: float, srange: float,
ECEF (Earth centered, Earth fixed) x,y,z
x : float
y : float
z : float
x : float or numpy.ndarray of float
ECEF x coordinate (meters)
y : float or numpy.ndarray of float
ECEF y coordinate (meters)
z : float or numpy.ndarray of float
ECEF z coordinate (meters)
Notes
------
Expand Down
16 changes: 8 additions & 8 deletions pymap3d/azelradec.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ def azel2radec(az_deg: float, el_deg: float,
Parameters
----------
az_deg : float
az_deg : float or numpy.ndarray of float
azimuth [degrees clockwize from North]
el_deg : float
el_deg : float or numpy.ndarray of float
elevation [degrees above horizon (neglecting aberration)]
lat_deg : float
observer latitude [-90, 90]
Expand All @@ -37,9 +37,9 @@ def azel2radec(az_deg: float, el_deg: float,
Returns
-------
ra_deg : float
ra_deg : float or numpy.ndarray of float
ecliptic right ascension (degress)
dec_deg : float
dec_deg : float or numpy.ndarray of float
ecliptic declination (degrees)
"""

Expand All @@ -64,9 +64,9 @@ def radec2azel(ra_deg: float, dec_deg: float,
Parameters
----------
ra_deg : float
ra_deg : float or numpy.ndarray of float
ecliptic right ascension (degress)
dec_deg : float
dec_deg : float or numpy.ndarray of float
ecliptic declination (degrees)
lat_deg : float
observer latitude [-90, 90]
Expand All @@ -79,9 +79,9 @@ def radec2azel(ra_deg: float, dec_deg: float,
Returns
-------
az_deg : float
az_deg : float or numpy.ndarray of float
azimuth [degrees clockwize from North]
el_deg : float
el_deg : float or numpy.ndarray of float
elevation [degrees above horizon (neglecting aberration)]
"""

Expand Down
Loading

0 comments on commit 4a5bac9

Please sign in to comment.