Home | Trees | Indices | Help |
---|
|
Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Variables | |
MAB0 = 48.599934377717773
|
|
__package__ =
|
Function Details |
Convert between frequency and wavelength, nu to lambda or lambda to nu.
Works because Usage>>> from cosmolopy import magnitudes >>> nu = magnitudes.nu_lambda(1216.) >>> lam = magnitudes.nu_lambda(nu) >>> lam 1216.0 |
Convert f_nu to f_lambda or f_lambda to f_nu.
Works because Usage>>> from cosmolopy import magnitudes >>> fnu, nu = magnitudes.f_nu_lambda(2.0, 1216.) >>> flam, lam = magnitudes.f_nu_lambda(fnu, nu) >>> flam, lam (2.0, 1216.0) |
Convert apparent magnitude into flux (erg s^-1 cm^-2 Hz^-1). UsageCheck that the AB magnitude zero point is 3631 Jy: >>> from cosmolopy import magnitudes >>> "%.4g" % (magnitudes.f_nu_from_magAB(0.0)/1e-23) '3631' |
Convert absolute magnitude into luminosity (erg s^-1 Hz^-1). UsageCheck that the AB magnitude zero point is 3631 Jy: >>> from cosmolopy import magnitudes >>> import math >>> L_nu = magnitudes.L_nu_from_magAB(0.0) >>> "%.4g" % (L_nu/(1e-23 * 4. * math.pi * (10*cc.pc_cm)**2)) '3631' |
Convert luminosity (erg s^-1 Hz^-1) into absolute magnitude. UsageCheck that the AB magnitude zero point is 3631 Jy: >>> import numpy, math >>> from cosmolopy import magnitudes, cc >>> L_nu = 3631e-23 * (4. * math.pi * (10*cc.pc_cm)**2) >>> "%.3f" % numpy.abs(magnitudes.magnitude_AB_from_L_nu(L_nu)) '0.000' |
Distance modulus mu = m-M. The distance modulus is the difference between the apparent and absolute magnitudes, mu = 5 log(d/10 pc) Usage>>> from cosmolopy import fidcosmo, magnitudes >>> "mu(z=6) = %.4g" % magnitudes.distance_modulus(6.0, **fidcosmo) 'mu(z=6) = 48.86' |
The apparent and absolute AB magnitude given a flux. Inputs
ReturnsReturns ab (apparent), and AB (absolute) magnitudes. NotesNote that here you pass fluxes that are per unit wavelength, not per unit frequency. To get the absolute magnitude for a luminosity specified in units of erg s^-1 Ang^-1, set z=None. UsageCheck that the AB magnitude zero point is 3631 Jy: >>> from cosmolopy import fidcosmo, magnitudes, cc, cd >>> import numpy, math >>> L_nu = 3631e-23 * (4. * math.pi * (10*cc.pc_cm)**2) >>> nu = magnitudes.nu_lambda(1216.) >>> L_lambda, lamb = magnitudes.f_nu_lambda(L_nu, nu) >>> mAB, MAB = magnitudes.magnitude_AB(None, L_lambda, 1216., **fidcosmo) >>> "%.3f" % numpy.abs(MAB) '0.000' Find the apparent (and absolute, which should be zero) magnitudes of a 3631 Jy source at z=6.0: >>> from cosmolopy import fidcosmo, magnitudes, cc, cd >>> import numpy, math >>> L_nu = 3631e-23 * (4. * math.pi * (10*cc.pc_cm)**2) >>> nu = magnitudes.nu_lambda(1216.) >>> L_lambda, lamb = magnitudes.f_nu_lambda(L_nu, nu) >>> dl = cd.luminosity_distance(6.0, **fidcosmo) >>> f_lambda = L_lambda/(4. * math.pi * (dl*cc.Mpc_cm)**2 * (1. + 6.0)) >>> mAB, MAB = magnitudes.magnitude_AB(6.0, f_lambda, 7.*1216., **fidcosmo) >>> "%.3f, %.3f" % (mAB, MAB) '48.865, 0.000' |
Extrapolate to the AB magnitude at 1450 Angstroms. Inputs
ReturnsApparent and absolute magnitudes extrapolated to 1450 Angstroms. NotesFollows Fan et al. 2003: We extrapolate the continuum to rest-frame 1450A, assuming a continuum shape f_nu ~ nu^-0.5 to calculate AB_1450. UsageFind the apparent and absolute rest-frame 1450 Angstrom magnitudes of source with a flux of 3631 Jy at rest-frame 1216 Angstroms at z=6.0: >>> from cosmolopy import fidcosmo, magnitudes, cc, cd >>> import numpy, math >>> L_nu = 3631e-23 * (4. * math.pi * (10*cc.pc_cm)**2) >>> nu = magnitudes.nu_lambda(1216.) >>> L_lambda, lamb = magnitudes.f_nu_lambda(L_nu, nu) >>> dl = cd.luminosity_distance(6.0, **fidcosmo) >>> f_lambda = L_lambda/(4. * math.pi * (dl*cc.Mpc_cm)**2 * (1. + 6.0)) >>> mAB, MAB = magnitudes.magnitude_AB1450(6.0, f_lambda, 7.*1216., ... **fidcosmo) >>> "%.3f, %.3f" % (mAB, MAB) '48.769, -0.096' And is that offset from an absolute magnitude of zero consisten with our assumed powerlaw index? >>> "%.3f" %(-2.5 * numpy.log10((1216./1450)**0.5)) '0.096' |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Tue Mar 27 20:49:14 2012 | http://epydoc.sourceforge.net |