# Commits

committed 89df790

Some more documentation

• Participants
• Parent commits 5167e41
• Branches default

# File doc/reference.rst

• Ignore whitespace
` `
`-:mod:`numina` reference`
`+:mod:`milia` reference`
` =======================`
` `
`-.. py:module:: numina`
`+.. py:module:: milia`
`    :synopsis: Metric classes`
` `
`-.. py:class:: FlrwNat(matter, vacuum)`
`-`
`-    The Friedmann-Lemaitre-Robertson-Walker metric in natural units.`
`-`
`-    This class represents a FLRW metric in natural units. Its methods `
`-    compute the common cosmological distances and times.`
`-`
`-    `
`-    :param matter: mater density [adimensional]`
`-    :param vacuum: vacuum energy density [adimensional]`
`-`
`-`
`-    .. method:: age(z)`
`-`
`-        Return the age of the Universe [adimensional].`
`-`
`-        :param z: redshift`
`-        :returns: age of the Universe [adimensional].`
`-`
`-    .. method:: dc(z)`
`-        Return the comoving distance in the line of sight [adimensional]`
`-`
`-        :param z: redshift`
`-        :returns: comoving distance in the line of sight [adimensional]`
`-        `
`-    .. method:: dl(z)`
`-        Return the luminosity distance [adimensional]`
`-`
`-        :param z: redshift`
`-        :returns: luminosity distance [adimensional]`
`-`
`-    .. method dm(z)`
`-        Return the comoving distance in transverse direction [adimensional].`
`-`
`-        :param z: redshift`
`-        :returns: comoving distance in transverse direction [adimensional]`
`-        `
`-    .. method:: da(z)`
`-        Return the angular distance [adimensional].`
`-        `
`-        :param z: redshift`
`-        :returns: angular distance [adimensional]`
`-        `
`-    .. method:: lt(z)`
`-        Return the look-back time [adimensional].`
`-        `
`-        :param z: redshift`
`-        :returns: look-back time in [adimensional]`
`-        `
`-    .. method:: vol(z)`
`-        '''Return comoving volume per solid angle [adimensional].`
`-        `
`-        :param z: redshift`
`-        :returns: comoving volume per solid angle [adimensional]`
`-`
`-    .. py:attribute:: matter`
`-`
`-        Matter density`
`-`
`-    .. py:attribute:: vacuum`
`-`
` .. py:class:: Flrw(hubble, matter, vacuum)`
` `
`     The Friedmann-Lemaitre-Robertson-Walker metric`
` `
`     .. py:attribute:: vacuum`
`     .. py:attribute:: hubble`
`+.. py:class:: FlrwNat(matter, vacuum)`
`+`
`+    The Friedmann-Lemaitre-Robertson-Walker metric in natural units.`
`+`
`+    This class represents a FLRW metric in natural units. Its methods `
`+    compute the common cosmological distances and times.`
`+`
`+    `
`+    :param matter: mater density [adimensional]`
`+    :param vacuum: vacuum energy density [adimensional]`
`+`
`+`
`+    .. method:: age(z)`
`+`
`+        Return the age of the Universe [adimensional].`
`+`
`+        :param z: redshift`
`+        :returns: age of the Universe [adimensional].`
`+`
`+    .. method:: dc(z)`
`+        Return the comoving distance in the line of sight [adimensional]`
`+`
`+        :param z: redshift`
`+        :returns: comoving distance in the line of sight [adimensional]`
`+        `
`+    .. method:: dl(z)`
`+        Return the luminosity distance [adimensional]`
`+`
`+        :param z: redshift`
`+        :returns: luminosity distance [adimensional]`
`+`
`+    .. method dm(z)`
`+        Return the comoving distance in transverse direction [adimensional].`
`+`
`+        :param z: redshift`
`+        :returns: comoving distance in transverse direction [adimensional]`
`+        `
`+    .. method:: da(z)`
`+        Return the angular distance [adimensional].`
`+        `
`+        :param z: redshift`
`+        :returns: angular distance [adimensional]`
`+        `
`+    .. method:: lt(z)`
`+        Return the look-back time [adimensional].`
`+        `
`+        :param z: redshift`
`+        :returns: look-back time in [adimensional]`
`+        `
`+    .. method:: vol(z)`
`+        '''Return comoving volume per solid angle [adimensional].`
`+        `
`+        :param z: redshift`
`+        :returns: comoving volume per solid angle [adimensional]`
`+`
`+    .. py:attribute:: matter`
`+`
`+        Matter density`
`+`
`+    .. py:attribute:: vacuum`
`+`

# File doc/using.rst

• Ignore whitespace
` Standard metric`
` ---------------`
` `
`-Natural units`
`--------------------`
`+PyMilia provides a class representing the standard `
`+`Friedmann–Lemaître–Robertson–Walker <http://en.wikipedia.org/wiki/Friedmann%E2%80%93Lema%C3%AEtre%E2%80%93Robertson%E2%80%93Walker_metric>`_ metric. The `
`+class is named :py:class:`.Flrw`. The name :py:class:`.Metric` can also `
`+be used. `
`+`
`+One starts initializing the metric passing the values of the Hubble parameter,`
`+the matter density and the vaccum density to the constructor. The distance`
`+units are megaparsec, time units are gigayear::`
`+`
`+  >>> from milia import Flrw`
`+  >>> metric = Flrw(73, 0.27, 0.73)`
`+`
`+Once the metric is created, we can compute different distances, volumes and`
`+ages at a given redshift. For example, the luminosity distance at redshift`
`+1.5. Distance units are megaparsec::`
`+`
`+  >>> metric.dl(1.5)`
`+  10708.524358401042`
`+`
`+`
`+We can compute also age and look-back time. For example, the look-back time`
`+at the same redshift.::`
`+`
`+  >>> metric.lt(1.5)`
`+  9.06546678715405`
`+`
`+`
`+===============================  =====================`
`+Measurement                      Method`
`+===============================  =====================`
`+Comoving distance                :py:meth:`.Flrw.dc``
`+Comoving distance (transverse)   :py:meth:`.Flrw.dm``
`+Angular distance                 :py:meth:`.Flrw.da` `
`+Luminosity distance              :py:meth:`.Flrw.dl``
`+Comoving volume                  :py:meth:`.Flrw.vol``
`+Age                              :py:meth:`.Flrw.age``
`+Look-back time                   :py:meth:`.Flrw.lt``
`+===============================  =====================`