Astro-Catalog
view release on metacpan or search on metacpan
lib/Astro/Catalog/IO/Simple.pm view on Meta::CPAN
if (defined $c) {
my $type = $c->type;
if ($type eq 'RADEC') {
# Standard J2000
push(@chunks, $c->ra(format => 's'), $c->dec(format => 's'), "J2000");
}
elsif ($type eq 'FIXED') {
push(@chunks, $c->az(format => 's'), $c->el(format => 's'), "AZEL");
}
else {
$comment = "Can not represent star $chunks[0] in catalog since it is of type $type";
}
}
else {
$comment = "Star $chunks[0] has no coordinates.";
}
# now the line. If we have comment set this is just a comment line
if (defined $comment) {
push(@output, "# $comment");
}
else {
my $cmt = '';
$cmt = " # " .$star->comment()
if $star->comment();
push(@output, sprintf("%-15s %s %s %s", @chunks) . $cmt);
}
}
return \@output;
}
=item B<_default_file>
If Astro::Catalog is created with a Format but no Filename or other data
source it checked this routine to see whether there is a default file
that should be read. This is mainly for Astro::Catalo::IO::JCMT and the
JAC, but might prive useful elsewhere.
=cut
sub _default_file {
# returns an empty list
return;
}
1;
__END__
=back
=end __PRIVATE_METHODS__
=head1 FORMAT
The Simple format is defined as follows: Any line that looks like
ID HH MM SS.SS +/-DD MM SS.SS TYPE # Comment
will be matched. A space is allowed between the sign and the
declination. The type is optional (as is the comment) and
can be one of J2000, B1950, GALACTIC, AZEL or SUPERGALACTIC
or the JCMT abbreviations (RJ, RB, GA or AZ). If TYPE is not
present J2000 is assumed.
=head1 COPYRIGHT
Copyright (C) 2001-2003 University of Exeter. All Rights Reserved.
Some modificiations Copyright (C) 2003 Particle Physics and Astronomy
Research Council. All Rights Reserved.
This module was written as part of the eSTAR project in collaboration
with the Joint Astronomy Centre (JAC) in Hawaii and is free software;
you can redistribute it and/or modify it under the terms of the GNU
Public License.
=head1 AUTHORS
Alasdair Allan E<lt>aa@astro.ex.ac.ukE<gt>
Tim Jenness E<lt>tjenness@cpan.orgE<gt>
=cut
( run in 1.578 second using v1.01-cache-2.11-cpan-39bf76dae61 )