uk.ac.starlink.ttools.cone
Class ConeMatcher

java.lang.Object
  extended by uk.ac.starlink.ttools.cone.ConeMatcher
All Implemented Interfaces:
TableProducer

public class ConeMatcher
extends Object
implements TableProducer

TableProducer which does the work for a multiple cone search-type sky crossmatch operation.

Since:
31 Aug 2007
Author:
Mark Taylor

Constructor Summary
ConeMatcher(ConeSearcher coneSearcher, TableProducer inProd, QuerySequenceFactory qsFact, boolean bestOnly)
          Convenience constructor which selects default values for most options.
ConeMatcher(ConeSearcher coneSearcher, TableProducer inProd, QuerySequenceFactory qsFact, boolean bestOnly, int parallelism, String copyColIdList, String distanceCol, uk.ac.starlink.table.JoinFixAction inFixAct, uk.ac.starlink.table.JoinFixAction coneFixAct)
          Full-functioned constructor.
 
Method Summary
static uk.ac.starlink.table.StarTable getConeResult(ConeSearcher coneSearcher, boolean bestOnly, String distanceCol, double ra0, double dec0, double sr)
          Performs a cone search and returns the resulting table with appropriate filtering operations applied.
 uk.ac.starlink.table.StarTable getTable()
          Returns the result, which is a join between the input table and the table on which the cone searches are defined.
 void setStreamOutput(boolean streamOutput)
          Determines whether this object's getTable() method will produce a one-read-only table or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConeMatcher

public ConeMatcher(ConeSearcher coneSearcher,
                   TableProducer inProd,
                   QuerySequenceFactory qsFact,
                   boolean bestOnly)
Convenience constructor which selects default values for most options.

Parameters:
coneSearcher - cone search implementation
inProd - source of input table (containing each crossmatch specification)
qsFact - object which can produce a ConeQueryRowSequence
bestOnly - true iff only the best match for each input table row is required, false for all matches within radius

ConeMatcher

public ConeMatcher(ConeSearcher coneSearcher,
                   TableProducer inProd,
                   QuerySequenceFactory qsFact,
                   boolean bestOnly,
                   int parallelism,
                   String copyColIdList,
                   String distanceCol,
                   uk.ac.starlink.table.JoinFixAction inFixAct,
                   uk.ac.starlink.table.JoinFixAction coneFixAct)
Full-functioned constructor.

Parameters:
coneSearcher - cone search implementation
inProd - source of input table (containing each crossmatch specification)
qsFact - object which can produce a ConeQueryRowSequence
bestOnly - true iff only the best match for each input table row is required, false for all matches within radius
parallelism - number of threads to concurrently execute matches - only >1 if coneSearcher is thread-safe
copyColIdList - space-separated list of column identifiers for columns to be copied to the output table, "*" for all columns
distanceCol - name of column to hold position separation values, or null for no separation column
inFixAct - column name deduplication action for input table
coneFixAct - column name deduplication action for result of cone searches
Method Detail

setStreamOutput

public void setStreamOutput(boolean streamOutput)
Determines whether this object's getTable() method will produce a one-read-only table or not. If set true, then the output table is good for only a single read (getRowSequence may be called only once). The default is false.

Parameters:
streamOutput - whether output is streamed

getTable

public uk.ac.starlink.table.StarTable getTable()
                                        throws IOException,
                                               uk.ac.starlink.task.TaskException
Returns the result, which is a join between the input table and the table on which the cone searches are defined.

Note

: if the streamOut attribute of this class has been set the result will be a one-read-only table, designed for streaming.

Specified by:
getTable in interface TableProducer
Returns:
joined table
Throws:
IOException
uk.ac.starlink.task.TaskException

getConeResult

public static uk.ac.starlink.table.StarTable getConeResult(ConeSearcher coneSearcher,
                                                           boolean bestOnly,
                                                           String distanceCol,
                                                           double ra0,
                                                           double dec0,
                                                           double sr)
                                                    throws IOException
Performs a cone search and returns the resulting table with appropriate filtering operations applied. The resulting table will fall strictly within the specified search region and will contain a restricted set of rows if that has been requested.

If a non-null distanceCol parameter is supplied, the final column in the table will contain the angle in degrees between the region centre and the position described in the row.

If no records in the cone are found, the return value may either be null or (preferably) an empty table with the correct columns.

Parameters:
coneSearcher - cone search implementation
bestOnly - true iff only the best match for each input table row is required, false for all matches within radius
distanceCol - name of column to hold distance information int output table, or null
ra0 - right ascension in degrees of region centre
dec0 - declination in degrees of region centre
sr - search radius in degrees
Returns:
filtered result table, or null
Throws:
IOException


Copyright © 2009 Central Laboratory of the Research Councils. All Rights Reserved.