GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  ASTRO::SIMBAD::QUERY (3)

.ds Aq ’

NAME

Astro::SIMBAD::Query - Object definining an prospective SIMBAD query.

CONTENTS

SYNOPSIS



  $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 );



DESCRIPTION

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.

REVISION

$Id: Query.pm,v 1.14 2005/06/08 01:38:17 aa Exp $

METHODS

    Constructor

<B>newB> Create a new instance from a hash of options



  $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.

    Accessor Methods

<B>querydbB> Returns an Astro::SIMBAD::Result object for an inital SIMBAD query



   $results = $query->querydb();



<B>proxyB> Return (or set) the current proxy for the SIMBAD request.



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



<B>timeoutB> Return (or set) the current timeout in seconds for the SIMBAD request.



   $query->timeout( 30 );
   $proxy_timeout = $query->timeout();



<B>urlB> Return (or set) the current base URL for the ADS query.



   $url = $query->url();
   $query->url( "simbad.u-strasbg.fr" );



if not defined the default URL is simbad.u-strasbg.fr

<B>agentB> Returns the user agent tag sent by the module to the ADS server.



   $agent_tag = $query->agent();



<B>RAB> Return (or set) the current target R.A. defined for the SIMBAD query



   $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

<B>DecB> Return (or set) the current target Declination defined for the SIMBAD query



   $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

<B>TargetB> Instead of querying SIMBAD by R.A. and Dec., you may also query it by object name. Return (or set) the current target object defined for the SIMBAD query



   $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.

<B>ErrorB> The error radius to be searched for SIMBAD objects around the target R.A. and Dec, the radius defaults to 10 arc seconds, with the radius unit being set using the units() method.



   $error = $query->error();
   $query->error( 20 );



<B>UnitsB> The unit for the error radius to be searched for SIMBAD objects around the target R.A. and Dec, the radius defaults to 10 arc seconds, with the radius itself being set using the error() method



   $error = $query->units();
   $query->units( "arcmin" );



valid unit types are arcsec, arcmin and deg.

<B>use_list_queryB> When searching by coordinates, or if the radius is nonzero, we perform a list query that is expected to return multiple results. However, if searching for a target by name, and the error radius is zero, it is pretty clear that we want a specific target. In that case, we use a more detailed object query.

This method returns true if the criteria are such that we will use a list query and false if it is an object query.

<B>FrameB> The frame in which the R.A. and Dec co-ordinates are given



   $frame = $query->frame();
   $query->frames( "FK5" );



valid frames are FK5 and FK4, if not specified it will default to FK5.

<B>EpochB> The epoch for the R.A. and Dec co-ordinates



   $epoch = $query->epoch();
   $query->epoch( "1950" );



defaults to 2000

<B>EquinoxB> The equinox for the R.A. and Dec co-ordinates



   $equinox = $query->equinox();
   $query->equinox( "2000" );



defaults to 2000

<B>QueryurlB> Returns the URL used to query the Simbad database

    General Methods

<B>configureB> Configures the object, takes an options hash as an argument



  $query->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>,
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 QUERY (3) 2005-06-08

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.