Skip to content

Commit

Permalink
Merge pull request #251 from sot/fix-filter-bad-times-docs
Browse files Browse the repository at this point in the history
Fix misleading doc string
  • Loading branch information
taldcroft authored May 14, 2023
2 parents ff8869d + af670c0 commit 13ed96c
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions cheta/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -1128,12 +1128,11 @@ def filter_bad_times(self, start=None, stop=None, table=None, copy=False):
in with fetch.read_bad_times().
- Supply both ``start`` and ``stop`` values where each is a single
value in a valid DateTime format.
- Supply an ``table`` parameter in the form of a 2-column table of
start and stop dates (space-delimited) or the name of a file with
data in the same format.
- Supply a ``table`` parameter with one of two forms: (1) list of bad time
interval strings, where each string contains the start and stop dates
separated by a space; (2) string with the name of a file in the same format.
The ``table`` parameter must be supplied as a table or the name of a
table file, for example::
Examples::
bad_times = ['2008:292:00:00:00 2008:297:00:00:00',
'2008:305:00:12:00 2008:305:00:12:03',
Expand All @@ -1143,7 +1142,8 @@ def filter_bad_times(self, start=None, stop=None, table=None, copy=False):
:param start: Start of time interval to exclude (any DateTime format)
:param stop: End of time interval to exclude (any DateTime format)
:param table: Two-column table (start, stop) of bad time intervals
:param table: List of str with start and stop for bad time intervals or str
with name of file containing list of bad time intervals
:param copy: return a copy of MSID object with bad times filtered
"""
if table is not None:
Expand Down Expand Up @@ -1645,12 +1645,12 @@ def filter_bad_times(self, start=None, stop=None, table=None, copy=False):
in with fetch.read_bad_times().
- Supply both ``start`` and ``stop`` values where each is a single
value in a valid DateTime format.
- Supply an ``table`` parameter in the form of a 2-column table of
start and stop dates (space-delimited) or the name of a file with
data in the same format.
- Supply a ``table`` parameter with one of two forms: (1) list of bad time
interval strings, where each string contains the start and stop dates
separated by a space; (2) string with the name of a file in the same format.
Examples::
The ``table`` parameter must be supplied as a table or the name of a
table file, for example::
msidset.filter_bad_times()
bad_times = ['2008:292:00:00:00 2008:297:00:00:00',
Expand All @@ -1661,7 +1661,8 @@ def filter_bad_times(self, start=None, stop=None, table=None, copy=False):
:param start: Start of time interval to exclude (any DateTime format)
:param stop: End of time interval to exclude (any DateTime format)
:param table: Two-column table (start, stop) of bad time intervals
:param table: List of str with start and stop for bad time intervals or str
with name of file containing list of bad time intervals
:param copy: return a copy of MSID object with intervals selected
"""
obj = self.copy() if copy else self
Expand Down

0 comments on commit 13ed96c

Please sign in to comment.