iris-edu / irisws-syngine

Project components for the IRIS Synthetics Engine (irisws-syngine) web service
GNU General Public License v2.0
2 stars 0 forks source link

phase relative times sometimes returns an error and sometimes fails silently #37

Closed martinvandriel closed 7 years ago

martinvandriel commented 7 years ago

Just observed this behavior for phase relative queries with phase that don't match the distance. Should this always return an error? It seems the silent one returns an invalid file, at least obspy refuses to read it.

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import obspy

from obspy.clients.syngine import Client

c = Client()

# Fails silently for second receiver:
bulk = [[0.0, 20.0], [0.0, 110.0]]

st = c.get_waveforms_bulk(
        model="ak135f_2s", bulk=bulk, sourcelatitude=0.0,
        sourcelongitude=0.0, sourcedepthinmeters=600000,
        starttime="P-50",
        endtime="S+100",
        components="Z")

print st

# Fails with an error for first receiver:
bulk = [[0.0, 10.0], [0.0, 20.0]]

st = c.get_waveforms_bulk(
        model="ak135f_2s", bulk=bulk, sourcelatitude=0.0,
        sourcelongitude=0.0, sourcedepthinmeters=600000,
        starttime="P-50",
        endtime="S+100",
        components="Z")

print st

Error for first query: python2.7/site-packages/obspy/io/mseed/core.py:384: InternalMSEEDReadingWarning: readMSEEDBuffer(): Record starting at offset 16384 is not valid SEED. The rest of the file will not be read.

Error for second query: Error 400: RECEIVER lat:0.000000, lon:10.0, netcode:XX, stacode:S0001, STATUS: Instaseis Error [400]: No seismograms found for the given phase relative offsets. This could either be due to the chosen phase not existing for the specific source-receiver geometry or arriving too late/with too large offsets if the database is not long enough.

manoch-iris commented 7 years ago

Dear Martin,

We are investigating and will get back to you soon.

Thanks, --manoch

manoch-iris commented 7 years ago

Dear Martin,

The problem was caused by a faulty logic that would prevent data retrieval when data for the first receiver are not available. The script has been updated.

Thank you for reporting the bug