lightkurve.LightCurve.query_solar_system_objects

LightCurve.query_solar_system_objects(cadence_mask='outliers', radius=None, sigma=3, location=None, cache=True, return_mask=False)

Returns a list of asteroids or comets which affected the light curve.

Light curves of stars or galaxies are frequently affected by solar system bodies (e.g. asteroids, comets, planets). These objects can move across a target’s photometric aperture mask on time scales of hours to days. When they pass through a mask, they tend to cause a brief spike in the brightness of the target. They can also cause dips by moving through a local background aperture mask (if any is used).

The artifical spikes and dips introduced by asteroids are frequently confused with stellar flares, planet transits, etc. This method helps to identify false signals injects by asteroids by providing a list of the solar system objects (name, brightness, time) that passed in the vicinity of the target during the span of the light curve.

This method queries the SkyBot API, which returns a list of asteroids/comets/planets given a location, time, and search cone.

Parameters
cadence_maskstr, or boolean array with length of self.time

mask in time to select which frames or points should be searched for SSOs. Default “outliers” will search for SSOs at points that are sigma from the mean. “all” will search all cadences. Alternatively, pass a boolean array with values of “True” for times to search for SSOs.

radiusoptional, float

Radius in degrees to search for bodies. If None, will search for SSOs within 15 pixels.

sigmaoptional, float

If cadence_mask is set to "outlier", sigma will be used to identify outliers.

locationoptional, str

Spacecraft location. Options include 'kepler' and 'tess'. Default: self.mission

cacheoptional, bool

If True will cache the search result in the astropy cache. Set to False to request the search again.

return_mask: optional, bool

If True will return a boolean mask in time alongside the result

Returns
resultpandas.DataFrame

DataFrame object which lists the Solar System objects in frames that were identified to contain SSOs. Returns None if no objects were found.

Notes

  • This method will use the ra and dec properties of the LightCurve object to determine the position of the search cone.

  • The size of the search cone is 15 spacecraft pixels by default. You can change this by passing the radius parameter (unit: degrees).

  • By default, this method will only search points in time during which the light curve showed 3-sigma outliers in flux. You can override this behavior and search for specific times by passing cadence_mask. See examples for details.

Examples

Find if there are SSOs affecting the lightcurve for the given time frame:

>>> df_sso = lc.query_solar_system_objects(cadence_mask=(lc.time.value >= 2014.1) & (lc.time.value <= 2014.9))  

Find if there are SSOs affecting the lightcurve for all times, but it will be much slower:

>>> df_sso = lc.query_solar_system_objects(cadence_mask='all')