Single Dish Radio Astronomy Software Tools

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

The module has functions that are specific to radio astronomy, as opposed to astronomy in general. They include antenna properties (beam size, efficiency, etc.), noise power and temperature, source flux from brightness temperature, black body radiation intensity (adopted from the Physics moduele), power unit conversions used in electrical engineering, etc.

Radio_Astronomy Package

Radio_astronomy - basic radio astronomy functions

Function Groups

Antenna

Functions for antenna properties:

antenna_gain(aperture_efficiency,geometrical_area)
antenna_solid_angle(aperture_efficiency,geometrical_area,wavelength)
antenna_temperature(flux,effective_area)
beam_efficiency(antenna_solid_angle, beam_solid_angle)
beam_solid_angle(*args)
directivity(aperture_efficiency, geometrical_area, wavelength)
HPBW(feedtaper,wavelength,diameter)
ruze_loss_factor(surface_rms,wavelength)

Noise

Functions related noise temperature:

antenna_temp(antenna_gain,flux_density)
noise_figure(Tsys)
noise_power(Tsys,bandwidth)
rms_noise(Tsys,bandwidth,integration_time)
SNR(Ta,Tsys,bandwidth,integration_time)

Radio Sources

Relating flux, antenna temperature, etc.:

flux(Tb,freq,angular_diameter)
janskyPQ(Jy)

Conversions

Converting between units, log to linear, etc.:

dB(gain)
dBm(power)
dbm_to_dbuv(dbm)
dbuv_to_uV(dbuv)
dbm_to_v(dbm)
dBm_to_watts(dbm)
dbuv_to_dbm(dbuv)
dbuv_to_dmw_per_sq_m(dbuv)
dbuv_to_v(dbuv)
dmw_per_sq_m_to_dbuv(dbmw)
gain(dB)
v_to_dbuv(v)
volts_to_watts(V)
v_to_dbm(V)
watts_to_volts(W)

Miscellaneous

Left-overs:

freq_to_chan(frequency,bandwidth,n_chans)

Functions

BB_intensity(T, f)

Blackbody radiation intensity, W/m^2/Hz/rad^2, f is in Hz, and T is in K.

HPBW(feedtaper, wavelength, diameter)

Half-power beamwidth estimate

SNR(Ta, Tsys, bandwidth, integration_time)

Signal-to-noise ratio for a signal Ta relative to the system noise

antenna_gain(aperture_efficiency, …)

Antenna gain in K/Jy.

antenna_solid_angle(aperture_efficiency, …)

Antenna solid angle of an antenna, assuming radiation efficiency = 1

antenna_temp(antenna_gain, flux_density)

Antenna temperature of a source from flux and antenna gain.

antenna_temperature(flux, effective_area)

Convert flux to antenna temperature

beam_efficiency(antenna_solid_angle, …)

Fraction of flux in the main beam that registers at the receiver.

beam_solid_angle(*args)

Solid angle of the main beam.

dB(gain)

Converts a linear gain into dB

dBm(power)

Converts a power in W to db(milliwatts)

dBm_to_watts(dbm)

Convert dBm into watts

dbm_to_dbuv(dbm)

Convert dB(milliwatts) to dB(microvolts)

dbm_to_v(dbm)

Convert dBm to V across a 20-ohm load

dbuv_to_dbm(dbuv)

Convert dBuv to dBm.

dbuv_to_dmw_per_sq_m(dbuv)

Convert dB(uV) to dB(mW/m^2)

dbuv_to_uV(dbuv)

dBuv (dB microvolts) to V (volts)

dbuv_to_v(dbuv)

dBuv (dB microvolts) to V (volts)

delta_f(delta_v, frequency)

Frequency shift corresponding to a velocity shift.

directivity(aperture_efficiency, …)

Forward gain of an antenna over an isotropic antenna as a factor

dmw_per_sq_m_to_dbuv(dbmw)

Convert dB(mW/m^2) to dB(uV)

flux(Tb, freq, angular_diameter)

Flux received from a source

forward_gain(aperture_efficiency, …)

Directivity of an antenna in dB.

freq_to_chan(frequency, bandwidth, n_chans)

Returns the channel number where a given frequency is to be found.

gain(dB)

Convert dB into gain

janskyPQ(Jy)

jansky unit (Jy) as a PhysicalQuantity() class instance

noise_figure(Tsys)

Returns the noise figure in dB given a system temperature in K

noise_power(Tsys, bandwidth)

Returns the noise power in W

rms_noise(Tsys, bandwidth, integration_time)

Receiver r.m.s.

ruze_loss_factor(surface_rms, wavelength)

Loss due to reflecting surface irregulaties in a paraboloid

standing_wave_spectrum(length, …)

Frequency interval between peaks in a spectral pattern from a standing wave

v_to_dbm(V)

Volts to dB(mW) for a 50 ohm load

v_to_dbuv(v)

Volts to dBuv (dB microvolts)

volts_to_watts(V)

Volts to watts for a 50 ohm load

watts_to_volts(W)

Watts to volts for a 50 ohm load

wavenumber(wvln)

Wave number given the wavelength

Classes

Dipole(length, radius)

Dipole antenna

Class Inheritance Diagram

Inheritance diagram of Radio_Astronomy.Dipole

Radio_Astronomy.bands Module

conversion from waveguide band to frequency and vice-versa

Examples:

In [1]: from Radio_Astronomy.bands import *
In [2]: frequency_to_band(3)
Out[2]: 'S'
In [3]: band_to_frequency('K')
Out[3]: 22

Functions

band_to_frequency(band)

nominal band center frequency in GHz from band code

frequency_to_band(freq)

band code from frequency in GHz

Radio_Astronomy.michigan Module

Provides source fluxes from the University of Michigan Radio Observatory database.

The MRO radio source catalog was developed from years of monitoring a select set of radio sources. The catalog work was discontinued.

The description and plots included in the UMRAO web site were last updated on August 23, 2012. For questions or for additional data, contact Margo Aller.

Functions

array(object[, dtype, copy, order, subok, ndmin])

Create an array.

datestr2num(d[, default])

Convert a date string to a datenum using dateutil.parser.parse().

get_flux_data(url)

Gets the latest data from the Michigan database for a source

nearest_index(np_array, value)

Return the index of the element of the array with the nearest value

polate_flux(Jname, datenum, freq)

Interpolate or extrapolate flux of source for given date and frequency

polyfit(x, y, deg[, rcond, full, w, cov])

Least squares polynomial fit.

polyval(p, x)

Evaluate a polynomial at specific values.

Radio_Astronomy.radio_flux Module

Functions to compute fluxes of standard radio sources, the Sun, Venus, Jupiter and Saturn. The brightness of the Galactic background emission is also provided.

The origin of the data is given in the documentation for radio_flux, planet\_brightness, get\_planet\_flux, and galactic_BG.

Functions

err_func(p, x, y, yerr, function)

Difference between data and a model

exp

Return e raised to the power of x.

flux(Tb, freq, angular_diameter)

Flux received from a source

galactic_BG(f)

Average galactic background temperature

get_calibrator_flux(source, freq, date)

Get the flux of a calibrator by name, frequency and date.

get_planet_flux(planet, freq, date)

Flux of planet calibrators

leastsq(func, x0[, args, Dfun, full_output, …])

Minimize the sum of squares of a set of equations.

log10

Return the base 10 logarithm of x.

log_cubic(x, p)

2-order polynomial in log(x)

planet_brightness(planet, freq)

Brightness temperature of a planet.

pow

Return x**y (x to the power of y).

radio_flux(source, freq)

Flux density in Jy of standard calibrators.

subearth_longitude(pl)

Longitude of planet facing earth from heliocentric longitude

Radio_Astronomy.vla_cal Module

Module vla_cal creates or updates files of VLA calibrators and retrieves data for a specified calibrator.

Administration

It is expected that the pickle files VLA_cals, B_names and 3C_names exist. If they do not, the following must be done in the module directory /usr/local/lib/python2.6/site-packages/Radio_Astronomy/.

>>> from Radio_Astronomy.vla_cal import *
>>> cal_data = get_VLA_calibrators()
>>> make_VLA_pickle_file(cal_data)
>>> Bname_dict,cat_3C_dict = VLA_name_xref(cal_data)
>>> make_Bname_pickle_file(Bname_dict)
>>> make_3C_pickle_file(cat_3C_dict)

3C_VLA_cals is a convenience.pickle file that provides coordinate data keyed to 3C names. It is created as follows

>>> make_3C_file()

User Instructions

If you only needs coordinates for a 3C source then this will suffice

>>> ra,dec,jname = get_3C_coords(name)

If you need all the data for a source then do this

>>> data_dict = get_cal_data(source)

Notes

One source of annoyance is that astronomers do not all or always use the same designations as NRAO, that is, more or less characters, like b1937+21, j0218+4232 and so on.

IAU source designation recommendations can be found at <http://cdsweb.u-strasbg.fr/Dic/iau-spec.html>

Functions

IAU_name_parts(name)

Returns the declination part of an IAU source name

Jnames_to_B(Bnames_dict)

Returns a dictionary for looking up Bnames given Jnames

VLA_name_xref(cal_data)

Make cross-reference lookup for IAU B names and 3C catalog numbers.

fix_IAU_name(name)

Handles cases where the IAU designator is too long or too short.

get_3C_coords(name)

Formatted J2000 right ascension and declination and IAU name

get_VLA_calibrators([url])

Create a dictionary keyed on J-names of calibrators in the VLA data base.

get_cal_data(source)

Return calibrator data for a source.

get_cal_dict()

Returns the VLA calibrator dictionary

get_flux_data(src_data)

Gets flux as a function of frequency for the source

interpolate_flux(freqs, fluxes, freq)

make_3C_file([url])

Makes VLA calibrators 3C pickle file.

make_3C_pickle_file(names)

Create a picke file with a 3C to Jname cross-reference

make_Bname_pickle_file(Bnames)

Create a picke file with a Bname to Jname cross-reference

make_VLA_pickle_file(cals)

Put the VLA calibrator dictionary in a pickle file

match_IAU_name(name, name_list)

Try to match a short IAU name to one in a catalogue

polyfit(x, y, deg[, rcond, full, w, cov])

Least squares polynomial fit.

polyval(p, x)

Evaluate a polynomial at specific values.

The code can be cloned from this site

The `documentation <>`_https://sdrast.github.io/Radio_Astronomy/`_ was generated with Sphinx.

Indices and tables