Astro-Catalog

 view release on metacpan or  search on metacpan

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

        $delta_hmk = sprintf("%.4f", $delta_hmk) if defined $star;

        # generate the hashes
        my %colours = (
                'J-H' => $j_minus_h,
                'J-K' => $j_minus_k,
                'H-K' => $h_minus_k) if defined $star;

        my %col_errors = (
                'J-H' => $delta_jmh,
                'J-K' => $delta_jmk,
                'H-K' => $delta_hmk) if defined $star;

        # append to star object
        $star->colours(\%colours) if defined $star;
        $star->colerr(\%col_errors) if defined $star;

        $newstars[$i] = $star if defined $star;

    }
    $catalog->pushstar( @newstars );

    # return the modified catalog
    return $catalog;
}

=back

=head2 Translation Methods

The query options stored internally in the object are not necessarily
the form required for a query to a remote server. Methods for converting
from the internal representation to the external query format are
provided in the form of _from_$opt. ie:

    ($outkey, $outvalue) = $q->_from_ra();
    ($outkey, $outvalue) = $q->_from_object();

The base class only includes one to one mappings.

=over 4

=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/
                catalog
                /)
           );
}

1;

__END__

=back

=end __PRIVATE_METHODS__

=head1 COPYRIGHT

Copyright (C) 2001 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 1.153 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )