ScatterLightCorrector
ScatterLightCorrector
A class to handle scatter light correction for TESS data.
Parameters:
-
sector
(int
) –The TESS sector number.
-
camera
(int
) –The TESS camera number.
-
ccd
(int
) –The TESS CCD number.
-
fname
(str
, default:None
) –Path to the FITS file containing the scatter light cube. If None, a default path is constructed based on the sector, camera, and CCD.
get_original_ffi_times
Retrieve the original frame times from FFIs.
Returns:
-
ndarray
–Array of original frame times in JD format.
evaluate_scatterlight_model
evaluate_scatterlight_model(
row_eval: ndarray,
col_eval: ndarray,
times: ndarray,
method: str = "sl_cube",
) -> Tuple[ndarray, ndarray]
Evaluate the scatter light model and compute SL fluxes at given pixels and times.
Parameters:
-
row_eval
(ndarray
) –Array of row indices for evaluation.
-
col_eval
(ndarray
) –Array of column indices for evaluation.
-
times
(ndarray
) –Array of times for evaluation.
-
method
(str
, default:'sl_cube'
) –Method to use for evaluation. Options are "sl_cube" or "nn". Default is "sl_cube".
Returns:
-
sl_flux
(ndarray
) –Scatter light flux at the specified pixels and times.
-
sl_fluxerr
(ndarray
) –Scatter light flux error at the specified pixels and times.
Raises:
-
ValueError
–If the evaluation grid or times are out of bounds, or if an invalid method is specified.
-
NotImplementedError
–If the "nn" method is selected (not implemented).
Notes
(5/9/2025)
The errors returned by the sl_cube
method, which are computed by interpolating
a downsize version of the SL errors agregation done in tess_backml.BacgroundData
is not a propper account for the real uncertainties of the evaluated SL flux,
as the this does not account for the uncertainties of interpolation modeling.
A better interpolation model could be done by using a linear modeling as done in
PSFMachine. This option will be developed soon.