### Catalogs

> DS9 provides full support for loading, displaying, filtering, and saving catalogs. DS9 allows you to overlay symbols from multiple catalogs on the current image.

> Local and on-line catalog access is supported. Most major catalogs can be retrieved from online servers. Both the CDS and SDSS catalog servers are now supported. Local catalog files in starbase (rdb) or CSV (with or without header) are supported.

> On-line catalogs are available via services provided by the VizieR catalog access tool, CDS, Strasbourg, France (VizieR is a joint effort of the Centre de Donnees Astronomiques de Strasbourg and ESA-ESRIN Information Systems Division) and by the Sloan Digital Sky Survey.

> A selection of popular catalogs is provided in the Analysis menu. In addition, you can search for other catalogs based on title, keywords, mission, wavelength, and object type.

> When a catalog is overlayed on an image, each displayed catalog symbol consists of a shape, color, and text. An advanced symbol editor is available that allows you to specify the shape, size, color, and text of each symbol, based on catalog column values. These symbol expressions can be saved for future use.

> Along with the overlay display, a catalog list is provided in a separate window. It displays the column values for each catalog object. The catalog list can be sorted and filtered, and the catalog display will be automatically updated. Advanced filtering options are available. Catalogs can be loaded and saved as local files in ASCII Starbase format. Each catalog contains header information which can be displayed. The list can be printed separately from the image.

> An interactive connection between the displayed catalog symbols and the catalog list is provided. When you select one or more rows within the catalog list, the corresponding symbols are highlighted on the image display. Conversely, selecting multiple symbols on the image display will highlight the corresponding rows within the catalog list. Catalog symbols can be converted to regions for use with analysis tasks.

> Filter Option

> The catalog list can be sorted and filtered, and the catalog display will be automatically updated. A filter is conditional expression, when evaluated for each row of the catalog, if true, the row is displayed, and if false, the row is not displayed. The conditional expression can be any valid TCL expression. The value of a column may be indicated with `$<column name>`.

> > `$_RAJ2000>180. && $_RAJ2000<270.`
> > `$Jmag>11`
> > `log($Kmag*10)<.3`

> Advanced Symbol Editor

> An advanced symbol editor is available that allows you to specify the shape, size, color, and text of each symbol, based on catalog column values. For each row of the catalog, one or more conditional expressions are evaluated. For the first expression to evaluate true, a given symbol is displayed, with the specified shape, color, size and text properties. As with the filter, the value of a particular column can be indicated as `$<column name>.`

> For the condition entry, the expression you type in is automatically evaluated via TCL `expr` after macro expansion.

> > `1 # always`
> > `0 # never`
> > `true # always`
> > `false # never`
> > `$Jmag>2 # conditional`
> > `sin($Jmag)>.5 # conditional`
> > `[string equal $Class SNR] # conditional`
> > `[regexp {*SNR*} $Class] # conditional`

> For the size, size2, and angle entries, the expression you type in is also automatically evaluated via TCL `expr` after macro expansion.

> > `2 # value of '2' is used`
> > `$Jmag # value of column Jmag is used`
> > `$Jmag/2. # value of column Jmag div 2 is used`
> > `(4+2)/3 # value of '2' is used`

> For the text portion, this is not true. It is assumed to be text, unless you explicitly use an `expr` operator.

> > `foo # will put 'foo' above the symbol`
> > `$Jmag # will put the value of column Jmag above the symbol`
> > `(4+2)/3 # will put the text '(4+2)/3' above the symbol`
> > `[expr (4+2)/3] # will put the text '2' above the symbol`
> > `[expr $Jmag/2.] # will take the value of Jmag and div by 2`

> And finally, one special case for shape = text and text = empty. In this case, the row number is displayed.