GIANTCatalogue

giant.catalogues.giant_catalogue:

class giant.catalogues.giant_catalogue.GIANTCatalogue(db_file=PosixPath('/Users/aliounis/Repos/giant_public/giant/catalogues/data/giant_cat.db'), include_proper_motion=True)[source]

This class provides access to the default GIANT star catalogue built from the UCAC4 and Tycho2 Catalogues.

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 2 additional methods get_ucac4_record() and get_tycho2_record() to get the original record that was used to create the GIANT catalogue record. These methods aren’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 file where the database is stored (if you are using one that is different from the default). If the catalogue file does not exist it will ask you if you want to build it, and if you answer yes, it will dispatch to build_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:
  • db_file (Path | str) – The file containing the sqlite3 database that the stars are stored in

  • 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

property catalogue: Connection

This is a sqlite3 connection object which is used to read from the catalogue.

It should not be used externally unless you really know what you’re doing…

Summary of Methods

get_all_with_criteria

This method queries star records from the database based off of location and magnitude requirements.

get_from_ids

This method queries star records from the database based off of ID (rnm in the database).

get_tycho2_record

This method can be used to retrieve the corresponding full (not GIANT) Tycho 2 records for a set of GIANT catalogue stars.

get_ucac4_record

This method can be used to retrieve the corresponding full (not GIANT) UCAC4 records for a set of GIANT catalogue stars.

query_catalogue

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