TODO-list generation (photometry.todolist)

Create the TODO list which is used by the pipeline to keep track of the targets that needs to be processed.

photometry.todolist.calc_cbv_area(catalog_row, settings)[source]

CBV area that a given target falls within.

Parameters
  • catalog_row (dict) – Target catalog entry.

  • settings (dict) – Catalog settings.

Returns

CBV area that the star falls within.

Return type

int

photometry.todolist.edge_distance(row, column, aperture=None, image_shape=None)[source]

Distance to nearest edge.

Parameters
  • row (ndarray) – Array of row positions to calculate distance of.

  • column (ndarray) – Array of column positions to calculate distance of.

  • aperture (ndarray, optional) – Boolean array indicating pixels to be considered “holes” (False) and good (True).

  • image_shape (tuple, optional) – Shape of aperture image.

Returns

Distance in pixels to the nearest edge (outer or internal).

Return type

float

photometry.todolist.make_todo(input_folder=None, cameras=None, ccds=None, overwrite=False, find_secondary_targets=True, output_file=None)[source]

Create the TODO list which is used by the pipeline to keep track of the targets that needs to be processed.

Will create the file todo.sqlite in the directory.

Parameters
  • input_folder (string, optional) – Input folder to create TODO list for. If None, the input directory in the environment variable TESSPHOT_INPUT is used.

  • cameras (iterable of integers, optional) – TESS camera number (1-4). If None, all cameras will be included.

  • ccds (iterable of integers, optional) – TESS CCD number (1-4). If None, all cameras will be included.

  • overwrite (boolean) – Overwrite existing TODO file. Default=``False``.

  • find_secondary_targets (boolean) – Should secondary targets from TPFs be included? Default=True.

  • output_file (string, optional) – The file path where the output file should be saved. If not specified, the file will be saved into the input directory. Should only be used for testing, since the file would (proberly) otherwise end up with a wrong file name for running with the rest of the pipeline.

Raises

NotADirectoryError – If the specified input_folder is not an existing directory.

Code author: Rasmus Handberg <rasmush@phys.au.dk>