eqcorrscan / EQcorrscan

Earthquake detection and analysis in Python.
https://eqcorrscan.readthedocs.io/en/latest/
Other
166 stars 86 forks source link

Problem when using Party().read('*') #387

Closed ikahbasi closed 3 years ago

ikahbasi commented 4 years ago

Describe the bug I have parties in my directory. When I use p = Party().read('*') to read all of them, p contains all families but not all detections. It only have detections of last file.

To Reproduce

>>> from eqcorrscan.core.match_filter.party import Party
>>> party = Party().read('party*tgz')

>>> print(party)
Party of 723 Families.
>>> print(party.get_catalog())
19 Event(s) in Catalog:

>>> import glob
>>> l = glob.glob('party*tgz')
>>> party = Party()
>>> for f in l:
>>>     party += Party().read(f)

>>> print(party)
Party of 723 Families.
>>> print(party.get_catalog())
461 Event(s) in Catalog

Expected behavior It should have all detections when we use '*'.

Desktop (please complete the following information):

calum-chamberlain commented 4 years ago

Read does not support wildcards and I'm surprised that anything is read in at all when you include the star.

If you want to implement wild card support you can, but can you please do it for all the read functions.

Edited to trim email trail

ikahbasi commented 4 years ago

Read does not support wildcards and I'm surprised that anything is read in at all when you include the star.

But in tutorial described that read function in Party() supports wildcards.

image

If you want to implement wild card support you can, but can you please do it for all the read functions.

Sure. But I don't have knowledge right now unfortunately. I will try to make it when I get enough skills.

calum-chamberlain commented 4 years ago

Ah, so I do, and so it should. Bugger!

Will test and fix at some point. Thanks for pointing this out.

ikahbasi commented 4 years ago

Your welcome.

calum-chamberlain commented 3 years ago

Closed by #453