collect_contamination_data

tessilator.tessilator.collect_contamination_data(t_targets, ref_name, targ_name, gaia_sys=True, ap_rad=1.0, n_cont=10, cont_rad=10.0, mag_lim=3.0, tot_attempts=3)[source]

Collect data on contamination sources around selected targets.

This function takes a target table and, if requested, prints out details of the total flux contribution from neighbouring contaminating sources for each target. It also returns a table (in descending order) of neighbouring contaminants that contribute the most flux in the target aperture, if requested.

Parameters:
t_targetsastropy.table.Table

A target table with columns:

  • name: name of the target (str)

  • source_id: Gaia DR3 source identifier (str)

  • ra: right ascension

  • dec: declination

  • parallax: parallax

  • Gmag: Gaia DR3 apparent G-band magnitude

  • BPmag: Gaia DR3 apparent BP-band magnitude

  • RPmag: Gaia DR3 apparent RP-band magnitude

ref_namestr

The reference name for each subdirectory which will connect all output files.

ap_radfloat, optional, default=1.

The aperture radius from the aperture photometry (in pixels).

gaia_sysbool, optional, default=True

Choose to format the data based on Gaia DR3. Note that no contamination can be calculated if this is False.

Returns:
t_targetsastropy.table.Table

Input target table with 3 columns added containing details of the contamination: “log_tot_bg”, “log_max_bg”, “num_tot_bg”.

t_contastropy.table.Table

Table containing details of the contamination flux from nearby sources, in descending order of “log_tot_bg”.

cont_dirstr

The directory that contains the contamination files.