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

Update window.py #387

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 4 additions & 1 deletion python/mspasspy/algorithms/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,9 @@ def WindowData_with_duration(
alg_id=None,
dryrun=False,
):
"""
THIS FUNCTION NEEDS A DOCSTRING. I DON'T WANT TO WRITE IT AS I DON'T SEE WHY IT EVEN EXIST. THERE IS A BUG IN THE CODE BELOW.
"""
if duration < 0:
detailline = "Window duration: {dur} Data range: {dst},{det}".format(
dur=duration, dst=d.t0, det=d.endtime()
Expand All @@ -393,7 +396,7 @@ def WindowData_with_duration(
)
d.kill()
return d
win_start = d.t0 + 1
win_start = d.t0
win_end = win_start + duration
if d.dead():
return d
Expand Down