Astro-Cosmology

 view release on metacpan or  search on metacpan

Cosmology.pm  view on Meta::CPAN


  1.0 / sqrt( (1+z)^2 * (1+om*z) - z*(2+z)*ol )

The comoving distance is always calculated by numerical
integration of the above formula. The angular diameter and
proper motion distances are defined as
C<dl/(1+z)^2> and C<dl/(1+z)> respectively.

=head2 Volumes

If C<dm> is the proper motion distance, then the
comoving volume C<vc> is given by

 flat:   vc = dm^3 / 3
 open:   vc = dm * sqrt(1+ok*dm^2) - asinh(dm*kappa) /
              ( 2 * kappa * ok )
 closed: vc = dm * sqrt(1+ok*dm^2) - asin(dm*kappa) /
              ( 2 * kappa * ok )

The differential comoving volume, C<dvc>, is calculated using
the proper motion distance, C<dm>, and the differential
proper motion distance, C<ddm>, by

  dvc = dm^2 * ddm / sqrt( 1 + ok*dm^2 )

where

  ddm = dc * sqrt( 1 + abs(ok) * dm^2 )

=head2 Times

The lookback time is calculated by integration of the following
formula from 0 to C<z>:

 1.0 / ( (1+z) * sqrt( (1+z)^2 * (1+om*z) - z*(2+z)*ol ) )

=head2 Flux and Magnitudes

The conversion between absolute and apparent magnitudes is
calculated using:

  $app_mag = $abs_mag + 25 + 5 * $cosmo->lum_dist($z)->log10();

The conversion between flux and luminosity is calculated using

  $lumin = FOURPI * $dl * $dl * $flux

where

  $dl = $cosmo->lum_dist($z) * 1.0e8 * PARSEC

Note that these equations do not include any pass-band
or evolutionary corrections.

=head2 Integration Technique

All integrations are performed using Romberg's method, which
is an iterative scheme using progressively higher-degree
polynomial approximations. The method stops when the answer
converges (ie the absolute difference in the values from the
last two iterations is smaller than the C<ABSTOL>
parameter, which is described in the L<new|/new> method).

Typically, the romberg integration scheme produces greater
accuracy for smooth functions when compared to simpler
methods (e.g. Simpson's method) while having little extra
overhead for badly-behaved functions.

=head1 CONSTANTS

Currently the following constants are available via
C<use Astro::Cosmology qw( :constants )>:

=over 4

=item *

LIGHT - the speed of light in m/s.

=item *

PARSEC - one parsec in metres.

=item *

STERADIAN - one steradian in degrees^2.

=item *

YEAR_TROPICAL - one tropical year in seconds.

=item *

PI - defined as 4.0 * atan(1.0,1.0) [this is in uppercase, whatever
this document may say]

=item *

FOURPI - 4.0 * PI [again PI should be in upper case here]

=back

Please do I<not> use this feature, as it will be removed when
an 'Astronomy constants' is created - e.g. see the astroconst
package at http://clavelina.as.arizona.edu/astroconst/ .

=head1 SYNTAX

This document uses the C<$object-E<gt>func(...)> syntax throughout.
If you prefer the C<func($object,...)> style, then you need to
import the functions:

  use Astro::Cosmology qw( :Func );

Most functions have two names; a short one and a (hopefully) more
descriptive one, such as C<pmot_dist()> and C<proper_motion_distance()>.

Most of the routines below include a C<sig:> line in their documentation.
This is an attempt to say how they
`L<thread|PDL::indexing>' (in the L<PDL|PDL> sense of the word).
So, for routines like C<lum_dist> - which have a sig line of



( run in 0.428 second using v1.01-cache-2.11-cpan-96521ef73a4 )