astrobase.services.tesslightcurves module¶
Useful tools for acquiring TESS light-curves. This module contains a number of non-standard dependencies, including lightkurve, eleanor, and astroquery.
Light-curve retrieval: get light-curves from all sectors for a tic_id:
get_two_minute_spoc_lightcurves
get_hlsp_lightcurves
get_eleanor_lightcurves
Visibility queries: check if an ra/dec was observed:
is_two_minute_spoc_lightcurve_available
get_tess_visibility_given_ticid
get_tess_visibility_given_ticids
Still TODO:
get_cpm_lightcurve
-
astrobase.services.tesslightcurves.
get_two_minute_spoc_lightcurves
(tic_id, download_dir=None)[source]¶ This downloads 2-minute TESS SPOC light curves.
Parameters: tic_id (str) – The TIC ID of the object as a string. Returns: lcfiles – List of light-curve file paths. None if none are found and downloaded. Return type: list or None
-
astrobase.services.tesslightcurves.
get_hlsp_lightcurves
(tic_id, hlsp_products=('CDIPS', 'TASOC', 'PATHOS'), download_dir=None, verbose=True)[source]¶ This downloads TESS HLSP light curves for a given TIC ID.
Parameters: - tic_id (str) – The TIC ID of the object as a string.
- hlsp_products (sequence of str) – List of desired HLSP products to search. For instance, [“CDIPS”].
- download_dir (str) – Path of directory to which light-curve will be downloaded.
Returns: lcfiles – List of light-curve file paths. None if none are found and downloaded.
Return type: list or None
-
astrobase.services.tesslightcurves.
get_eleanor_lightcurves
(tic_id, download_dir=None, targetdata_kwargs=None)[source]¶ This downloads light curves from the Eleanor project for a given TIC ID.
Parameters: - tic_id (str) – The TIC ID of the object as a string.
- download_dir (str) – The light curve FITS files will be downloaded here.
- targetdata_kwargs (dict) –
Optional dictionary of keys and values to be passed
eleanor.TargetData
(see https://adina.feinste.in/eleanor/api.html). For instance, you might pass{'height':8, 'width':8, 'do_pca':True, 'do_psf':True, 'crowded_field':False}
to run these settings through to eleanor. The default options used if targetdata_kwargs is None are as follows:{ height=15, width=15, save_postcard=True, do_pca=False, do_psf=False, bkg_size=31, crowded_field=True, cal_cadences=None, try_load=True, regressors=None }
Returns: lcfiles – List of light-curve file paths. These are saved as CSV, rather than FITS, by this function.
Return type: list or None
-
astrobase.services.tesslightcurves.
is_two_minute_spoc_lightcurve_available
(tic_id)[source]¶ This checks if a 2-minute TESS SPOC light curve is available for the TIC ID.
Parameters: tic_id (str) – The TIC ID of the object as a string. Returns: result – True if a 2 minute SPOC light-curve is available, else False. Return type: bool
-
astrobase.services.tesslightcurves.
get_tess_visibility_given_ticid
(tic_id)[source]¶ This checks if a given TIC ID is visible in a TESS sector.
Parameters: tic_id (str) – The TIC ID of the object as a string. Returns: sector_str,full_sector_str – The first element of the tuple contains a string list of the sector numbers where the object is visible. The second element of the tuple contains a string list of the full sector names where the object is visible. For example, “[16, 17]” and “[tess-s0016-1-4, tess-s0017-2-3]”. If empty, will return “[]” and “[]”.
Return type: tuple of strings
-
astrobase.services.tesslightcurves.
get_tess_visibility_given_ticids
(ticids)[source]¶ This gets TESS visibility info for an iterable container of TIC IDs.
Parameters: ticids (iterable of str) – The TIC IDs to look up. Returns: Returns a two-element tuple containing lists of the sector numbers and the full names of the sectors containing the requested TIC IDs. Return type: tuple