Simple constructor. Forces read of config file if one can be found and
the config has not been read previously. If no config file can be located
the query object can not be instantiated since it will not know the
location of any servers.
The catalog field must be present, otherwise the new object will not know which remote server to use and which options are mandatory in the query. Note that the remote catalog can not be changed after the object is instantiated. In general it is probably not wise to try to change the remote host via either the query_url or url methods unless you know what you are doing. Modifying your skycat.cfg file is safer.
Currently only one config file is supported at any given time. If a config file is changed (see the cfg_file class method) the current config is overwritten automatically.
It is not possible to override the catalog file in the constructor. Use the cfg_file class method instead.
Obviously a config per object can be supported but this is probably not that helpful. This will be reconsidered if demand is high.
<B>_selected_catalogB> Catalog name selected by the user and currently configured for this object. Not to be used outside this class..
configure Configure the object. This calls the base class configure , after it has made sure that a sky cat config file has been read (otherwise we will not be able to vet the incoming arguments. <B>_build_queryB> Construct a query URL based on the options.
$url = $q->_build_query();
<B>_parse_queryB> All the SkyCat servers return data in TST format. Need to make sure that column information is passed into the TST parser. <B>_get_allowed_optionsB> This method declares which options can be configured by the user of this service. Generated automatically by the skycat config file and keyed to the requested catalog. <B>_get_default_optionsB> Get the default options that are relevant for the selected catalog.
%defaults = $q->_get_default_options();
These methods are not associated with any particular object.
<B>cfg_fileB> Location of the skycat config file. Default location is $SKYCAT_CFG, if defined, else $HOME/.skycat/skycat.cfg, or $PERLPREFIX/etc/skycat.cfg if there isnt a version in the users home directory
This could be made per-class if there is a demand for running queries with different catalogs. This would also move the config contents into the query object itself.
directory entries are not followed by default although the class can be configured to do so by setting
$Astro::Catalog::Query::SkyCat::FOLLOW_DIRS = 1;
This class could simply read the catalog config file and allow queries on explicit servers directly rather than going to the trouble of auto-generating a class per server. This has the advantage of allowing a user to request USNO data from different servers rather than generating a single USNO class. ie
my $q = new Astro::Catalog::Query::SkyCat( catalog => usnoa@eso, target => HL Tau, radius => 5 );
as opposed to
my $q = new Astro::Catalog::Query::USNOA( target => HL Tau, radius => 5 );
SkyCat FTP server. [URL goes here]
SSN75 [http://www.starlink.rl.ac.uk/star/docs/ssn75.htx//ssn75.html] by Clive Davenhall.
At the very least for testing, an up-to-date skycat.cfg file should be distributed with this module. Whether it should be used by this module once installed is an open question (since many people will not have a version in the standard location).
Copyright (C) 2001-2003 University of Exeter and 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.
Tim Jenness <firstname.lastname@example.org>, Alasdair Allan <email@example.com>
|perl v5.20.3||ASTRO::CATALOG::QUERY::SKYCAT (3)||2016-04-03|