Go up one levelGo to Previous Go to Next

AstroQuery(3)

NAME

 
AstroQuery - A class describing a query to search an astronomical catalog

SYNOPSIS

 
#include "AstroQuery.h"

class AstroQuery {
...
public:
    AstroQuery();
    AstroQuery(const AstroQuery&);
    ~AstroQuery();


    const char* id() const;
    int id(const char* s);

    const WorldCoords& pos() const;
    int pos(const WorldCoords& p);

    int pos(const WorldCoords& p1, const WorldCoords& p2);

    double width() const;
    void width(double w);
    double height() const;
    void height(double h);
    int dim(double w, double h);

    double mag1() const;
    double mag2() const;
    int mag(double m);
    int mag(double m1, double m2);

    double radius1() const;
    double radius2() const;
    int radius(double r);
    int radius(double r1, double r2);

    char** colNames() const;
    const char* colName(int col) const;
    int numCols() const;
    int colNames(int n, char** ar);

    const char* sort() const;
    int sort(const char* s);

    int maxRows() const;
    int maxRows(int n);

    int numSearchCols() const;
    char** searchCols() const;
    char** minValues() const;
    char** maxValues() const;
    int condition(int numSearchCols, char**searchCols,
                  char**minVals, char**maxVals);
};


DESCRIPTION

 
This class is used in star catalog queries to specify which object(s)
to search for.  The class attributes specify the conditions for the
search, such as id, name, position, radius, etc.  All of the fields
are optional. Fields are set to the appropriate null value, if they
are not being used.

PUBLIC METHODS

 
All of the public methods in this class simply access class members
(set and get member values).  Methods with arguments set the member
values and return the error status.  Methods with no arguments return
the value.

id() const
id(const char* s)
        Get or set the value for the object id to search for.

pos() const
pos(const WorldCoords& p)
        Get or set the center position for a radius search.

pos(const WorldCoords& p1, const WorldCoords& p2)
        Calculate center position, width and height from the 2 corner
        positions.

width() const
width(w)
height() const
height(h)
        Get/set the value of the width or height fields (in arcmin).

dim(double w, double h)
        Set the values of the width and height fields in arcmin.

mag1()
mag2()
        Get the max (or min and max) magnitude fields.

mag(double m);
        Set the max magnitude for the query (min is 0.0).

mag(double m1, double m2)
        Set min/max magnitude with check.

radius1() const
radius2() const
        Get max (or min and max) radius values in arcmin.

radius(double r)
        Set the max radius for the query in arcmin (min is 0.0).

radius(double r1, double r2)
        Set min/max radius with check.

colNames() const
        Return array of column names.

colName(int col) const
        Return name of given column.

numCols() const
        Return number of columns.

colNames(int n, char** ar)
        Set the number of columns and the column names.

sort() const
sort(const char* s)
        Get or set the sort column.

maxRows() const
maxRows(int n)
        Get or set the max number of rows to return from a query.

numSearchCols() const
searchCols() const
minValues() const
maxValues() const
condition(int numSearchCols, char**searchCols, char**minVals,
        char**maxVals)
        Get or set the search conditions as min and max values for
        given columns (Not implemented yet).

SEE ALSO

 
AstroCatalog
 


- - - - - -
Last change: 07 May 99

 


Go up one levelGo to Previous Go to Next

Please send questions or comments to abrighto@eso.org@eso.org.
Copyright © 1998 ESO - European Southern Observatory