shaharkadmiel / pySW4

Setup, run, post process, and visualize numerical simulations. Primarily SW4
http://shaharkadmiel.github.com/pySW4
GNU General Public License v3.0
28 stars 14 forks source link

Major Restructuring/Cleanup/Refactoring/Improvements #2

Closed megies closed 8 years ago

megies commented 8 years ago

For my own purposes (i.e. mostly visualizing SW4 output), I'm doing some major changes to the repository. As discussed by email with @shaharkadmiel, I think the basics for SW4 handling are there but the whole module needs major restructuring/cleanup/refactoring (lot of duplicated code, some unusable code, unintuitive structuring of the package, some code smells, etc.), which can not be done without breaking codes relying on the current status quo.

As I said, I'm doing this for my own purposes.. and I do not want to force on people that this PR will become the main line of development. I'm opening this PR so that people can follow my changes.

DO NOT MERGE -- WORK IN PROGRESS

shaharkadmiel commented 8 years ago

This is great stuff @megies. I'll wait for your okay to merge these changes in and then add some of the stuff that's been sitting unsynced on my laptop. Thank you.

megies commented 8 years ago

Here's the current state for plots and movies:

model cycle 000 y 5533 p

movie link

megies commented 8 years ago

Alright, @shaharkadmiel, this is good to merge from my point of view. I renamed the package to pySW4 (I think it's better than sw4py because we can keep the upper case characters from the original name for SW4). Eventually the repository should also be renamed..

I've added a proper command line script to generate all plots, which I can use like this.. pySW4-create-plots -c /tmp/UH_01_simplemost.in -s UH1 -s UH2 -s UH3 --pre-filt 0.05,0.1,100,200 --filter type=lowpass,freq=10,corners=4 ~/data/stations/stationxml/*UH* ~/data/waveforms/*20100622214704* .. to create all plots and movies for a simulation run.

I've refactored/rebuilt everything in core and plotting, the rest is mostly unchanged and should eventually also be cleaned up and refactored but this is low priority for me right now.

shaharkadmiel commented 8 years ago

Great work @megies, I am merging this right now. I changed the repositories name as well.

megies commented 8 years ago

Great work @megies, I am merging this right now. I changed the repositories name as well.

OK, thanks!