|
Astro::SIMBAD::Query - Object definining an prospective SIMBAD query. |
Astro::SIMBAD::Query - Object definining an prospective SIMBAD query.
$query = new Astro::SIMBAD::Query( Target => $object,
RA => $ra,
Dec => $dec,
Error => $radius,
Units => $radius_units,
Frame => $coord_frame,
Epoch => $coord_epoch,
Equinox => $coord_equinox,
Proxy => $proxy,
Timeout => $timeout,
URL => $alternative_url );
my $results = $query->querydb();
$other = new Astro::SIMBAD::Query( Target => $object );
Stores information about an prospective SIMBAD query and allows the query to be made, returning an Astro::SIMBAD::Result object. Minimum information needed for a sucessful query is an R.A. and Dec. or an object Target speccification, other variables will be defaulted.
The Query object supports two types of queries: ``list'' (summary) and ``object'' (detailed). The list query usually returns multiple results; the object query is expected to obtain only one result, but returns extra data about that target. An object query is performed if the target name is specified and the Error radius is 0; otherwise, a list query is done.
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.
$Id: Query.pm,v 1.14 2005/06/08 01:38:17 aa Exp $
$query = new Astro::SIMBAD::Query( Target => $object,
RA => $ra,
Dec => $dec,
Error => $radius,
Units => $radius_units,
Frame => $coord_frame,
Epoch => $coord_epoch,
Equinox => $coord_equinox,
Proxy => $proxy,
Timeout => $timeout,
URL => $alternative_url );
returns a reference to an SIMBAD query object.
$results = $query->querydb();
$query->proxy( 'http://wwwcache.ex.ac.uk:8080/' ); $proxy_url = $query->proxy();
$query->timeout( 30 ); $proxy_timeout = $query->timeout();
$url = $query->url(); $query->url( "simbad.u-strasbg.fr" );
if not defined the default URL is simbad.u-strasbg.fr
$agent_tag = $query->agent();
$ra = $query->ra(); $query->ra( $ra );
where $ra should be a string of the form ``HH MM SS.SS'', e.g. 21 42 42.66
$dec = $query->dec(); $query->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
$ident = $query->target(); $query->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
SIMBAD using this identifier rather than any currently set co-ordinates.
units() method.
$error = $query->error(); $query->error( 20 );
error() method
$error = $query->units(); $query->units( "arcmin" );
valid unit types are ``arcsec'', ``arcmin'' and ``deg''.
This method returns true if the criteria are such that we will use a list query and false if it is an object query.
$frame = $query->frame(); $query->frames( "FK5" );
valid frames are ``FK5'' and ``FK4'', if not specified it will default to FK5.
$epoch = $query->epoch(); $query->epoch( "1950" );
defaults to 2000
$equinox = $query->equinox(); $query->equinox( "2000" );
defaults to 2000
$query->configure( %options );
Does nothing if the array is not supplied.
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.
Alasdair Allan <aa@astro.ex.ac.uk>,
|
Astro::SIMBAD::Query - Object definining an prospective SIMBAD query. |