- sunkit_instruments.lyra.remove_lytaf_events_from_timeseries(ts, artifacts=None, return_artifacts=False, force_use_local_lytaf=False)[source]¶
Removes periods of LYRA artifacts defined in LYTAF from a TimeSeries.
list) – Sets the artifact types to be removed. For a list of artifact types see reference . For example, if a user wants to remove only large angle rotations, listed at reference  as LAR, set artifacts=[“LAR”]. The default is that no artifacts will be removed.
bool) – Set to True to return a
numpy.recarraycontaining the start time, end time and type of all artifacts removed. Default=False
bool) – Ensures current local version of lytaf files are not replaced by up-to-date online versions even if current local lytaf files do not cover entire input time range etc. Default=False
sunpy.timeseries.TimeSeries) – copy of input TimeSeries with periods corresponding to artifacts removed.
dict) – List of 4 variables containing information on what artifacts were found, removed, etc. from the time series. | artifact_status[“lytaf”] :
numpy.recarray| The full LYRA annotation file for the time series time range | output by get_lytaf_events(). | artifact_status[“removed”] :
numpy.recarray| Artifacts which were found and removed from from time series. | artifact_status[“not_removed”] :
numpy.recarray| Artifacts which were found but not removed as they were not | included when user defined artifacts kwarg. | artifact_status[“not_found”] :
listof strings | Artifacts listed to be removed by user when defining | artifacts kwarg which were not found in time series time range.
This function is intended to take TimeSeries objects as input, but the deprecated LightCurve is still supported here.
- Remove LARs (Large Angle Rotations) from TimeSeries for 4-Dec-2014:
>>> import sunpy.timeseries as ts >>> import sunpy.data.sample >>> from sunkit_instruments.lyra import remove_lytaf_events_from_timeseries >>> lyrats = ts.TimeSeries(sunpy.data.sample.LYRA_LEVEL3_TIMESERIES, source='LYRA') >>> ts_nolars = remove_lytaf_events_from_timeseries(lyrats, artifacts=["LAR"])
- To also retrieve information on the artifacts during that day:
>>> ts_nolars, artifact_status = remove_lytaf_events_from_timeseries( ... lyrats, artifacts=["LAR"], return_artifacts=True)