Skip to content

Commit

Permalink
Add some useful constants
Browse files Browse the repository at this point in the history
  • Loading branch information
e-koch committed Jan 27, 2018
1 parent fc63c0b commit 8ed0a3d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

'''
Useful numbers to have handy
'''

import astropy.units as u

distance = 840 * u.kpc


def ang_to_phys(ang_size, distance=distance):
'''
Convert from angular to physical scales
'''
return (ang_size.to(u.rad).value * distance).to(u.pc)


co21_freq = 230.538 * u.GHz

co21_mass_conversion = 6.7 * (u.Msun / u.pc ** 2) / (u.K * u.km / u.s)
beam_eff_30m_druard = 56 / 92.

0 comments on commit 8ed0a3d

Please sign in to comment.