| Astro-Catalog documentation | Contained in the Astro-Catalog distribution. |
Astro::Catalog::Query::CMC - A query request to the Carlsberg Meridian Catalog
$gsc = new Astro::Catalog::Query::CMC( RA => $ra, Dec => $dec, Radius => $radius, Nout => $number_out ); my $catalog = $gsc->querydb();
This code should be superceeded by the generic Vizier query class.
The module is an object orientated interface to the online Carlsberg Meridian Catalogues (CMC11)
Stores information about an prospective query and allows the query to be made, returning an Astro::Catalog::Query::CMC 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::BaseQuery for the catalog-independent methods.
$Id: CMC.pm,v 1.3 2003/09/25 15:56:59 aa Exp $
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::CMC;
# 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.3 $ ' =~ /.*:\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; return ( ra => '-c.ra', dec => '-c.dec', radmax => '-c.rm', nout => '-out.max', catalog => '-source', ); }
sub _get_default_options { return ( # Internal catalog => 'I/282/cmc12', # Target information ra => undef, dec => undef, # Limits radmax => 5, nout => 20000, ); }
sub _parse_query { my $self = shift; print $self->{BUFFER}; return new Astro::Catalog( Format => 'TST', Data => $self->{BUFFER}, Origin => 'Carlsberg Meridian Catalogue (CMC/11)', ReadOpt => { ra_col => 2, dec_col => 4, } ); }
sub _translate_one_to_one { my $self = shift; # convert to a hash-list return ($self->SUPER::_translate_one_to_one, map { $_, undef }(qw/ catalog /) ); }
# L A S T O R D E R S ------------------------------------------------------ 1;