Star Catalog (photometry.catalog)

Create catalogs of stars in a given TESS observing sector.

Code author: Rasmus Handberg <>

photometry.catalog.catalog_sqlite_search_footprint(cursor, footprint, columns='*', constraints=None, buffer_size=5, pixel_scale=21.0)[source]

Query the SQLite catalog files for a specific footprint on sky.

This function ensures that edge-cases near the poles and around the RA=0 line are handled correctly.

  • cursor (sqlite3.Cursor) – Cursor to catalog SQLite file.

  • footprint (ndarray) – 2D ndarray of RA and DEC coordinates of the corners of footprint.

  • columns (str) – Default is to return all columns.

  • constraints (str) – Additional constraints on the query in addition to the footprint.

  • buffer_size (float) – Buffer to add around stamp in pixels. Default=5.

  • pixel_scale (float) – Size of single pixel in arcsecs. Default=21.0 (TESS).


List of rows matching the query.

Return type:


Code author: Rasmus Handberg <>

photometry.catalog.download_catalogs(input_folder, sector, camera=None, ccd=None)[source]

Download catalog SQLite files from TASOC cache into input_folder.

This enables users to circumvent the creation of catalog files directly using make_catalog(), which requires the user to be connected to the TASOC internal networks at Aarhus University. This does require that the TASOC personnel have made catalogs available in the cache for the given sector, otherwise this function will throw an error.

  • input_folder (str) – Target directory to download files into. Should be a TESSPHOT input directory.

  • sector (int) – Sector to download catalogs for.

  • camera (int, optional) – Camera to download catalogs for. If not specified, all cameras will be downloaded.

  • ccd (int, optional) – CCD to download catalogs for. If not specified, all CCDs will be downloaded.


NotADirectoryError – If target directory does not exist.

Code author: Rasmus Handberg <>

photometry.catalog.make_catalog(sector, input_folder=None, cameras=None, ccds=None, coord_buffer=0.2, overwrite=False)[source]

Create catalogs of stars in a given TESS observing sector.

  • sector (int) – TESS observing sector.

  • input_folder (str or None) – Input folder to create catalog file in. If None, the input directory in the environment variable TESSPHOT_INPUT is used.

  • cameras (iterable or None) – TESS cameras (1-4) to create catalogs for. If None all cameras are created.

  • ccds (iterable or None) – TESS ccds (1-4) to create catalogs for. If None all ccds are created.

  • coord_buffer (float) – Buffer in degrees around each CCD to include in catalogs. Default=0.2.

  • overwrite (bool) – Overwrite existing catalogs. Default=``False``.


This function requires the user to be connected to the TASOC network at Aarhus University. It connects to the TASOC database to get a complete list of all stars in the TESS Input Catalog (TIC), which is a very large table.


RuntimeError – If settings could not be correctly loaded from TASOC databases.

Code author: Rasmus Handberg <>