Single Dish Radio Astronomy Software Tools

For an overview of SDRAST and the current status please visit https://sdrast.github.io/.

Astronomy Package

Classes and functions for astronomical calculations

Celestial Coordinates

A position on the Earth is defined by a latitude and a longitude. A position on the sky can be defined in terms of the position on the Earth which is exactly underneath it at a moment in time. Epoch is the name for a moment in time used as a reference point for some time-varying astronomical quantity, such as the celestial coordinates.

The Earth’s axis wobbles on long and short time scales. Precession is the long-term variation which averages over short term variations such as nutation and aberration.

Equinox is the moment and direction when the day and night are exactly equally long as the Sun moves from the southern hemisphere to the northern hemisphere. This is also known as “the First Point of Aries” because it was at the far western end of that constellation at the time of Hipparchus. Precession of the equinoxes is the result of the changing relationship between the terrestrial and celestial coordinates systems.

Far distant radio sources hold their same relative positions to very precise accuracy (micro-arseconds) over very long time-scales. These define the International Coordinate Reference Frame (ICRF), which is the basis for the International Coordinate Reference System (ICRS).

The positions of stars relative to each other and distant radio sources change with time and so their positions on the grid must be given at a specified epoch. While today’s grid is based on radio sources, earlier star catalogues such as the Fourth Fundamental Catalogue (FK4) and Fifth Fundamental Catalogue (FK5) were based on distant bright stars and galaxies which appeared to be at rest relative to each other.

Epochs used for star catalogues have been based on the equinoxes of 1900, 1950 (FK4), and now 2000 (FK5 and FK6). Because there are different ways of measuring time, these dates are prefaced by a letter designating the time system. The earlier catalogues were based on Besselian dates (B1900.0, B1950.0, and J2000.0). The word equinox refers to the epoch when the Sun is at the First Point of Aries.

In modern usage, equinox refers to the celestial grid being used and epoch refers to the positions at a given moment in that grid. These are the coordinate systems used in pyephem.

Astrometric Geocentric

Mean geocentric position for the epoch of the specified star atlas

Apparent Geocentric

current geocentric position at the date and time of observation

Apparent Topocentric

current position for the observatory at the date and time of observation

FK4

The Fourth Fundamental Catalogue is a reference frame published in 1963 based on 1,535 stars in various equinoxes from 1950.0 to 1975.0. The equinox for this system is 1950 in Besselian years.

FK5

The Fifth Fundamental Catalog is a reference frame published in 1988 with updated new positions for the 1,535 stars. The equinox of this system is 2000 in Julian years.

ICRS

The International Celestial Reference System (ICRS) is the current standard celestial reference system adopted by the IAU. Its origin is at the barycenter of the solar system, with axes that are intended to be fixed in space. The ICRS is based on the International Celestial Reference Frame (ICRF) which consists of the positions of 3414 compact radio sources measured using VLBI.

CIRS

The Celestial Intermediate Reference System has the same pole as the geocentric coordinate system at the time of observation, but its rotation – the Earth Rotation Angle (ERA) – differs from Greenwich Apparent Sidereal Time.

Time

Time Systems

Terrestrial Time (TT) is a modern astronomical time standard defined by the IAU, primarily for time-measurements of astronomical observations made from the surface of Earth. TT continues Terrestrial Dynamical Time (TDT) which in turn succeeded ephemeris time (ET). The purpose for which ET was designed is to be free of the irregularities in the rotation of Earth. The unit of TT is the SI second, the definition of which is currently based on the caesium atomic clock.

TT is distinct from UTC, the time scale used as a basis for civil purposes, Coordinated Universal Time (UTC). TT indirectly underlies UTC, via International Atomic Time (TAI). Each leap second that is introduced into UTC causes UTC to diverge a little further from TT.

Besselian Year

The beginning of a Besselian year to be the moment at which the mean longitude of the Sun, including the effect of aberration and measured from the mean equinox of the date, is exactly 280 degrees. This moment falls near the beginning of the corresponding Gregorian (modern calendar) year. A “Besselian epoch” can be calculated from the Julian date. The beginnings of some commonly used Besselian years are:

B1900.0 = JD 2415020.3135 = 1900 January 0.8135 TT
B1950.0 = JD 2433282.4235 = 1950 January 0.9235 TT

Coordinate Transformations

In optical astronomy, the normal way of tracking an object is to locate it roughly, and then lock onto it or a nearby visible object if the object being tracked is not visible. The exact, instantaneous relationship between the local coordinates and the celestial coordinates is not that critical. The important thing is that the celestial coordinate system used is well defined.

Modern radio telescopes are pointed with reference to the local horizon and zenith. Encoders measure the rotation about the vertical axis (azimuth) and tilt with respect to the vertical (elevation or altitude, measured upwards, or zenith angle, measured downwards).

Converting from a direction in the horizontal coordinate systems (azimuth and elevation) to the corresponding direction in the celestial coordinate system (hour angle and declination) is a simple trigonometric conversion which the antenna tracking computer does in real time. That means that the radio astronomer needs to know the relationship between the current, apparent celestial coordinate system and the celestial coordinate system in which the source coordinates are specified in a time-independent way. This means that the exact position of the poles and the amount of rotation (defined by time) must be known.

Precession and Nutation

Precession is a slow rotation of the Earth’s poles about a long-term mean position. Nutation is a rapid rotation wobbling of the pole around the precessing mean. Computation of precession and nutation are critical to the pointing of a radio telescope. An additional correction is needed for aberration, an apparent displacement of a celestial object from its true position due to the velocity of the observer around the Sun, which may be as large as 20 arcsec. For very accurate positions, a correction for light-bending around the Sun may also need to be included in aberration.

Tools

Rick Fisher gives a clear and detailed explanation of precession and nutation and their effect on astronomical coordinates in Earth Rotation and Equatorial Coordinates. He also provided a Python package for these calculations and others. The package depends on SOFA, and a JPL ephemeris. There is also a Python wrapper for SOFA.

Bryna Hazelton explains the difference between CIRS and the apparent celestial coordinates and gives the code on which function delta_obs_ra_to_circ_ra() is based.

Brandon Rhodes gives an excellent explanation in the documentation for PyEphem. Summarizing:

Ecliptic Coordinates

At the time of writing the code astropy did not yet support ecliptic coordinates so pyephem was used for that. Note that this package is deprecated in favor of skyfield

Todo

  • The argument units in this module are haphazard. This needs to be fixed to that the units are natural to the context, that is,

    • Purely mathematical operations with angles like coordinate transformations should use radians.

    • Earth-based coordinates (azimuth, elevation, longitude, latitude) should be in degrees.

    • Celestial coordinates (right ascension, hour angle, declination) should be in hours for the longitude-like quantities and in degrees for latitude-like quantities.

    • Longitude-like coordinates will be in degrees if time is not involved, e.g. Galactic longitude, ecliptic longitude.

    • Terrestrial longitude, like right ascebsion, should be positive eastwards. (The DSN and most maps measure longitude westward.)

  • astropy continues to improve and so there is a need to evolves this package Astronomy to bring it into aligment with astropy

  • https://github.com/firelab/met_utils/blob/master/sun.py has some extensions for astropy which can be adapted as well. I don’t know if this evolved to https://sunpy.org/ or that is a different organization, but either way the submodule solar should be adopted to use this.

Functions

AzEl_to_HaDec(Azimuth, Elevation, Latitude)

converts from azimuth and elevation to hour angle and declination

AzEl_to_RaDec(azimuth, elevation, latitude, …)

Convert azimuth and elevation to CIRS right ascension and declination

B_epoch_to_J(ra50, dec50[, format])

Convert B1950 coordinates to J2000

CIRS_to_J2000(MJD, UT, raCIRS, decCIRS)

J2000 right ascension and declination from ICRS

HaDec_to_AzEl(HourAngle, Declination, Latitude)

Celestial to horizon coordinates

J2000_to_CIRS(MJD, UT, ra2000, dec2000)

CIRS right ascension and declination from J2000

J2000_to_apparent(MJD, UT, ra2000, dec2000, …)

apparent right ascension and declination from J2000

J_epoch_to_B(ra2000, dec2000, format)

Convert J2000 coordinates to B1950.

RaDec_to_AzEl(RA, dec, latitude, longitude, …)

converts right ascension and declination to azimuth and elevation

YMD_to_MJD(year, month, day)

Modified Julian date from calendar date

apparent_to_J2000(MJD, UT, ra, dec, …)

observed celestial coordinates to J2000.

cirs_ra_to_obs_ra(cirs_ra, mjd, longitude, …)

convert apparent RA at time of observation to CIRS RA

coordconv(long_orig, lat_orig, AP, BP, A1, B1)

converts between many lat-long style coordinate systems

current_to_ecliptic(…)

Apparent ecliptic coordinates from apparent RA and dec

decimal_day_to_HMS(day)

Formatted time to 0.01 seconds

decimal_day_to_tuple(day)

Float day to (h,m,s) tuple

delta_obs_ra_to_cirs_ra(mjd, longitude, latitude)

difference between radio astronomers observed coords and CIRS coords

ecliptic_to_J2000(elong, elat, mjd)

convert from ephem.Ecliptic coordinates to RA and dec

format_angles(*args)

converts angles to hexagesimal strings

galactic_offsets_to_celestial(RA, Dec[, …])

Converts offsets in Galactic coordinates to celestial

get_altaz(RA, Dec, time, location)

Simplest conversion using astropy

get_cartesian_coordinates([station])

Get the Cartesian coordinates of a DSN station, or a dictionary of all

get_geodetic_coords([dss, observatory])

Observatory’s geodetic coordinates

get_sky_coords(RA, Dec)

return SkyCoord from both float and str inputs

great_circle_angle(lat1, long1, lat2, long2)

Great circle angle between two points on a sphere

great_circle_distance(central_angle)

Great circle distance in km on Earth from great circle angle

greenwich_sidereal_time(year, doy)

Approximate sidereal time at Greenwich

ha_rise_set(el_limit, lat, dec)

Hour angle from transit for rising and setting.

horizon_range(planet_radius, observer_height)

Range to horizon

object_az_el(source, site, year, doy)

Compute object’s position in alt-az for a given site and time

obs_ra_to_cirs_ra(obs_ra, mjd, longitude, …)

convert apparent RA at time of observation to CIRS RA

refresh_ierstab([url, force])

Updates the UT1-UTC offset table from ‘url’.

source_start_stop(HAstart, HAend, HAlimit)

Find when sources are up

time_aliases(year, UTdoy, obs_long)

Time as days since 1900, centuries since 1900 and LST

v_sun(mjd, ra_source, dec_source)

LSR velocity of the sun


Astronomy.solar Module

Functions for computing solar orbital and orientation parameters

The ecliptic, the apparent solar orbit (in reality, the orbit of Earth about the Sun), is tilted approximately 23.5 deg with respect to the celestial equator. The sun is tilted at an angle of 7.25 deg with respect to the ecliptic plane. Both the celestial coordinates and the ecliptic coordinates have their zero meridian (RA = 0 h, lambda = 0 deg) at the point where the Sun’s orbit rises above the celestial plane.

Contents

Utilities

Provided for convenience:

radians(angle)  - Convert degrees to radians
truncate(angle) - Bounds an angle between 0 and 360.

Functions concerning Nutation

Handle nutation of the Earth’s orbit:

lunar_long_asc_node(t) - longitude of the mean ascending node of the lunar
                         orbit on the ecliptic; t in Julian centuries
longitude_nutation(omega) - Nutation in longitude

Functions for Heliographic Coordinates

These provide coordinates in the Sun-based lat/long system:

sun_coords_long_ascen_node(jd) - Ecliptic longitude at which solar equator
                                 intersects the ecliptic plane
Sun_central_longitude(anomaly, inclin, Lsun) - Longitude of center of disk
Sun_central_latitude(longitude, tilt) - Sun's latitude where central meridian
                                        crosses ecliptic plane
lat_long(radius, polar_position_angle, radial_distance, position_angle)
                                  - latitude and longitude of an active region

Geometrical Functions

manage projections to/from plane of the sky

axis_tilt_projection(longitude,tilt) - Projection of Z-axis of a tilted frame
xy_to_ra_dec(x,y,P,ra0,dec0)    - Convert XY coordinates in a Sun-aligned
                                  frame to RA and dec
ra_dec_to_xy(ra,dec,P,ra0,dec0) - Convert ra, dec to xy-coordinates aligned
                                  with Sun

Comprehensive Parameter Calculation

Handles a lot of calculations at once:

calc_solar(jd) - Overall function to calculate various solar data.

Notes

Times in this module for slowly varying parameters are in Julian centuries from Jan. 1, 2000. This differs from times in module Astronomy, which are based on Jan. 1, 1900.

Resources

A form for calculating sunspot coordinates:

http://www.nature1st.net/bogan/astro/sun/sunspots.html

Formulae for the Solar Orientation angles were taken from Astronomical Algorithms by Meeus.

Formulae for Calculating the Sunspot lat-long taken from Smith’s Astronomical Calculation for Calculators from:

http://www.idialstars.com/fipl.htm

Supporting definitions can be found at:

http://www.astro.washington.edu/docs/idl/cgi-bin/getpro/library32.html?GET_SUN
http://sspg1.bnsc.rl.ac.uk/SEG/Coordinates/angles.htm
http://farside.ph.utexas.edu/syntaxis/Almagest/node34.html

Functions

Carrington_Number(jd)

Carrington Number gives the number of rotations.

Eccentricity_of_orbit(T)

Eccentricity of the orbit ellipse.

Julian_centuries_since_2000(jd)

Julian centuries from Jan 1, 2000.

Sun_central_latitude(longitude, tilt)

Sun’s latitude where central meridian crosses ecliptic plane

Sun_central_longitude(anomaly, inclin, Lsun)

Longitude of center of disk

Sun_radius_vector(e, tar)

Distance between the Sun and the Earth

axis_tilt_projection(longitude, tilt)

Project of Z-axis of a tilted frame

calcJD(y, m, d, t)

Julian date with fraction for UT

calc_solar(jd)

Overall function to calculate various solar data.

ecliptic_obliquity(T)

Inclination of ecliptic plane w.r.t.

equation_of_the_center(M, T)

Difference between mean anomaly and true anomaly

lat_long(radius, polar_position_angle, …)

latitude and longitude of an active region

longitude_nutation(omega)

Nutation in longitude

lunar_long_asc_node(t)

longitude of the mean ascending node of the lunar orbit on the ecliptic

ra_dec_to_xy(ra, dec, P, ra0, dec0)

Convert ra, dec to xy-coordinates aligned with Sun

radians(degrees)

Convert degrees to radians

semidiameter(distance)

Semi-diameter in arcsec

sun_coords_long_ascen_node(jd)

Ecliptic longitude at which solar equator intersects the ecliptic plane

sun_geom_mean_long(T)

Geometric Mean Ecliptic Longitude (deg) of Sun

sun_mean_anomaly(T)

Position of Sun relative to perigee

time_series(jd)

List of powers of Julian centuries.

truncate(angle)

Bounds an angle between 0 and 360.

xy_to_ra_dec(x, y, P, ra0, dec0)

Convert XY coordinates in a Sun-aligned frame to RA and dec

_images/orbit3D.png

Slowly Varying

\(\omega\)

ecliptic longitude of the perigee

\(\epsilon\)

obliquity of the eclipstic

Annually Varying

\(\alpha\)

right ascension

\(\delta\)

declination

\(M\)

ecliptic longitude of the Sun

\(\lambda\)

Sun’s anomaly

Projected on Sky toward Sun

\(P\)

tilt of the ecliptic w.r.t. equator

tilt of the Sun w.r.t. ecliptic

\(L_0\)

longitude of the solar disk center

\(B_0\)

latitude of the solar disk center

Astronomy.orbits3D Module

Set of functions using matplotlib to produce 3-dimensional plots of orbits, meridia, radial vectors, annotations, etc.

Heliographic coordinates are the latitude and longitude of a feature on the Sun’s surface. Heliographic latitude is an object’s angular distance north or south of the solar equator; heliographic longitude can be measured east or west of the central solar meridian, or given in terms of the Carrington rotation number.

Functions

make_arc(ax, radius, long_asc_node, …)

Draw an arc centered on the origin

make_axis(ax, maxval, direction, npts)

Show an axis of a Euclidian space

make_orbit(ax, radius, long_asc_node, …)

Draw a full circle around the origin

orbit_text(ax, radius, long_asc_node, …)

Position text using orbital coordinates.

orbit_vector(ax, maxval, long_asc_node, …)

Draw a radial vector

show_celestial(fig, obliquity, long_perigee, …)

Show an orbit in the celestial coordinate system

show_heliographic(fig, inclin_sun, …[, Title])

Show a celestial coordinate system in heliographic coordinates

unit_vector(long_asc_node, inclination, …)

Cartesian components of a unit vector.


Astronomy.coordconv Module

Conversion of spherical coordinates

This subroutine converts the longitude-like (A1) and latitude-like (A2) coordinates of a point on a sphere into the corresponding coordinates (A2,B2) in a different coordinate system that is specified by the coordinates of its origin (long_orig,lat_orig) and its north pole (AP,BP) in the original coordinate system.

Examples of use

  1. HOUR ANGLE, DECLINATION –> AZIMUTH, ELEVATION:

    Az, El = coordconv(pi, pi/2-Lat, 0., Lat, HA, Dec)
    Azimuth will be in the range -Pi/2 to Pi/2
    
  2. AZIMUTH, ELEVATION –> HOUR ANGLE, DECLINATION:

    HA, Dec = coordconv(pi, pi-2-Lat, 0., Lat, Az, El)
    
  3. RIGHT ASCENSION, DECLINATION –> GALACTIC LONG & LAT (System I)

Refer to Kraus, P., RADIO ASTRONOMY, McGraw Hill, New York, 1966, or Allen, C.W., ASTROPHYSICAL QUANTITIES, Athlone Press, London, (1963) for the definition of System I:

AP=(12. + 40./60.)*PI/12.
BP= 28.           *PI/180.
long_orig=(18. + 40./60.)*PI/12.
lat_orig= O.
  1. GALACTIC LONG & LAT (System I) –> RIGHT ASCENSION, DECLINATION

In general, whenever we know the forward transformation (i.e. example 3 above) we may do the reverse transformation with at most two preliminary call to coordconv() to calculate the coordinates in system 2 of the pole and origin which are given in system 1. Often, it is possible to get the needed coordinates by inspection. In this particular instance:

APP= 6. *PI/12.
BPP=28. *PI/180.
new_long_orig,new_lat_orig = coordconv(long_orig, lat_orig, AP, BP, 0, 0)
RA, Dec = coordconv(new_long_orig, new_lat_orig, APP, BPP, lI, bI)
  1. RIGHT ASCENSION, DECLINATION –> GALACTIC LONG & LAT (System II):

    AP=(12. + 49./60.)*PI/12.
    BP= 27.4          *PI/180.
    long_orig=(17. + 42.4/60)*PI/12.
    lat_orig=-(28.0+55./60.)*PI/180.
    lII, bII = coordconv(long_orig, lat_orig, AP, BP, RA, Dec)
    
  2. GALACTIC LONG & LAT (System II) –> RIGHT ASCENSION, DECLINATION:

    APP, BPP = coordconv(long_orig, lat_orig, AP, BP, 0., Pi/2)
    new_long_orig, new_lat_orig = coordconv(long_orig, lat_orig,
                                            AP, BP, 0., 0.)
    RA, Dec = coordconv(new_long_orig, new_lat_orig, APP, BPP, lII, bII)
    
  3. RIGHT ASCENSION, DECLINATION –> ECLIPTIC LATITUDE AND LONGITUDE:

    The obliquity of the ecliptic (EPS) depends on the epoch and may
    be obtained from the AMERICAN EPHEMERIS AND NAUTICAL ALMANAC.
    EPS=23.443*PI/180.
    RA and Dec are for the epoch of observation.
    Ecl.Lat., Ecl.Long = coordconv(0., 0., -Pi/2, Pi/2-EPS, RA, Dec)
    

Note that the input parameters are partially redundant. For example, if AP, BP, and long_orig are specified, then there are only two discrete values possible for lat_orig (except for a few degenerate special cases). The two possible values of lat_orig may be calculated from:

sin(lat_orig)=[sin(BP) +/- 2.*cos(BP)**2
                             *cos(AP-long_orig)
                             *sqrt{1.+cos(AP-long_orig)**2}]
        / [sin(BP)**2 + {cos(BP)*cos(AP-long_orig)}**2]

If AP, BP, and lat_orig are known, then the two possible values of long_orig may be calculated from:

cos(AP-long_orig)=[1-sin(lat_orig)*sin(BP)]/[cos(lat_orig)*cos(BP)]

If, instead of long_orig and lat_orig, the longitude of the ascending node is known in both the old (AN1) and new (AN2) coordinate systems, then long_orig and lat_orig may be calculated by a preliminary call to COORD:

long_orig, lat_orig = coordonv(0., 0., AN1-AP, BP, -AN2, 0)

Functions

coordconv(long_orig, lat_orig, AP, BP, A1, B1)

converts between many lat-long style coordinate systems


Astronomy.DSN_coordinates Module

Coordinates for DSN and affiliated antennas

The DSN uses west longitudes, whereas most astronomical packages like astropy and ephem use east longitudes.

Contents

In this module:

class DSS
function DSSLocation

Functions

DSN_complex_of(dss)

Returns the Complex to which a station belongs

DSSLocation(dss)

Gives DSN station location as astropy EarthLocation

get_cartesian_coordinates([station])

Get the Cartesian coordinates of a DSN station, or a dictionary of all

get_geodetic_coords([dss, observatory])

Observatory’s geodetic coordinates

Classes

DSS(number)

Observer suclass class for DSN stations based on xephem Observer

Class Inheritance Diagram

Inheritance diagram of Astronomy.DSN_coordinates.DSS

Astronomy.Ephem Package

Module Ephem - extends module pyephem for radio astronomy

Module Ephem extends module ephem (package pyephem). Module ‘ephem’ is imported under its own name, so these two are equivalent:

import Ephem.ephem
import ephem

Function calibrator() returns a planet or radio source suitable for calibrating fluxes:

In [2]: venus = calibrator("Venus")
In [3]: type(venus)
Out[3]: ephem.Venus

In [8]: c3_273 = calibrator("3C273")
In [9]: type(c3_273)
Out[9]: Astronomy.Ephem.quasar.Quasar

In [10]: from Radio_Astronomy.radio_flux import get_calibrator_flux
In [12]: import datetime
In [13]: now = datetime.datetime.now()
In [14]: get_calibrator_flux('Venus', 8.4, now)
Out[14]: (28.9862540298923, 'Planet')

Class DSS, a subclass of Observer is imported from .DSS_coordinates and is useful in this context:

In [15]: from Astronomy.Ephem import DSS
In [16]: dss43 = DSS(43)
In [17]: type(dss43)
Out[17]: Astronomy.DSN_coordinates.DSS
In [18]: print(dss43.long, dss43.lat, dss43.elev)
-211:01:11.8 -35:24:14.3 688.867

In [2]: from Astronomy.Ephem import DSS
In [3]: from Astronomy.DSN_coordinates import DSS
In [4]: import datetime
In [5]: now = datetime.datetime.now()
In [6]: dss14 = DSS(14)
In [7]: dss14.date = now
In [8]: mars = ephem.Mars()
In [9]: mars.compute(dss14)
In [10]: mars.<Tab>
  a_dec    az           dec             g_ra   mag                 ra            set_az
  a_epoch  circumpolar  earth_distance  hlat   name                transit_alt   set_time
  a_ra     compute()    elong           hlon   neverup             radius        transit_time
  alt      copy()       g_dec           hlong  parallactic_angle() rise_az       size
  g_ra     instance     mag             phase  rise_time           sun_distance  writedb()

Class Pulsar provides pulsar physical data:

In [1]: from Astronomy.Ephem import Pulsar
In [2]: psr = Pulsar('B0531+21')
In [3]: type(psr)
Out[3]: Astronomy.Ephem.pulsar.Pulsar
In [4]: psr.properties
Out[4]: {'POSEPOCH': '40675',      'DM': '56.791',       'DIST_A': '2.0',
         'S600': '211',            'S925': '45',         'S1400': '14',
         'NGLT': '25',             'RM': '-42.3',        'SPINDX': '-3.1',
         'DIST_DM': '2.49',        'PEPOCH': '40000.00', 'DIST_AMN': '1.5',
         'SURVEY': 'misc,ar4,gb4', 'W50': '3.0',         'DIST_AMX': '2.5',
         'F0': '30.2254370',       'F1': '-3.86228E-10', 'F2': '1.2426E-20',
         'F3': '-0.64E-30',        'EPHEM': 'DE405',     'DIST_DM1': '1.74',
         'TAU_SC': '1.51e-06',     'W10': '4.7',         'S400': '646',
         'ASSOC': 'SNR:Crab[ccl+69],GRS:1FGL_J0534.5+2200[aaa+10g],                     GRS:HESS_J0534+220[aab+06b]',
         'TYPE': 'HE[cdt69,fhm+69,hjm+70]'}

Notes

module ephem

http://rhodesmill.org/brandon/projects/pyephem-manual.html

Example of use:

In [1]: from ephem import *
In [2]: ba = city("Buenos Aires")
In [3]: venus = Venus(ba)
In [4]: venus.compute("2020/6/11 16:00:00")

In [5]: print(venus.a_ra, venus.a_dec, venus.a_epoch)
4:28:37.11 20:25:09.7 2000/1/1 12:00:00
In [6]: print(venus.g_ra, venus.g_dec)
4:29:46.74 20:27:41.9
In [7]: print(venus.ra, venus.dec)
4:29:46.74 20:27:41.9

About Celestial Coordinates

  • a_ra, a_dec: Astrometric geocentric position for epoch (e.g. J2000)

  • g_ra, g_dec: Apparent geocentric position for date specified in the compute(), after correcting for precession, relativistic deflection, nutation and aberration

  • ra, dec: Apparent topocentric position, after correction for parallax and refraction. Set the Observer attribute pressure to zero if you want PyEphem to ignore the effects of atmospheric refraction

Functions

calibrator(name)

Creates an Ephem (pyephem) Body() instance for a flux calibrator

Classes

Quasar(name)

ephem.FixedBody() with “J” or “B” name

Pulsar(name)

ephem.FixedBody() with pulsar properties.

SerializableBody([info, name, observer_info])

Simple extension to ephem.FixedBody that allows for conversion to and from a Python dictionary.

EphemException([value, details])

Exception class for Ephem module

Class Inheritance Diagram

Inheritance diagram of Astronomy.Ephem.quasar.Quasar, Astronomy.Ephem.pulsar.Pulsar, Astronomy.Ephem.serializable_body.SerializableBody, Astronomy.Ephem.EphemException

Astronomy.formats Module

Converts between conventional angular notation and decimal notation, either decimal angles or radians as designated.

Functions

dms_delimited_angle_to_rads(angle)

converts decl.

format_angles(*args)

converts angles to hexagesimal strings

hms_delimited_angle_to_rads(angle)

Converts R.A.

old_parse_colon_delimited_angles(rastring, …)

parse_colon_delimited_angles(*args)

Parses angle strings delimited with colons

parse_dms_delimited_angle(angle)

Parses decl.

parse_hms_delimited_angle(angle)

Parses RA strings delimited with h, m and s.


Astronomy.northpolar Module

from http://stackoverflow.com/questions/2417794/how-to-make-the-angles-in-a-matplotlib-polar-plot-go-clockwise-with-0-at-the-top

Classes

NorthPolarAxes(*args[, theta_offset, …])

A variant of PolarAxes where theta starts pointing north and goes clockwise.

Class Inheritance Diagram

Inheritance diagram of Astronomy.northpolar.NorthPolarAxes

Astronomy.redshift Module

module Astronomy.redshift - functions for computing to/from redshift

The redshift is the fractional amount by which a wavelength is shifted longward (to the red) due to the recessional velocity of the emitter:

    lambda - lambda_0
z = -----------------
        lambda_0

For large velocities special relativity should be taken into account when computing the redshift from recessional velocity and vice-versa:

    ( c + V_r ) 1/2
z = ( ------- )     - 1
    ( c - V_r )

           2
V_r   (z+1)  - 1
--- = ----------
 c         2
      (z+1)  + 1

The radial velocity which gives rise to redshift can be calculated according to various conventions. The most convenient is the radio astronomy convention which computes redshift as:

    f_0 - f
z = -------
      f_0

The velocity shift in the radio convention is computed as:

             df
dV      = -c ---
  radio      f_0

The optical astronomy convention leads to:

               df  (f_0)2
dV        = -c --- (---)
  optical      f_0 ( f )

References

Redshift: Lang, Astrophys. Formulae, eqns. 2-227 – 2-229

Cosmic Time Scale: Ho; Lang, Astrophys. Formulae, eqn. 5-82

Doppler Shift: astropy documentation for Spectral Doppler Equivalencies

Functions

V_LSR(RA, dec, dss, timedate)

Computes the velocity of the local standard of rest w.r.t.

age(z[, hubble_constant])

Cosmic time scale = age if acceleration = 0

distance(z[, hubble_constant])

Distance of a cosmically redshifted source, assuming constant expansion

dop_fac(z)

Redshifted frequency as a ratio: f/f_0

doppler_optical(rel_freq, f_ref)

Returns the Doppler shift for a frequency offset by the optical convention

doppler_radio(rel_freq, f_ref)

Returns the Doppler shift for a frequency offset by the radio convention

doppler_relat(rel_freq, f_ref)

Returns the relativistic Doppler shift for a frequency offset

redshift([v_recess, dop_fac])

Redshift corresponding to a recessional velocity

v_recess(distance[, hubble_constant])

velocity of recession for a constant rate of expansion = Hubble constant

v_redshift(z)

velocity of recession for a given redshift

wave_stretch(z)

Fractional lengthening of wavelength


Astronomy.ATCA_caldb Module

Query ATCA calibrator database

http://www.narrabri.atnf.csiro.au/calibrators/calibrator_database_search.html?position=12:30:49,12:23:28&radius=1

Because it takes a while to read the database, try this: http://stackoverflow.com/questions/28974634/urllib2-url-open-delay-between-opening-webpage-and-getting-html-data

That did not work.

Functions

build_ATCA_caldb_query([RA, dec, radius])

parse_ATCA_caldb_response(response)

query_ATCA_caldb(url)

Classes

lineParser()

Class Inheritance Diagram

Inheritance diagram of Astronomy.ATCA_caldb.lineParser

Astronomy.TAI Module

Provides delta T = TAI - UTC

Example::

In [1]: from Astronomy.TAI import dTA In [2]: dTA(2450630) Out[2]: 31.0

from http://maia.usno.navy.mil/ser7/tai-utc.dat

Functions

dTA(jd)

This does not extrapolate into future years.

init_table()


Astronomy.SIMBAD Module

Submit a data query to SIMBAD for a source

http://simbad.u-strasbg.fr/simbad/sim-id?Ident=3c274&output.format=ASCII

This is unnecessary if astropy is used. See Automation/apps/find_sources.py for an example.

Functions

build_SIMBAD_query(source)

parse_SIMBAD_response(response[, catalogs])

query_SIMBAD(url)

Indices and tables