ispingos / pytheas-splitting

Home of the Pytheas software for local shear-wave splitting analysis
42 stars 7 forks source link

Opening Catalogue Failure #4

Closed veroog closed 3 years ago

veroog commented 4 years ago

After downloading a xml catalog using Obspy, I cannot open it in Pytheas.

This is the error I'm getting:

Opening catalogue exited with exception: Traceback (most recent call last): File "pytheas/pytheas.py", line 4511, in ocWinOk self.openCat() File "pytheas/pytheas.py", line 2682, in openCat self.getCat(self.dataPath,self.catFile,self.dbPath) File "pytheas/pytheas.py", line 2669, in getCat self.evsDict,self.statsDict File "pytheas/pytheas.py", line 1042, in eventCorrect directoryKeys=np.asarray([UTCDateTime(y).timestamp for y in sorted(evPath)]) File "pytheas/pytheas.py", line 1042, in directoryKeys=np.asarray([UTCDateTime(y).timestamp for y in sorted(evPath)]) File "/Users/veronica/opt/anaconda3/lib/python3.7/site-packages/obspy/core/utcdatetime.py", line 421, in init dt = datetime.datetime(*args, **kwargs) TypeError: an integer is required (got type str)

This is how I downloaded the catalog using Obspy:

t1=obspy.UTCDateTime('2018-10-14T00:00:00') t2 =obspy.UTCDateTime('2019-10-14T00:00:00') client = Client('IRIS') arrivals=False events = client.get_events(starttime=t1, endtime=t2,minlatitude=30, maxlatitude=32, minlongitude=-104, maxlongitude=-101, includearrivals=arrivals ) events.write('test3.xml', format = 'QUAKEML')

Log File 20201019163658_Pytheas.log

Operating System (please complete the following information):

Dependencies (please complete the following information):

veroog commented 3 years ago

Issue had to do with the data folder structure.

ispingos commented 3 years ago

Thanks for the update!