Skip to content

Bug! Incorrect trace end time in SAC header #183

Description

@bvanderbeek

Found a small bug after inspecting some SAC headers.

In _append_sac_headers_trace (line 188), you define
end_time = begin_time + (tr.stats.npts * tr.stats.delta)

This little off-by-one error results in an end time that is too long by 1-sample. It should be,
end_time = begin_time + (tr.stats.npts - 1) * tr.stats.delta

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions