philrosenfield / match

Python utilities for processing and plotting input and output from Andy Dolphin's MATCH
MIT License
4 stars 1 forks source link

Code unification: pgpro #14

Open philrosenfield opened 7 years ago

philrosenfield commented 7 years ago

Q: How should the python implementation of pgpro look?

Background: Currently, there are two areas of where this codebase has duplicate/competing code. This issue focuses on one, the python implementation of MATCH/pgpro: residual_plot/Hess_plot.py and scripts/graphics/match_plot.py

I added png outputs of both codes Hess_plot_out.png and match_plot_out.png to residual_plot/Hess_plot for comparison.

There are aesthetic differences between the Hess_plot and match_plot, where the color bars are, and where the labels are. Do users prefer one or the other, or should there be an option for one or the other?

[End of question, below is more information] Going forward: I'd like to stick to the match_plot interface, which follows the scripts interface. That is, a class for each major input/output from MATCH, in this case, CMD output file class.

So to make the pgpro-like image: python -m match.scripts.cmd out.cmd or python ~/match/scripts/cmd.py out.cmd

and one interested in the API would access match_plot which already has extra options to take a colormap (or list of them), make the image grid 2x2 or 1x4 (or 1x3 and drop the significance figure, which I see often omitted in papers), and can expand to have other options, like kwargs to pass to imshow (the two codes have different hard coded plt.imshow interpolation) and will include grabbing the exclude/include gate code from CMD.pgpro to ensure match_plot is stand alone)