SearchResult

class lightkurve.search.SearchResult(table=None)

Bases: object

Container for the results returned by search_targetpixelfile, search_lightcurvefile, and search_tesscut.

The purpose of this class is to provide a convenient way to inspect and download products that have been identified using one of the data search functions.

Parameters:
table : astropy.table.Table object

Astropy table returned by a join of the astroquery Observations.query_criteria() and Observations.get_product_list() methods.

Attributes Summary

dec Returns an array of dec values for targets in search
obsid Returns an array of MAST observation IDs
ra Returns an array of RA values for targets in search
target_name Returns an array of target names
unique_targets Returns a table of targets and their RA & dec values produced by search

Methods Summary

download([quality_bitmask, download_dir, …]) Returns a single KeplerTargetPixelFile or KeplerLightCurveFile object.
download_all([quality_bitmask, …]) Returns a TargetPixelFileCollection or `LightCurveFileCollection.

Attributes Documentation

dec

Returns an array of dec values for targets in search

obsid

Returns an array of MAST observation IDs

ra

Returns an array of RA values for targets in search

target_name

Returns an array of target names

unique_targets

Returns a table of targets and their RA & dec values produced by search

Methods Documentation

download(quality_bitmask='default', download_dir=None, cutout_size=None)

Returns a single KeplerTargetPixelFile or KeplerLightCurveFile object.

If multiple files are present in SearchResult.table, only the first will be downloaded.

Parameters:
quality_bitmask : str or int

Bitmask (integer) which identifies the quality flag bitmask that should be used to mask out bad cadences. If a string is passed, it has the following meaning:

  • “none”: no cadences will be ignored (quality_bitmask=0).
  • “default”: cadences with severe quality issues will be ignored (quality_bitmask=1130799).
  • “hard”: more conservative choice of flags to ignore (quality_bitmask=1664431). This is known to remove good data.
  • “hardest”: removes all data that has been flagged (quality_bitmask=2096639). This mask is not recommended.

See the KeplerQualityFlags class for details on the bitmasks.

download_dir : str

Location where the data files will be stored. Defaults to “~/.lightkurve-cache” if None is passed.

cutout_size : int, float or tuple

Side length of cutout in pixels. Tuples should have dimensions (y, x). Default size is (5, 5)

Returns:
data : TargetPixelFile or LightCurveFile object

The first entry in the products table.

download_all(quality_bitmask='default', download_dir=None, cutout_size=None)

Returns a TargetPixelFileCollection or `LightCurveFileCollection.

Parameters:
quality_bitmask : str or int

Bitmask (integer) which identifies the quality flag bitmask that should be used to mask out bad cadences. If a string is passed, it has the following meaning:

  • “none”: no cadences will be ignored (quality_bitmask=0).
  • “default”: cadences with severe quality issues will be ignored (quality_bitmask=1130799).
  • “hard”: more conservative choice of flags to ignore (quality_bitmask=1664431). This is known to remove good data.
  • “hardest”: removes all data that has been flagged (quality_bitmask=2096639). This mask is not recommended.

See the KeplerQualityFlags class for details on the bitmasks.

download_dir : str

Location where the data files will be stored. Defaults to “~/.lightkurve-cache” if None is passed.

cutout_size : int, float or tuple

Side length of cutout in pixels. Tuples should have dimensions (y, x). Default size is (5, 5)

Returns:
collection : lightkurve.Collection object

Returns a LightCurveFileCollection or TargetPixelFileCollection, containing all entries in the products table


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