| Astro-Catalog documentation | Contained in the Astro-Catalog distribution. |
Astro::Catalog::Query::Vizier - A query request to the Vizier catalogs
$gsc = new Astro::Catalog::Query::2MASS( Catalog => '2MASS', RA => $ra, Dec => $dec, Radius => $radius, Nout => $number_out, Target => $object, ); my $catalog = $gsc->querydb();
The module is an object orientated interface to the online Vizier catalogs. Multiple catalogues can be specified using a comma-separated list.
Stores information about an prospective query and allows the query to be made, returning an Astro::Catalog::Query::Vizier object.
The object will by default pick up the proxy information from the HTTP_PROXY and NO_PROXY environment variables, see the LWP::UserAgent documentation for details.
See Astro::Catalog::Query for the catalog-independent methods.
$Id: Vizier.pm,v 1.1 2003/08/04 10:52:28 timj Exp $
See http://vizier.u-strasbg.fr/doc/asu.html for all the options
supported by Vizier (although they will be the translated form
rather than the abstracted arguments used by Astro::Catalog.
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.
Alasdair Allan <aa@astro.ex.ac.uk>, Tim Jenness <tjenness@cpan.org>
| Astro-Catalog documentation | Contained in the Astro-Catalog distribution. |
package Astro::Catalog::Query::Vizier;
# L O A D M O D U L E S -------------------------------------------------- use 5.006; use strict; use warnings; use base qw/ Astro::Catalog::Transport::REST /; use vars qw/ $VERSION /; use File::Spec; use Carp; # generic catalog objects use Astro::Catalog; use Astro::Catalog::Star; '$Revision: 1.1 $ ' =~ /.*:\s(.*)\s\$/ && ($VERSION = $1);
sub _default_remote_host { return "vizier.u-strasbg.fr"; }
sub _default_url_path { return "viz-bin/asu-acl?"; }
sub _get_allowed_options { my $self = shift; # Need to add magfaint and magbright return ( ra => '-c.ra', dec => '-c.dec', radmax => '-c.rm.max', radmin => '-c.rm.min', nout => '-out.max', # sort => '-sort', object => '-c.obj', catalog => '-source', # outcols => '-out.all', ); }
sub _get_default_options { return ( # Internal catalog => '2MASS', # Target information ra => undef, dec => undef, object => undef, # Limits radmin => 0, radmax => 5, nout => 20000, # sort => 'RA', # do not know the allowed options # outcols => '', # need to check ); }
sub _parse_query { my $self = shift; print $self->{BUFFER}; return new Astro::Catalog( Format => 'TST', Data => $self->{BUFFER}, Origin => 'Vizier', ReadOpt => { id_col => 0, ra_col => 1, dec_col => 2, } ); }
sub _translate_one_to_one { my $self = shift; # convert to a hash-list return ($self->SUPER::_translate_one_to_one, map { $_, undef }(qw/ catalog outcols /) ); }
# L A S T O R D E R S ------------------------------------------------------ 1;