run_test_for_contaminant

tessilator.tessilator.run_test_for_contaminant(xy_arr, file_in, t_cont, d_target, scc, aper_rad=1.0, sky_ann=(6.0, 8.0), store_lc=True, lc_cont_dir='lc_cont')[source]

Run the periodogram analyses for neighbouring contaminants if required.

Parameters:
xy_arrlist, size=2

The X and Y positions of the contaminant (the output form the “find_XY_cont” function).

file_instr

The name of the fits file containing the contaminant.

t_contastropy.table.Table

A single row from the contamination table which has details of the flux contribution.

d_targetdict

The dictionary returned from the periodogram analysis of the target star.

scclist, size=3

List containing the sector number, camera and CCD.

aper_radfloat, optional, default=1.

The size of the aperture radius in pixels.

sky_anntuple, optional, default=(6.,8.)

A 2-element tuple defining the inner and outer annulus to calculate the background flux.

store_lcbool, optional, default=False

Choose to save the cleaned lightcurve to file

lc_cont_dirstr, optional, default=’lc’

The directory used to store the lightcurve files for contaminants if store_lc==True.

Returns:
name_lcstr

The name of the file that the contaminant lightcurve will be saved to.

labels_contstr (a, b, c or d)

A single character which assess if the calculated period for the target could actually come from the contaminant.

  1. At least 1 contaminant has a similar period to the target.

  2. No contaminants with similar periods

  3. The aperture photometry extraction failed for the contaminant

  4. Something went wrong with the routine.

clean_norm_lc_contastropy.table.Table
d_contdict

The dictionary returned from the periodogram analysis of the contaminant star.