Tycho2

giant.catalogs.tycho:

class giant.catalogs.tycho.Tycho2(directory=PosixPath('/Users/aliounis/Repos/giant_public/giant/catalogs/data/TYCHO2'), include_proper_motion=True)[source]

This class provides access to the Tycho 2 star catalog.

This class is a fully functional catalog for GIANT and can be used anywhere that GIANT expects a star catalog. As such, it implements the include_proper_motion to turn proper motion on or off as well as the method query_catalog() which is how stars are queried into the GIANT format. In addition, this catalog provides 1 additional method query_catalog_raw() which returns the raw Tycho 2 records for stars instead of the GIANT records. This method isn’t used anywhere by GIANT itself, but may be useful if you are doing some advanced analysis.

To use this class simply initialize it, pointing to the directory where the Tycho 2 catalog files index.dat, suppl_1.dat, and tyc2.dat are contained. If the catalog files do not exist it will ask you if you want to download them, and if you answer yes, it will download the Tycho 2 catalog (which takes a long time in most instances). Once the class is initialized, you can query stars from it using query_catalog() which will return a dataframe of the star records with GIANT_COLUMNS columns.

Parameters:
  • directory (Path | str) – The directory containing the Tycho 2 catalog files. This should contain index.dat, suppl_1.dat, and tyc2.dat as csv files.

  • include_proper_motion (bool) – A boolean flag specifying whether to apply proper motion when retrieving the stars

include_proper_motion

Apply proper motion to queried star locations to get the location at the requested time

Summary of 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 where the columns are the raw catalog columns.

retrieve_record

This method can be used to retrieve a single star by ID from the tycho 2 main catalog or first supplement file.

empty_frame

This simple helper function returns an empty dataframe with the appropriate columns.

nan_frame

This simple helper function returns a dataframe with a single NaN filled row.

convert_to_giant_format

This static method converts raw tycho2 records into GIANT records so they can be used in star id.