How to use the pyephem.FixedBody function in pyephem

To help you get started, we’ve selected a few pyephem examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

HERA-Team / aipy / ant.py View on Github
``````d_d = (d_Z*(-sin_Z*sin_lat + cos_Z*cos_lat*cos_A) \
- d_A*sin_Z*cos_lat*sin_A) / cos_d
# Convert zenith angle displacement into hour-angle component
d_H = (d_d*sin_H*sin_d - d_A*cos_A*sin_Z - d_Z*sin_A*cos_Z) \
/ (cos_H*cos_d)
return H + d_H, d + d_d

#  ____           _ _       _____ _              _ ____            _
# |  _ \ __ _  __| (_) ___ |  ___(_)_  _____  __| | __ )  ___   __| |_   _
# | |_) / _` |/ _` | |/ _ \| |_  | \ \/ / _ \/ _` |  _ \ / _ \ / _` | | | |
# |  _ &lt; (_| | (_| | | (_) |  _| | |&gt;  &lt;  __/ (_| | |_) | (_) | (_| | |_| |
# |_| \_\__,_|\__,_|_|\___/|_|   |_/_/\_\___|\__,_|____/ \___/ \__,_|\__, |
#                                                                    |___/

"""A class combining ephem's FixedBody with a RadioBody."""
def __init__(self, ra, dec, f_c=.012, name='', **kwargs):
"""ra:           source's right ascension (epoch=2000)
dec:          source's declination (epoch=2000)
f_c:          the plasma frequency (a measure of the electron density)
in the direction of the source, which can cause the
source to appear displaced from its quiescent position
as a function of frequency."""
ephem.FixedBody.__init__(self)
self._ra, self._dec, self.f_c = ra, dec, f_c
def compute(self, observer, refract=False):
if self.in_cache(observer, refract): return
ephem.FixedBody.compute(self, observer)
self.map = self.gen_uvw_map(observer, refract=refract)
self.cache(observer, refract)``````

pyephem

Empty package that depends on "ephem"

LGPL-3.0