search_lightcurvefile

lightkurve.search.search_lightcurvefile(target, radius=None, cadence='long', mission=['Kepler', 'K2', 'TESS'], quarter=None, month=None, campaign=None, sector=None, limit=None)

Searches the public data archive at MAST for a Kepler or TESS LightCurveFile.

This function fetches a data table that lists the Light Curve Files that fall within a region of sky centered around the position of target and within a cone of a given radius. If no value is provided for radius, only a single target will be returned.

Parameters:
target : str, int, or astropy.coordinates.SkyCoord object

Target around which to search. Valid inputs include:

  • The name of the object as a string, e.g. “Kepler-10”.
  • The KIC or EPIC identifier as an integer, e.g. 11904151.
  • A coordinate string in decimal format, e.g. “285.67942179 +50.24130576”.
  • A coordinate string in sexagesimal format, e.g. “19:02:43.1 +50:14:28.7”.
  • An astropy.coordinates.SkyCoord object.
radius : float or astropy.units.Quantity object

Conesearch radius. If a float is given it will be assumed to be in units of arcseconds. If None then we default to 0.0001 arcsec.

cadence : str

‘long’ or ‘short’.

mission : str, list of str

‘Kepler’, ‘K2’, or ‘TESS’. By default, all will be returned.

quarter, campaign, sector : int, list of ints

Kepler Quarter, K2 Campaign, or TESS Sector number. By default all quarters/campaigns/sectors will be returned.

month : 1, 2, 3, 4 or list of int

For Kepler’s prime mission, there are three short-cadence TargetPixelFiles for each quarter, each covering one month. Hence, if cadence=’short’ you can specify month=1, 2, 3, or 4. By default all months will be returned.

limit : int

Maximum number of products to return.

Returns:
result : SearchResult object

Object detailing the data products found.

Examples

This example demonstrates how to use the search_lightcurvefile() function to query and download data. Before instantiating a KeplerLightCurveFile object or downloading any science products, we can identify potential desired targets with search_lightcurvefile:

>>> from lightkurve import search_lightcurvefile  
>>> search_result = search_lightcurvefile("Kepler-10")  
>>> print(search_result)  

The above code will query mast for lightcurve files available for the known planet system Kepler-10, and display a table containing the available data products. Because Kepler-10 was observed in 15 quarters, the search result will list 15 different files. If we want to download a LightCurveFileCollection object containing all 15 observations, use:

>>> search_result.download_all()  

or we can specify the downloaded products by limiting our search:

>>> lcf = search_lightcurvefile('Kepler-10', quarter=2).download()  

The above line of code will only search and download Quarter 2 data and create a LightCurveFile object called lcf.

We can also pass a radius into search_lightcurvefile to perform a cone search:

>>> search_lightcurvefile('Kepler-10', radius=100, quarter=4)  

This will display a table containing all targets within 100 arcseconds of Kepler-10 and in Quarter 4. We can then download a LightCurveFileCollection containing all these products using:

>>> search_lightcurvefile('kepler-10', radius=100, quarter=4).download_all()  

Created with ♥ by the Lightkurve developers. Join us on GitHub.