API documentation¶
tessilator.tessilator Module¶
Functions used by the tessilator.
Functions¶
Create a template astropy table to store tessilator results. |
|
Retrieve the input parameters to run the tessilator program. |
|
|
Set up the file names to store data |
|
Check if the input file needs modifying at all. |
|
Read input data and convert to an astropy table ready for analysis |
|
Collect data on contamination sources around selected targets |
|
Once the tessilator has analysed a target, the results are printed line by line to a table. |
|
Print a line with input data if tessilator fails for a given target |
|
Aperture photometry, lightcurve cleaning and periodogram analysis. |
|
Calculate the time taken for a process. |
|
Identify the pixel X-Y positions for contaminant sources. |
|
Run the periodogram analyses for neighbouring contaminants if required. |
|
Get the pixel X-Y positions for all targets in a Sector/Camera/CCD mode. |
|
Function which returns a list of fits files corresponding to a given Sector, Camera and CCD configuration |
|
Makes a 2D cutout object of a target using the median time-stacked image |
|
Download TESS cutouts and store to a list for lightcurve analysis. |
|
Download cutouts and run lightcurve/periodogram analysis for one target. |
|
Run the tessilator for all targets. |
|
Run the tessilator for targets in a given Sector/Camera/CCD configuration |
|
Iterate over all cameras and CCDs for a given sector |
tessilator.lc_analysis Module¶
Alexander Binks & Moritz Guenther, January 2023
Licence: MIT 2023
This module contains functions to perform aperture photmetry and clean lightcurves. These are:
aper_run - returns a numpy array containing the times, magnitudes and fluxes from aperture photometry.
clean_lc/detrend_lc/make_lc - these 3 functions are made to remove spurious data points, ensure that only “strings” of contiguous data are being processed, and each string is detrended using a series of decision processes. Finally, the lightcurve is pieced together and make_lc returns a table containing the data ready for periodogram analysis.
run_LS - function to conduct Lomb-Scargle periodogram analysis. Returns a table with period measurements, plus several data quality flags. If required a plot of the lightcurve, periodogram and phase-folded lightcurve is provided.
Functions¶
|
Locate the X-Y position for targets in a given Sector/CCD/Camera mode |
|
Perform aperture photometry for the image data. |
|
Chooses the most appropriate polynomial fit, using the Aikaike Information Criterion |
|
Remove data points from the lightcurve that are likely to be spurious. |
|
Removes very sparse bits of data from the lightcurve when there are 3 or more components. |
|
Calculate the mean and standard deviation of an array which is split into N components. |
|
Calculate the moving average of an array. |
|
Identify if the lightcurve has jumps. |
|
Choose how to detrend the lightcurve, either as one component or in parts. |
|
Detrend and normalise the lightcurves. |
|
Construct the normalised TESS lightcurve. |
|
An algorithm to identify the second-highest peak in the periodogram |
|
Construct a simple Gaussian. |
|
Returns the best parameters (y_offset, amplitude, and phase) to a regular sinusoidal function. |
|
Applies the Gaussian fit to the periodogram. |
|
Run Lomb-Scargle periodogram and return a dictionary of results. |
|
Identify neighbouring contaminants that may cause the periodicity. |
tessilator.contaminants Module¶
Functions¶
|
Perform an SQL Query to identify neighbouring contaminants. |
|
Quantify the flux contamination from a neighbouring source. |
|
Estimate flux from neighbouring contaminant sources. |
tessilator.makeplots Module¶
Generate pixel images, light-curves and periodogram plots
Functions¶
|
Produce a plot of tessilator results. |
tessilator.maketable Module¶
Make tabular data for tessilator
This module contains the functions required to convert the input data into correct formatted astropy tables to be used for further analysis in the tessilator.
Functions¶
|
Generate the formatted astropy table from a list of target names. |
|
Generate the formatted astropy table from a list of coordinates. |
|
Generate the formatted astropy table from a pre-formatted astropy table. |
|
Reads the input table and returns a table in the correct format for TESSilator. |
tessilator.fixedconstants Module¶
Module containing fixed constants for the tessilator
These are the pixel size, the typical full-width half maximum of the pixel response function and the TESS zeropoints