You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When running Locate for a window of time with start/end times that are not an integer number of days apart and that cross a dateline, the process of reading in triggered event files will fail (silently) for the final day. It will simply not read in the triggered event file for the last day, and will only locate events for Julian days before this.
For example, running Detect, Trigger, and Locate with the starttime/endtime:
Any events triggered between 22:00 and 00:00 will be successfully located, but any between 00:00 and 02:00 will not.
This arises in the `quakemigrate/io/triggered_events.py' file, for lines 53-66:
trigger_files = []
readstart = starttime
while readstart <= endtime:
fstem = f"{run.name}_{readstart.year}_{readstart.julday:03d}"
file = (fpath / f"{fstem}_TriggeredEvents").with_suffix(".csv")
if file.is_file():
trigger_files.append(file)
else:
logging.info(f"\n\t Cannot find file: {fstem}")
readstart += 86400
if len(trigger_files) == 0:
raise util.NoTriggerFilesFound
events = pd.concat((pd.read_csv(f) for f in trigger_files),
ignore_index=True)
The initial readstart <= endtime test returns False for the final day, if the hour/minutes of the starttime are later than the hour/minutes of the endtime.
This may also be an issue when reading the availability files and plotting during Trigger - I am investigating and will update this Issue accordingly.
To Reproduce
Run Detect and Trigger using a small sample of data over a dateline (start and end times either side of midnight, e.g. those above). Locate will successfully register events triggered before midnight, but not after.
Expected behavior
All event should be detected, as triggered event files (which are stored as day files, named by the Julian day) exist.
Desktop (please complete the following information):
Operating System: macOS Big Sur
Python version: 3.8
QuakeMigrate version: 1.0.1
Additional context
This was identified when running tests on seismic data from the HVO network.
The text was updated successfully, but these errors were encountered:
Describe the bug
When running Locate for a window of time with start/end times that are not an integer number of days apart and that cross a dateline, the process of reading in triggered event files will fail (silently) for the final day. It will simply not read in the triggered event file for the last day, and will only locate events for Julian days before this.
For example, running Detect, Trigger, and Locate with the
starttime
/endtime
:Any events triggered between
22:00
and00:00
will be successfully located, but any between00:00
and02:00
will not.This arises in the `quakemigrate/io/triggered_events.py' file, for lines 53-66:
The initial
readstart <= endtime
test returnsFalse
for the final day, if the hour/minutes of thestarttime
are later than the hour/minutes of theendtime
.This may also be an issue when reading the availability files and plotting during Trigger - I am investigating and will update this Issue accordingly.
To Reproduce
Run Detect and Trigger using a small sample of data over a dateline (start and end times either side of midnight, e.g. those above). Locate will successfully register events triggered before midnight, but not after.
Expected behavior
All event should be detected, as triggered event files (which are stored as day files, named by the Julian day) exist.
Desktop (please complete the following information):
Additional context
This was identified when running tests on seismic data from the HVO network.
The text was updated successfully, but these errors were encountered: