Tycho2¶
- 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 methodquery_catalog()
which is how stars are queried into the GIANT format. In addition, this catalog provides 1 additional methodquery_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 withGIANT_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
This method queries stars from the catalog that meet specified constraints and returns them as a DataFrame with columns of |
|
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. |
|
This method can be used to retrieve a single star by ID from the tycho 2 main catalog or first supplement file. |
|
This simple helper function returns an empty dataframe with the appropriate columns. |
|
This simple helper function returns a dataframe with a single NaN filled row. |
|
This static method converts raw tycho2 records into GIANT records so they can be used in star id. |