Tycho2

giant.catalogues.tycho:

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

This class provides access to the Tycho 2 star catalogue.

This class is a fully functional catalogue for GIANT and can be used anywhere that GIANT expects a star catalogue. As such, it implements the include_proper_motion to turn proper motion on or off as well as the method query_catalogue() which is how stars are queried into the GIANT format. In addition, this catalogue provides 1 additional method query_catalogue_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 catalogue files index.dat, suppl_1.dat, and tyc2.dat are contained. If the catalogue 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 catalogue (which takes a long time in most instances). Once the class is initialized, you can query stars from it using query_catalogue() which will return a dataframe of the star records with GIANT_COLUMNS columns.

Parameters:
  • directory (Path | str) – The directory containing the Tycho 2 catalogue 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

convert_to_giant_format

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.

query_catalogue

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

query_catalogue_raw

This method queries stars from the catalogue that meet specified constraints and returns them as a DataFrame where the columns are the raw catalogue columns.

retrieve_record

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