Astro-Catalog

 view release on metacpan or  search on metacpan

lib/Astro/Catalog/Query/SIMBAD.pm  view on Meta::CPAN

        }

        # DEC

        # ...and rebuild the Dec
        my $dec;
        unless ($radec[2] =~ '\+' || $radec[2] =~ '-') {
            $dec = "$radec[3] $radec[4] $radec[5]";
        }
        else {
            $dec = "$radec[2] $radec[3] 00.0";
        }

        # Store the coordinates
        $star->coords(new Astro::Coords(
                name => $name,
                ra => $ra,
                dec => $dec,
                type => "J2000",
                units => "s",
        ));

        # SPECTRAL TYPE
        my $spectral = $separated[4];

        # remove leading and trailing spaces
        $spectral =~ s/^\s+//g;
        $spectral =~ s/\s+$//g;

        # push it into the object
        $star->spectype($spectral);

        # Add the target object to the Astro::Catalog::Item object
        $catalog->pushstar( $star );
        }

    # Field centre?

    # return the catalog
    return $catalog;
}

=item B<_translate_one_to_one>

Return a list of internal options (as defined in C<_get_allowed_options>)
that are known to support a one-to-one mapping of the internal value
to the external value.

    %one = $q->_translate_one_to_one();

Returns a hash with keys and no values (this makes it easy to
check for the option).

This method also returns, the values from the parent class.

=cut

sub _translate_one_to_one {
    my $self = shift;
    # convert to a hash-list
    return ($self->SUPER::_translate_one_to_one,
            map { $_, undef }(qw/
                bibyear1 bibyear2 radunits
                _protocol _catall _mesdisp _nbident
                _coordepoch _coordequi _coordframe
                _epoch1 _frame1 _equi1
                _epoch2 _frame2 _equi2
                _epoch3 _frame3 _equi3
                /)
           );
}

1;

__END__

=end __PRIVATE_METHODS__

=head1 SEE ALSO

L<Astro::Catalog>, L<Astro::Catalog::Item>, L<Astro::Catalog::Query>.

Derived from L<Astro::SIMBAD> on CPAN.

=head1 COPYRIGHT

Copyright (C) 2001-2003 University of Exeter. All Rights Reserved.
Some modifications copyright (C) 2003 Particle Physics and Astronomy
Research Council. All Rights Reserved.

This program was written as part of the eSTAR project 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 0.850 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )