ucac

This module defines the interface to the UCAC4 star catalog.

Catalog Description

The UCAC4 is a catalog of 113 million stars with 105 million including proper motion solutions. It is complete to about a magnitude of 16. It is generally very accurate for positions, but less so for magnitudes.

The UCAC 4 uses a file based database system that is fast for small queries, but can be slow for queries over a large area. It also does not include blended stars (stars that are close enough that they appear as a single star in an image). If you need faster retrieval and/or blended stars then you should use the giant_catalog instead, which is built primarily using the UCAC4 catalog.

Use

The UCAC4 catalog can be used anywhere that a star catalog is required in GIANT. It is stored in a number of index and binary data files on disk and takes about 9 GB of space. If you attempt to initialize the class and point it to a directory that does not contain the UCAC4 data it will ask you if you want to download the catalog (note that the UCAC4 data is not included by default so if you have not downloaded it yourself you will definitely need to). If you answer yes, be aware that it may take a very long time to download.

Once you have initialized the class (and downloaded the data files), then you can access the catalog as you would any GIANT usable catalog. Simply call query_catalog() to get the GIANT records for the stars as a dataframe with columns according the GIANT_COLUMNS. This class also provides 2 helper methods, query_catalog_raw() which can be used to retrieve the raw catalog entries (instead of the GIANT entries) and cross_ref_tycho() which can be used to get the raw Tycho 2 catalog records for a UCAC4 star (if available).

Classes

UCAC4

This class provides access to the UCAC4 star catalog.

ColumnOrder

This enumeration specifies whether a column is sorted in ascending or descending order.

Methods

query_catalog

This method queries stars from the catalog that meet specified constraints and returns them as a DataFrame with columns of GIANT_COLUMNS.

query_catalog_raw

This method queries stars from the catalog that meet specified constraints and returns them as a DataFrame or as an iterable of dataframes where the columns are the raw catalog files.

cross_ref_tycho

This retrieves the Tycho 2 catalog records for the requested UCAC4 star Zone, RNZ values.

dump_to_sqlite

Use this to write the catalog to a sqlite3 database in the GIANT format.

get_index_ind

This determines the location in the index that corresponds to the requested zone and block

get_zone_block

This tells you the zone and block number that correspond to a specific ra dec pair

convert_to_giant_catalog

This method converts records in the catalog format into records in the GIANT format.

Functions

binary_search

This helper function does a binary search on a sorted file with fixed width lines.

check_file

This checks the md5sum of a file to ensure it wasn't corrupted.

download_ucac

This function downloads the UCAC4 catalog from vizier to the target directory.