lightkurve.KeplerTargetPixelFile.query_solar_system_objects#
- KeplerTargetPixelFile.query_solar_system_objects(cadence_mask='outliers', radius=None, sigma=3, cache=True, return_mask=False, show_progress=True)#
Returns a list of asteroids or comets which affected the target pixel files.
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 to search for bodies. If None, will search for SSOs within 5 pixels of all pixels in the TPF.
- sigmaoptional, float
If
cadence_mask
is set to"outlier"
,sigma
will be used to identify outliers.- 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
- show_progress: optional, bool
If True will display a progress bar during the download
- Returns
- resultpandas.DataFrame
DataFrame containing the list objects in frames that were identified to contain SSOs.
Notes
This method will use the
ra
anddec
properties of theLightCurve
object to determine the position of the search cone.The size of the search cone is 5 spacecraft pixels + TPF dimension 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 target pixel file for the given time frame:
>>> df_sso = tpf.query_solar_system_objects(cadence_mask=(tpf.time.value >= 2014.1) & (tpf.time.value <= 2014.9))
Find if there are SSOs affecting the target pixel file for all times, but it will be much slower:
>>> df_sso = tpf.query_solar_system_objects(cadence_mask='all')