Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Big cleanup and todo #4

Open
emolch opened this issue Oct 22, 2013 · 0 comments
Open

Big cleanup and todo #4

emolch opened this issue Oct 22, 2013 · 0 comments
Assignees

Comments

@emolch
Copy link
Collaborator

emolch commented Oct 22, 2013

Mopad in its present form is not very useful as a Python module and many things could be improved. Here just a few suggestions in random order:

  • the BeachBall methods ploBB(), save_BB(), pa_plot, full_shere_plot() should be renamed into a consistent naming scheme

  • these methods take kwargs not **kwargs, why? This is not very intuitiv to use (and the documentation of the method is even wrong):

     beach.save_BB(dict(plot_outfile='mopad.png', plot_outfile_format='png'))
    
  • the string/value hybrid behaviour of the getter functions in MomentTensor should be avoided

  • exceptions raiseid in the code should contain proper information about what has gone wrong

  • error messages should never be printed to stdout

  • remove print statements in the getter functions of MomentTensor (this should be fixed quickly, because, whoever sees this will never again want to have a single look at mopad).

  • is there any good reason for using realpath() and abspath() when dealing with filenames in this code?

  • many of the excessive if-elif-else-orgies could be replaced with simple dict mappings. This would heavily shorten the code.

@ghost ghost assigned geophysics Oct 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants