NAME

Astro::Catalog::USNOA2::Query - A query request to the USNO-A2.0 Catalog

SYNOPSIS

$usno = new Astro::Catalog::USNOA2::Query( RA        => $ra,
                                           Dec       => $dec,
                                           Radius    => $radius,
                                           Bright    => $magbright,
                                           Faint     => $magfaint,
                                           Sort      => $sort_type,
                                           Number    => $number_out );
    
my $catalog = $usno->querydb();

DESCRIPTION

Stores information about an prospective USNO-A2.0 query and allows the query to be made, returning an Astro::Catalog::USNOA2::Catalog 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.

REVISION

$Id: Query.pm,v 1.6 2002/05/29 20:32:29 aa Exp $

METHODS

Constructor

new

Create a new instance from a hash of options

$usno = new Astro::Catalog::USNOA2::Query( RA        => $ra,
                                           Dec       => $dec,
                                           Radius    => $radius,
                                           Bright    => $magbright,
                                           Faint     => $magfaint,
                                           Sort      => $sort_type,
                                           Number    => $number_out );
    

returns a reference to an USNO-A2 query object.

Accessor Methods

querydb

Returns an Astro::Catalog::USNOA2::Catalog object from a USNO-A2.0 query.

$catalog = $usno->querydb();
proxy

Return (or set) the current proxy for the USNO-A2.0 request.

$usno->proxy( 'http://wwwcache.ex.ac.uk:8080/' );
$proxy_url = $usno->proxy();
timeout

Return (or set) the current timeout in seconds for the USNO-A2.0 request.

$usno->timeout( 30 );
$proxy_timeout = $usno->timeout();
url

Return (or set) the current base URL for the USNO-A2.0 query.

$url = $usno->url();
$usno->url( "archive.eso.org" );

if not defined the default URL is archive.eso.org

agent

Returns the user agent tag sent by the module to the USNO-A2.0 server.

$agent_tag = $usno->agent();
RA

Return (or set) the current target R.A. defined for the USNO-A2.0 query

$ra = $usno->ra();
$usno->ra( $ra );

where $ra should be a string of the form "HH MM SS.SS", e.g. 21 42 42.66

Dec

Return (or set) the current target Declination defined for the USNO-A2.0 query

$dec = $usno->dec();
$usno->dec( $dec );

where $dec should be a string of the form "+-HH MM SS.SS", e.g. +43 35 09.5 or -40 25 67.89

Target

Instead of querying USNO-A2.0 by R.A. and Dec., you may also query it by object name. Return (or set) the current target object defined for the USNO-A2.0 query, will query SIMBAD for object name resolution.

$ident = $usno->target();
$usno->target( "HT Cas" );

using an object name will override the current R.A. and Dec settings for the Query object (if currently set) and the next querydb() method call will query USNO-A2.0 using this identifier rather than any currently set co-ordinates.

Radius

The radius to be searched for objects around the target R.A. and Dec in arc minutes, the radius defaults to 5 arc minutes.

$radius = $query->radius();
$query->radius( 20 );
Faint

Set (or query) the faint magnitude limit for inclusion on the USNO-A2 results

$faint = $query->faint();
$query->faint( 50 );
Bright

Set (or query) the bright magnitude limit for inclusion on the USNO-A2 results

$faint = $query->bright();
$query->bright( 2 );
Sort

Set or query the order in which the stars are listed in the catalogue

$sort = $query->sort();
$query->sort( 'RA' );

valid options are RA, DEC, RMAG, BMAG, DIST (distance to centre of the requested field) and POS (the position angle to the centre of the field).

Number

The number of objects to return, defaults to 2000 which should hopefully be sufficent to return all objects of interest. This value should be increased if a (very) large sample radius is requested.

$num = $query->number();
$query->nout( 100 );

General Methods

configure

Configures the object, takes an options hash as an argument

$dss->configure( %options );

Does nothing if the array is not supplied.

COPYRIGHT

Copyright (C) 2001 University of Exeter. 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.

AUTHORS

Alasdair Allan <aa@astro.ex.ac.uk>,