Skip to content

Data returned do not cover exact time period due to file start and end times not exactly at day boundaries #6

Description

@calum-chamberlain

Because of how files are stored in the AWS bucket, requesting data that starts and ends near day boundaries often (always?) returns less data than requested. Consider the following:

from obspy import UTCDateTime
from geonet_obspy_utils.clients.aws.client import Client

client = Client()
st = client.get_waveforms(
    "NZ", "WVZ", "10", "HH?", UTCDateTime(2026, 1, 1), UTCDateTime(2026, 1, 2))

for tr in st:
    print(tr.stats.starttime)

In this instance, the traces returned start at different times, all after the requested starttime:

2026-01-01T00:00:05.013131Z
2026-01-01T00:00:04.293130Z
2026-01-01T00:00:00.573130Z

This could be handled by downloading the previous day when the requested start time is close to the day boundary, but I don't know when files actually start and this is clearly variable, so it would be useful to know what that slop should be.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions