olnon
Return to directory of Todd's tools
Computes a free-free spectrum based on
Olnon (1975) models.
Usage:
import olnon
olnon.olnon(Te, diameter, ne, Dkpc, filename='olnon.dat', doplot=False,
freqs=[], ylimits=[], model='truncatedPowerLaw', computeFWHM=False)
Inputs:
- Te: electron temperature in K
- diameter = diameter in AU of the central region of constant density
- ne = central density
- Dkpc = distance in kpc
- filename = the output ASCII file containing the spectrum
- doplot: create a pylab plot
- freqs: the grid of frequencies to calculate (default is 1-1000 GHz)
- ylimits: y-axis limits of the resulting plot
- model: 'cylinder', 'uniformSphere', 'gaussian', 'powerLaw', or 'truncatedPowerLaw' (the latter two use r^-2)
Returns:
- ) array of frequencies in GHz
- ) array of flux densities in Jy
- ) the expected FWHM in AU (i.e. diameter containing half the flux) only relevant if computeFWHM==True
Examples:
CASA <26>: freq, flux, fwhm = olnon.olnon(10000, 1000, 1e6, 1.3, computeFWHM=True)
Total flux density = 8.778397
radius of half flux = 1.226488 = 0.002973 pc. FWHP = 0.943452 arcsec = 1226.487832 AU
The following example shows how to generate Figure 3 from Olnon, where:
CASA <27>: a=olnon.olnon(10000, 1000, 1e6, 1.3, doplot=True, model='all')
Wrote fnu_vs_nu.png
Color key:
- black=Model I = uniform cylinder
- blue = Model II = uniform sphere
- green = Model III = Gaussian
- red = Model IV = power law (r^-2)
- orange = Modle V = truncated power law (r^-2)
--
ToddHunter - 2015-12-04