adjtomo / pysep

Seismogram Extraction and Processing: Seismic data retrieval and record sections
https://pysep.readthedocs.io
MIT License
29 stars 15 forks source link

intermittency of success in downloading data through the same request #111

Open aakash10gupta opened 1 year ago

aakash10gupta commented 1 year ago

While downloading data through PySEP, the process fails sometimes but eventually completes successfully on re-executing the job multiple times. It seems like the error has something to do with connecting to IRIS servers. I encounter similar issues while downloading data independently of PySEP, and it seems to me that PySEP is just encountering the same issue while trying to reach IRIS. The rate of occurrence seems high enough to think of a solution. I have been using a recursive function to keep making download requests till data is downloaded successfully, when downloading data independently of PySEP. I am guessing that others have encountered this issue as well, and incorporating a similar solution strategy within PySEP would save the users from having to manually rerun the download several times.

Screenshots of a typical error message when downloading data through PySEP - error_1 error_2 error_3

Associated pysep.log - [2023-07-17 13:04:53] - pysep - INFO: creating event metadata with user parameters [2023-07-17 13:04:53] - pysep - INFO: event info summary - origin time: 2001-06-23T20:33:14.000000Z; lat=-16.27; lon=-73.64; depth[km]=33.0; magnitude=8.4 [2023-07-17 13:04:53] - pysep - INFO: full output directory is: datawf/atico_2001_LHZ_raw_0S0 [2023-07-17 13:04:53] - pysep - INFO: writing config YAML file [2023-07-17 13:04:53] - pysep - INFO: writing event as QuakeML [2023-07-17 13:04:53] - pysep - INFO: querying IRIS for station metadata

bch0w commented 1 year ago

Just adding that I see this intermittently when running tests ($ pytest test_pysep.py) in some of the 'get' functions.