starbase

search - search a table using a fast access method.

SYNOPSIS

    `search` *table* [options] < *keytable*

DESCRIPTION

The search program may be used in combination with the index program to find data rows in large tables very quickly. First the table must be indexed. Index may sort the data table or create an auxillery index file depending on how it is run. Search will use the created index to find rows in the table that match the given options.

OPTIONS

Program Options:

Search Specification Options:

    C2 is a column from the table to be searched.  This is generally the
    indexed table.  C1 is a column from the table of input keys.  These
    are the values to be searched for.  The examples are given along with
    the specification of each type of search option.
    john@panic: search object.tab -C2 X:XPixel Y:YPixel 4 < key.tab
Search in a cartesian coordinate system sphere of 1500 units raduis. - 
john@panic: search XYZ.tab -C3 X Y Z 1500 < XYZ.key

X       Y       Z       Data    Mag     RA              Dec
------- ------- ------- ----    ---     ---------       ---------
2875.33 3921.35 4284.41 Obj7    22       0:43:37.32     41.245383
3368.52 3523.19 4311.07 Obj5    21       0:43:15.42     41.190227 ```
    john@panic: search coords.tab -S1d RA 0.1 -S1d Dec 0.1 < range.key

    X       Y       Z       Data    Mag     RA              Dec
    ------- ------- ------- ----    ---     ---------       ---------
    3476.18 3935.77 3500.07 Obj8    18      10.794499       41.247551
    3992.21 3500.07 4854.75 Obj4    18      10.699151       41.187092
Search in a spherical coordinate system circle of 0.1 degree raduis.  Here
the units of RA are in hours (the default) while the units of Dec are
degrees (the default).  The spherical coordinate system option knows how
to combine columns of a spherical system with different units.
    john@panic: search coords.tab -S2 RA Dec 0.1 < range.key

    X       Y       Z       Data    Mag     RA              Dec
    ------- ------- ------- ----    ---     ---------       ---------
    3476.18 3935.77 3500.07 Obj8    18       0:43:10.68     41.247551
    3992.21 3500.07 4854.75 Obj4    18       0:42:47.80     41.187092
    4365.01 4509.67 5888.78 ObjC    18       0:42:31.26     41.327306
Search in a spherical coordinate system circle of 0.16 degree raduis.
This command sets the spherical coordinates system units to degrees for
each axis and the search radius.  The RA, Dec and the search range will be
in degrees.
    john@panic: search coords.tab -S2ddd RA Dec 0.16 < range.key

    X       Y       Z       Data    Mag     RA              Dec
    ------- ------- ------- ----    ---     ---------       ---------
    2875.33 3921.35 4284.41 Obj7    22      10.905480       41.245383
    3368.52 3523.19 4311.07 Obj5    21      10.814261       41.190227
    3390.06 3035.48 3476.18 Obj2    18      10.810160       41.122493
    john@panic: search coords.tab -S2ddd RA Dec 0.16 -R Mag 18 20 < range.key

    X       Y       Z       Data    Mag     RA              Dec
    ------- ------- ------- ----    ---     ---------       ---------
    3390.06 3035.48 3476.18 Obj2    18      10.810160       41.122493
    3476.18 3935.77 3500.07 Obj8    18      10.794499       41.247551
    3992.21 3500.07 4854.75 Obj4    18      10.699151       41.187092

SEE ALSO