TESSCutLightcurve#
- class elk.lightcurve.TESSCutLightcurve(radius, lk_search_result=None, tpfs=None, cutout_size=99, percentile=80, n_pca=6, spline_knots=5, periodogram_freqs=array([0.04, 0.05, 0.06, ..., 10.97, 10.98, 10.99]), save_pixel_periodograms=True, progress_bar=False)[source]#
Bases:
BasicLightcurveA lightcurve constructed from a TESSCut search with various correction functionalities
- Parameters
- radiusfloat
Radius of the cluster in degrees.
- lk_search_result
lightkurve.SearchResult, optional Search result from a LightKurve tesscut call, by default None
- tpfs
lightkurve.TessTargetPixelFile, optional Target pixel files, by default None
- cutout_sizeint, optional
Cutout size for the TESSCut call, by default 99
- percentileint, optional
Which percentile to use in the upper limit calculation, by default 80
- n_pcaint, optional
Number of principle components to use in the DesignMatrix, by default 6
- spline_knots: `int`, optional
Number of knots to include in the spline corrector, by default 5. If None, spline corrector will not be used
- periodogram_freqs
numpy.ndarray, optional Frequencies at which to evaluate any periodograms, by default np.arange(0.04, 11, 0.01)
- progress_barbool, optional
Whether to show a progress bar of pixel correction, by default False
Attributes Summary
Lightcurve constructed using all target pixel files
Lightcurve constructed using only quality target pixel files
Target pixel files that have a quality flag of 0 and a positive flux_err
TESS sector in which observations were taken
All target pixel files for the lightcurve
Lightcurve constructed using only quality target pixel files and a circle aperture mask
Methods Summary
Generate a circular aperture mask based on the radius and cutout_size of this lightcurve
Correct the lightcurve using the method described in Wainer+2023
correct_pixel(i, j)Correct an individual pixel of the lightcurve
diagnose_lc_periodogram(output_path[, ...])Create gif showing pixels that contribute power to periodogram for different frequency ranges
Test whether this lightcurve has (1) any quality TPFs, (2) that observations are not within ~0.28 degrees of the edge of the detector (such that NaN values would appear in the cutout) and (3) that it isn't part of TESS Sector 1, which has an unremovable systematic.
Attributes Documentation
- uncorrected_lc[source]#
Lightcurve constructed using only quality target pixel files and a circle aperture mask
Methods Documentation
- circle_aperture()[source]#
Generate a circular aperture mask based on the radius and cutout_size of this lightcurve
- Returns
- mask
numpy.ndarray Aperture mask
- mask
- correct_pixel(i, j)[source]#
Correct an individual pixel of the lightcurve
- Parameters
- i, jint
Indices for the pixel
- Returns
- systematics_model
numpy.ndarray A model for the systematics in the pixel
- full_model
numpy.ndarray The full model for the pixel lightcurve
- full_model_normalized
numpy.ndarray The normalised model for the pixel lightcurve
- systematics_model
- diagnose_lc_periodogram(output_path, freq_bins='auto', identifier='', query_simbad=True)[source]#
Create gif showing pixels that contribute power to periodogram for different frequency ranges
The GIF has 3 panels, the first shows the overall TPFs and aperture, the second shows the maximum power in each pixel for this frequency bin (and is annotated with the frequency/range used for this frame) and the last panel shows the overall ensemble light curve periodogram with the frame’s frequency range highlighted.
NOTE: self.correct_lc must have already been run and self.save_pixel_periodograms must be true.
- Parameters
- output_pathstr
Path to a folder in which to output the gif and frames
- freq_binsstr or int or
ndarray, optional Frequency bins to use for the GIF. Either ‘auto’ to create a frame for each peak in the periodogram, an integer to use log-spaced bins in the periodogram range or an array of bin edges, by default ‘auto’
- identifierstr, optional
An identifier for this target to put in the title (e.g. the cluster name), by default ‘’
- fails_quality_test()[source]#
Test whether this lightcurve has (1) any quality TPFs, (2) that observations are not within ~0.28 degrees of the edge of the detector (such that NaN values would appear in the cutout) and (3) that it isn’t part of TESS Sector 1, which has an unremovable systematic.
- Returns
- flagbool
Flag of whether the test was passed