jeffctaylor / astro2013

A centralized place for my code this spring and summer
2 stars 0 forks source link

to get rid of the annoying 10^23 constatn factor #14

Closed sophiathl closed 11 years ago

sophiathl commented 11 years ago
import astropy
import astropy.units as u

# this is to convert the flux denisty from erg / s / cm^2 / Hz (that we have) to Jy, by using astropy.units to define the 10^23 "annoying constant factor" that appears somewhere in the code
SpectralFluxDensity2Jy  = u.Jy.to(u.erg / u.cm**2 / u.s / u.Hz, 1., equivalencies=u.spectral_density)  ** -1  
jeffctaylor commented 11 years ago

This has been done.