Документ взят из кэша поисковой машины. Адрес оригинального документа : http://hea-www.harvard.edu/~dburke/PDL/hogg/distance_modulus
Дата изменения: Thu Aug 9 02:36:11 2001
Дата индексирования: Tue Oct 2 07:31:24 2012
Кодировка:

Поисковые слова: п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п
#
# Compare to fig 4, of Hogg, D. W., "Distance measures in cosmology",
# astro-ph/9905116
#

use strict;

use PDL;
use PDL::Graphics::PGPLOT::Window;

use Astro::Cosmology;

# cosmologies - h0 is NOT irrelevant here!

my $a = Astro::Cosmology->new( matter => 1.0, lambda => 0.0, h0 => 100.0 );
my $b = Astro::Cosmology->new( matter => 0.05, lambda => 0.0, h0 => 100.0 );
my $c = Astro::Cosmology->new( matter => 0.2, lambda => 0.8, h0 => 100.0 );

# z range
my $z = 0.1 * sequence(51);

# calculate the distance modulus
# - remembering that lum_dist() returns an answer in Mpc
my $d_a = 5.0 * $a->lum_dist( $z )->log10 + 25.0;
my $d_b = 5.0 * $b->lum_dist( $z )->log10 + 25.0;
my $d_c = 5.0 * $c->lum_dist( $z )->log10 + 25.0;

# plot the graph
my $win = PDL::Graphics::PGPLOT::Window->new();

$win->env( 0, 5, 40, 50 );
$win->label_axes( "redshift z",
"distance modulus DM + 5 log h (mag)",
"Fig 4 of Hogg, D.W. astro-ph/9905116 " .
"[Astro::Cosmology v" . Astro::Cosmology->version . "]" );

$win->hold;

$win->line( $z, $d_a, { LINESTYLE => 'solid' } );
$win->line( $z, $d_b, { LINESTYLE => 'dotted' } );
$win->line( $z, $d_c, { LINESTYLE => 'dashed' } );

$win->release;
$win->close;

## End of the test
exit;