def truncate(self, a, b=None, int=None):
    'Returns a truncated version of the TimeSeries object.\n\n        Parameters\n        ----------\n        a : `sunpy.time.TimeRange`, `str` or `int`\n            Either a time range to truncate to, or a start time in some format\n            recognised by pandas, or a index integer.\n\n        b : `str` or `int`\n            If specified, the end time of the time range in some format\n            recognised by pandas, or a index integer.\n\n        int : `int`\n            If specified, the integer indicating the slicing intervals.\n\n        Returns\n        -------\n        newts : `~sunpy.timeseries.TimeSeries`\n            A new time series with only the selected times.\n        '
    if (isinstance(a, str) and isinstance(b, str)):
        a = TimeRange(a, b)
    if isinstance(a, TimeRange):
        start = a.start.datetime
        end = a.end.datetime
    else:
        start = a
        end = b
    truncated_data = self.data.sort_index()[start:end:int]
    truncated_meta = TimeSeriesMetaData([])
    if (len(truncated_data) > 0):
        tr = TimeRange(truncated_data.index.min(), truncated_data.index.max())
        truncated_meta = TimeSeriesMetaData(copy.deepcopy(self.meta.metadata))
        truncated_meta._truncate(tr)
    object = self.__class__(truncated_data.sort_index(), truncated_meta, copy.copy(self.units))
    object._sanitize_metadata()
    object._sanitize_units()
    return object
Returns a truncated version of the TimeSeries object.

Parameters
----------
a : `sunpy.time.TimeRange`, `str` or `int`
    Either a time range to truncate to, or a start time in some format
    recognised by pandas, or a index integer.

b : `str` or `int`
    If specified, the end time of the time range in some format
    recognised by pandas, or a index integer.

int : `int`
    If specified, the integer indicating the slicing intervals.

Returns
-------
newts : `~sunpy.timeseries.TimeSeries`
    A new time series with only the selected times.
def truncate(self, a, b=None, int=None):
    'Returns a truncated version of the TimeSeries object.\n\n        Parameters\n        ----------\n        a : `sunpy.time.TimeRange`, `str` or `int`\n            Either a time range to truncate to, or a start time in some format\n            recognised by pandas, or a index integer.\n\n        b : `str` or `int`\n            If specified, the end time of the time range in some format\n            recognised by pandas, or a index integer.\n\n        int : `int`\n            If specified, the integer indicating the slicing intervals.\n\n        Returns\n        -------\n        newts : `~sunpy.timeseries.TimeSeries`\n            A new time series with only the selected times.\n        '
    if (isinstance(a, str) and isinstance(b, str)):
        a = TimeRange(a, b)
    if isinstance(a, TimeRange):
        start = a.start.datetime
        end = a.end.datetime
    else:
        start = a
        end = b
    truncated_data = self.data.sort_index()[start:end:int]
    truncated_meta = TimeSeriesMetaData([])
    if (len(truncated_data) > 0):
        tr = TimeRange(truncated_data.index.min(), truncated_data.index.max())
        truncated_meta = TimeSeriesMetaData(copy.deepcopy(self.meta.metadata))
        truncated_meta._truncate(tr)
    object = self.__class__(truncated_data.sort_index(), truncated_meta, copy.copy(self.units))
    object._sanitize_metadata()
    object._sanitize_units()
    return object