adjtomo/pyatoa

absorb Pyflex and Pyadjoint capabilities

Opened this issue · 0 comments

bch0w commented

I've been throwing this idea around in my head for the past year, and I wanted to put it down in writing.

Motivation: I think Pyatoa (and adjTomo in general) would really benefit from taking over control of all the windowing and adjoint source creation that are currently handled by dependencies Pyflex and Pyadjoint (also adjTomo packages). Since all these packages are related to 'misfit quantification', I think it makes sense to centralize them in one package.

To Do List: This would be a relatively large endeavor, which would likely take the following steps:

  • Create a new Pyatoa.core.window.Window class which would cover the Pyflex Window and WindowSelector classes
  • Create Pyatoa.core.adjoint.Adjoint class which would cover the Pyadjoint AdjointSource class
  • Absorb all Config parameters into the Pyatoa.core.Config class
  • Migrate docs, tests and utilities

Side Note: In the future (likely another issue/PR), I would also consider totally removing the Config class and just allowing Users to push parameters directly to the calling functions. The reasoning is that the Config class, while nice to keep all parameters in a single place, tends to abstract a bit too much away and makes running these tools less flexible.

Benefits: I think the benefits of this would be worth the effort:

  • Flexibility: Currently any change in Pyflex or Pyadjoint have to propagate through to Pyatoa through version releases, which is slow compared to a single PR to Pyatoa
  • Reduce abstraction: Pyatoa currently wraps Pyflex and Pyadjoint to do windowing and adjoint source generation, which is okay if you are using it as a black box, but those that want to dig deeper have to look in two other codebases to determine how these procedures function.
  • Centralization: Docs, tests, versioning and source code will all be in one place. Pyflex and Pyadjoint are already pretty closely linked, and Pyatoa builds directly on top of them, so it makes sense to keep everything in one centralized package.
  • A single logger with more control over the log levels and verbosity of packages

Some items to keep in mind if moving forward:

  • Pyflex and Pyadjoint should still be supported as independent packages for legacy Users
  • Users should be able to use the windowing and adjoint source creation capabilities in the same way they can now (i.e., independent of the larger Pyatoa Manager tool)
  • There should be some consideration given to backwards compatibility and familiarity (i.e., we shouldn't totally re-work the underlying packages).

If anyone sees this issue and has thoughts, please share. I will post any future updates here.

Are you willing to help implement and maintain this feature?

Yes