Commits

Sergio Pascual  committed 4d7b20a

Two versions of age added

  • Participants
  • Parent commits dceff4e

Comments (0)

Files changed (2)

File doc/reference.rst

     :throws milia.no_big_bang:
 
 
-    .. method:: age(z)
+    .. method:: age([z=0.0])
         Return the age of the Universe [Gyr].
 
         :param z: redshift
         :param z: redshift
         :returns: comoving volume per solid angle [Mpc^3 sr^-1]
         
-    .. method:: hubble_radius()
-        Return the Hubble radius [Mpc].
-        
-        :returns: Hubble radius [Mpc]
-        
-    .. method:: hubble_time()
-        Return the Hubble time [Gyr].
-        
-        :returns: Hubble time [Gyr]
-        
     .. py:attribute:: matter
 
         Matter density
 
     .. py:attribute:: vacuum
+
+        Vacuum energy density
+
     .. py:attribute:: hubble
+
+        Hubble parameter
+
 .. py:class:: FlrwNat(matter, vacuum)
 
     The Friedmann-Lemaitre-Robertson-Walker metric in natural units.
     :param vacuum: vacuum energy density [adimensional]
 
 
-    .. method:: age(z)
+    .. method:: age([z=0.0])
 
         Return the age of the Universe [adimensional].
 
 
     .. py:attribute:: vacuum
 
+        Vacuum energy density

File src/milia.pyx

         double age()
         double age(double)
         double angular_scale(double)
-#        double hubble_radius()
-#        double hubble_time()
         double get_hubble()
         double set_hubble(double)
 
     def __dealloc__(self):
         del self.thisptr
 
-    def age(self, z):
+    def age(self, z=None):
         '''Return the age of the Universe [adimensional].
 
         :param z: redshift
         :returns: age of the Universe [adimensional].
 
         '''
-        return self.thisptr.age(z)
+        if z is not None:
+            return self.thisptr.age(z)
+        else:
+            return self.thisptr.age()
 
     def dc(self, z):
         '''Return the comoving distance in the line of sight [adimensional].
     def __dealloc__(self):
         del self.thisptr
 
-    def age(self, z):
+    def age(self, z=None):
         '''Return the age of the Universe [Gyr].
 
         :param z: redshift
         :returns: age of the Universe [Gyr].
 
         '''
-        return self.thisptr.age(z)
+        if z is not None:
+            return self.thisptr.age(z)
+        else:
+            return self.thisptr.age()
 
     def angular_scale(self, z):
         '''Return the factor to transform angular sizes in pc to arc sec.