adjtomo/pysep

inherit Pyatoa data gathering and I/O procedures

bch0w opened this issue · 2 comments

bch0w commented

Now that PySEP is a more mature package that is purely focused on data gathering, it makes sense to strip these functionalities from Pyatoa. A little history: Pyatoa was developed standalone and part of it's gathering routines query ObsPy for seismic data. However the external gathering routines are slightly rigid and not really suited to general research problems (they did however work well enough for my PhD project).

Some of the data gathering procedures extend past waveform data into metadata and moment tensor catalogs. For example, Pyatoa has the ability to query for GCMT CMTSOLUTIONS, moment tensors from John Ristau's New Zealand catalog, and USGS.

https://github.com/adjtomo/pyatoa/blob/master/pyatoa/plugins/new_zealand_moment_tensors.py
https://github.com/adjtomo/pyatoa/blob/master/pyatoa/core/gatherer.py#L1063-L1113
https://github.com/adjtomo/pyatoa/blob/master/pyatoa/core/gatherer.py#L1001-L1060

I think as Pyatoa moves away from data gathering and becomes primarily a misfit quantification package, PySEP should adopt these functionalities and make it easy for users to gather event, station and waveform data. This is ideally a one time procedure that occurs at the beginning of an inversion workflow, so I find that PySEP is best suited for this functionality.

This task would involve inheriting (read: copy-paste) these features from Pyatoa to PySEP, and coming up with some API or command line calls to access the functionality.

Related Issues: adjtomo/pyatoa#21

bch0w commented

Work plan:

  • Move Pyatoa external data gathering routines into PySEP, strip away now unnecessary tests and references to these routines in Pyatoa (or move to PySEP)
  • Inherit data gathering routines into PySEP workflow, or create separate command line calls to gather metadata (to generate CMTSOLUTIONS, STATIONS files)
  • Add new routines to PySEP readme (at some point this should become a wiki or RTD page, the readme is getting pretty cumbersome)
  • Remove redundant I/O routines (e.g., read_cmtsolution) from Pyatoa and shift completely to PySEP if not already present there
  • Update Pyatoa docs to reflect that inversion prep functionality has moved to PySEP
  • Publish PySEP on PyPi (and Conda if feeling bold) to ensure that it can be installed during Pyatoa install
  • Add PySEP as a Pyatoa dependency by changing setup.py and redirecting import statements from now-removed internal calls, to new PySEP import statements
  • Ensure fresh Pyatoa install procedure grabs PySEP and calls correctly
bch0w commented

Closed with #58