Single Dish Radio Astronomy Software Tools¶
For an overview of SDRAST and the current status please visit https://sdrast.github.io/.
Physics Package¶
module Physics
The module Scientific.Physics is pretty limited. This package is intended mainly to support astrophysical calculations, particularly as related to radiation. This module defines some SI constants as globals and also extends the unit objects defined in Scientific.Physics.PhysicalQuantities.
In addition, the module is the entry point for a package with various functions used in astrophysical calculations. The package structure is:
ConstantsExtra - extra constants not globally defined in this module
Radiation
Continuum
Lines - functions and data for spectral lines
recomb_lines - functions and data for recombination line radiation
Molec_Lines - functions for molecular line radiation
jpl_cat - reading and manipulating data in the JPL Catalog
quantum_label - decodes the quantum numbers in JPL Catalog format
The global physical constants are in the Systeme Internationale based on Scientific.Physics.PhysicalQuantities but extended with:
ke
These are defined as globals:
alpha, fine structure constant, e^2/(4 pi eps_0 h_bar c)
c, speed of light in m/s
e, elementary charge in coulomb
eps_0, vacuum permittivity (or electric constant), 1/mu_0 c^2 in farad/m
eV, electron volt, J
G, Newtonian constant, m^3 /kg / s^2
h, Planck constant, J s
h_bar, Planck constant, J s
k, Boltzman constant, J/K
k_e, Coulomb constant, 1/(4 pi eps_0), N m^2/C^2
k_m, Ampere constant
m_e, electron mass in kg
m_p, proton mass
m_P, Planck mass
m_u, mass of an atomic mass unit, kg
mu_0, vacuum permittivity or magnetic constant, 4 pi 10^7 N A^-2
Z_0, vacuum impedance, sqrt(mu0/eps_0), ohm
The dictionary AMU provides the atomic mass for:
H, He, C, N, O, Ne, Na, Xe, and Hg.
A suggested way to use this module is:
from Physics import *
This defines ‘PQ’ as an alias for Scientific.Physics.PhysicalQuantities and ‘pq’ as an alias for PQ.PhysicalQuantity. pq is an object with a value and a combination of units. The physical quantity itself is a unit too. See ‘help(pq)’ for the documentation. An example:
In [3]: pq(1,'c')
Out[3]: PhysicalQuantity(1,'c')
In [4]: pq(1,'c').inBaseUnits()
Out[4]: PhysicalQuantity(299792458.0,'m/s')
In [5]: pq(1,'c').inUnitsOf('cm/s').value
Out[5]: 29979245800.0
In [6]: pq(1,'c').inUnitsOf('mi/h').value
Out[6]: 670616629.38439512
The functions ‘sound_speed’ and ‘plasma_frequency’ are also defined here.
Functions¶
|
Frequency in Hz given the wavenumber in 1/m. |
|
Radial plasma frequency (rads/sec) |
|
Sound speed in a gas |
|
|
|
wavelength in m given the wavenumber in 1/m |
|
Wave number given the wavelength |
Physics.Constants Package¶
Basic physical constants and formula
There is a module Scientific.Physics.PhysicalQuantities which, according to the documentation, should provide the physical constants with units. However, I have not been able to find the constants, only tools for keeping track of units.
So, from the 1998 compilation by the Committee on Data for Science and Engineering (CODATA) of the International Council of Scientific Unions (ICSU), this package provides Universal Constants:
c, speed of light in m/s
eV, electron volt, J
mu_0, vacuum permittivity or magnetic constant, 4 pi 10^7 N A^-2
eps_0, vacuum permittivity (or electric constant), 1/mu_0 c^2 in farad/m
Z_0, vacuum impedance, sqrt(mu0/eps_0), ohm
G, Newtonian constant, m^3 /kg / s^2
k_e, Coulomb constant, 1/(4 pi eps_0), N m^2/C^2
k, Boltzman constant, J/K
Empirical Constants:
m_e, electron mass in kg
m_u, mass of an atomic mass unit, kg
e, elementary charge in coulomb
h, Planck constant, J s
h_bar, Planck constant, J s
m_p, Planck mass, kg
alpha, fine structure constant, e^2/(4 pi eps_0 h_bar c)
The dictionary AMU provides the atomic mass for H, He, C, N, O, Ne, Na, Xe, and Hg. In addition, from Allen, Astrophysical Quantities:
pc, parsec in cm
The modules available here are:
continuum - functions relating to continuum emission,
lines - general functions for line emission
recomb_lines - function relating to recombination line emission
jpl_cat - functions for accessing and decoding the JPL Spectral Line
Catalog
molec_lines - functions for molecular line emission
The module ‘radiation’ is obsolete and will be removed.
Functions¶
|
returns plasma frequency in radians/sec given electron density in cm^{-3} |
|
sound speed for atomic particles |
Physics.EE Module¶
Functions¶
|
Depth of the current layer in a conductor subject to AC fields. |
|
Resistance in a 1-m thin wire. |
|
Return the square root of x. |
Physics.Radiation Package¶
module Radiation
This module contains functions related to emission mechanisms.
Functions¶
|
Energy of the upper level of a transition |
|
Given the transition data as a dictionary and a temperature in K, returns the LTE population ratio for the transition levels. |
|
Brightness temperature of a gas cloud |
|
Column density from an integrated spectral line |
|
Extinction coefficient in CGS units |
|
Extinction coefficient in MKS units |
|
Partition function from JPL catalog |
|
Upper state population of a transition |
|
Optical depth |
|
Source function for a given population ratio and frequency |
Physics.Radiation.Lines Package¶
Molec - Package to support molecular line spectroscopy
This uses two compilations, those at JPL in http://spec.jpl.nasa.gov and those at the University of Cologne: http://www.astro.uni-koeln.de/site/vorhersagen/catalog/main_catalog.shtml
In the JPL catalog, the hundreds digit of the molecule tag is 0. In the Cologne catalog, it is 5.
Functions¶
|
Covert a tag into a molecular data file name |
Physics.Radiation.Lines.Molec Package¶
Molec - Package to support molecular line spectroscopy This provides support for the JPL Catalog at http://spec/jpl.nasa.gov and the Cologne Database for Molecular Spectroscopy at http://www.astro.uni-koeln.de/site/vorhersagen/ Molecule tags with a 0 in the hundreds position are in the JPL catalog. Tags with a 5 in that position are in the Cologne catalog.
Generally, both catalogs use the same way to encode line data. The exception is for lines with the quantum number format code of 999. In the Cologne directory, the tags for these molecules are followed immediately by *. The Cologne catalog also appends the molecule name on each line.
References
H. M. Pickett, R. L. Poynter, E. A. Cohen, M. L. Delitsky, J. C. Pearson, and H. S. P. Mueller, J. Quant. Spectrosc. Radiat. Transfer 60 (1998) 883 - 890.
H. S. P. Mueller, F. Schloeder, J. Stutzki, and G. Winnewisser, J. Mol. Struct. 742, 215-227 (2005)
H. S. P. Mueller, S. Thorwirth, D. A. Roth, and G. Winnewisser, Astronomy and Astrophysics 370, L49-L52 (2001)
Functions¶
|
Extract all the lines in the specified frequency range. |
|
This extracts energy levels from a list of transitions according to a key such as ‘q lower’ or ‘q upper’ or some other key. |
|
Convert a tag into a molecular data file name. |
|
Returns a file descriptor for the data file for the molecule with the specified code. |