Utilities

Commonly used units

The following dictionaries contain tables of commonly used length, time, and mass units:

ulula.utils.utils.units_l = {'Gpc': {'in_cgs': 3.08567758149e+27, 'label': '{\\rm Gpc}'}, 'Mpc': {'in_cgs': 3.08567758149e+24, 'label': '{\\rm Mpc}'}, 'au': {'in_cgs': 14959787070000.0, 'label': '{\\rm AU}'}, 'cm': {'in_cgs': 1.0, 'label': '{\\rm cm}'}, 'km': {'in_cgs': 100000.0, 'label': '{\\rm km}'}, 'kpc': {'in_cgs': 3.08567758149e+21, 'label': '{\\rm kpc}'}, 'm': {'in_cgs': 100.0, 'label': '{\\rm m}'}, 'mm': {'in_cgs': 0.1, 'label': '{\\rm mm}'}, 'mum': {'in_cgs': 0.0001, 'label': '{\\rm \\mu m}'}, 'nm': {'in_cgs': 1e-07, 'label': '{\\rm nm}'}, 'pc': {'in_cgs': 3.08567758149e+18, 'label': '{\\rm pc}'}}

List of length units that can be used in the plotting functions.

ulula.utils.utils.units_t = {'Gyr': {'in_cgs': 3.15569252e+16, 'label': '{\\rm Gyr}'}, 'Myr': {'in_cgs': 31556925200000.0, 'label': '{\\rm Myr}'}, 'hr': {'in_cgs': 3600.0, 'label': '{\\rm hr}'}, 'kyr': {'in_cgs': 31556925200.0, 'label': '{\\rm kyr}'}, 'min': {'in_cgs': 60.0, 'label': '{\\rm min}'}, 'ms': {'in_cgs': 0.001, 'label': '{\\rm ms}'}, 'mus': {'in_cgs': 1e-06, 'label': '{\\rm \\mu s}'}, 'ns': {'in_cgs': 1e-09, 'label': '{\\rm ns}'}, 's': {'in_cgs': 1.0, 'label': '{\\rm s}'}, 'yr': {'in_cgs': 31556925.2, 'label': '{\\rm yr}'}}

List of time units that can be used in the plotting functions.

ulula.utils.utils.units_m = {'Mear': {'in_cgs': 5.972e+27, 'label': 'M_{\\oplus}'}, 'Msun': {'in_cgs': 1.988475415338e+33, 'label': 'M_{\\odot}'}, 'g': {'in_cgs': 1.0, 'label': '{\\rm g}'}, 'kg': {'in_cgs': 1000.0, 'label': '{\\rm kg}'}, 'mg': {'in_cgs': 0.001, 'label': '{\\rm mg}'}, 'mp': {'in_cgs': 1.672621898e-24, 'label': 'm_{\\rm p}'}, 'mug': {'in_cgs': 1e-06, 'label': '{\\rm \\mu g}'}, 'ng': {'in_cgs': 1e-09, 'label': '{\\rm ng}'}, 't': {'in_cgs': 1000000.0, 'label': '{\\rm t}'}, 'u': {'in_cgs': 1.66054e-24, 'label': '{\\rm u}'}}

List of mass units that can be used in the plotting functions.