run_sql_query_contaminants

tessilator.contaminants.run_sql_query_contaminants(t_target, cont_rad=10.0, mag_lim=3.0, tot_attempts=3)[source]

Perform an SQL query to identify neighbouring contaminants.

This function generates the SQL query to identify targets within a specified pixel radius. The function returns a table of Gaia information on the neighbouring sources which is used to quantify the flux contamination within the target aperture.

Parameters:
t_targetastropy.table.Table

The input table

cont_radfloat, optional, default=10.

The maximum pixel radius to search for contaminants

mag_limfloat, optional, default=3.

The faint magnitude limit to search for contaminants, where this value is relative to the target. E.G., a value of 3. is 3. magnitudes fainter than the target.

tot_attemptsint, optional, default=3

The total number of SQL query attempts to be made, in case of http response issues.

Returns:
t_gaiaastropy.table.Table

The Gaia results table from the SQL query.