Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix misleading doc string #251

Merged
merged 2 commits into from
May 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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