phockett / ePSproc

Post-processing of ePolyScat calculations
GNU General Public License v3.0
5 stars 3 forks source link

Plotting routines #27

Open phockett opened 4 years ago

phockett commented 4 years ago

To do:

phockett commented 4 years ago

Improved XC plotting with Holoviews + Bokeh: https://epsproc.readthedocs.io/en/dev/tests/basicPlotting_dev_XC_030720.html

Functionalised version now in plot/hvPlotters.py

phockett commented 3 years ago

Also: fix horrible plotting code now propagated and bodged into class functions. This is fragile depending on data type and dimensions. Needs unifying.

phockett commented 2 years ago

Now added general curve plotting routine with Holoviews, see 6030520d2894940c98e3b49af48c419de31ecc6e

Main routine is hvPlotters.curvePlot(). This needs to be further wrapped for specific common plots and class use.

Update: see https://epsproc.readthedocs.io/en/dev/tests/hvPlotters_fn_tests_150720_v250122.html for some usage examples.

Also: in many cases hvPlot() is easiest/quickest from Xarray, e.g. https://epsproc.readthedocs.io/en/dev/tests/hvPlotters_fn_tests_150720_v250122.html#hvPlot-pipeline

See also OCS dev work for simplified BLM plotter routine, may be better than current methods. https://phockett.github.io/ePSdata/OCS-preliminary/OCS_orbs8-11_AFBLMs_VM-ADMs_140122-JAKE_tidy.html#AFBLMs-for-aligned-case

UPDATE: also plotters in https://phockett.github.io/ePSdata/OCS-preliminary/OCS_orbs8-11_AFBLMs_VM-ADMs_140122-JAKE_tidy-replot-200722_v5.html

phockett commented 2 years ago

Improved basicPlotters.BLMplot() routine and added Holoviews backend, see 6bcc112d694ee17b05559678a9bb92e9f33df873

TODO:

phockett commented 2 years ago

Fixed Plotly rendering issue in https://github.com/phockett/ePSproc/commit/bfd3771ec8d74e43c4f917a3b74b8f1bc14b6b68 (updates sphinx_rtd_theme >= 1.0.0 in requirements-RTD.txt).

UPDATE 14/11/22: this is NOT working on dev branch docs, not sure why. HV rendering on latest (master) branch is OK however. May just need to force a clean build?

UPDATE 13/07/23: further testing on 3d-AFPAD-dev branch.

UPDATE 06/03/24:

phockett commented 2 years ago

Quick hack fix for missing facetDims case for Plotly plotters in sphPlot.sphPlotPL() when calling from ep.classes.base.padPlot(). Pretty ugly however, and breaks subplots for 1D case - needs more work.

See 216cfd33edb69a2a2cc99d59aa0c518097724f47

phockett commented 1 year ago

For some further dev and notes see recent MF recon manuscript notebooks, https://github.com/phockett/Extracting-Molecular-Frame-Photoionization-Dynamics-from-Experimental-Data/tree/submission050922#readme

phockett commented 1 year ago

Implemented better HV backend for BLMplot() class version, see 5fcb0277a2df6d356db9198ecbc68e2c48f3ea8c.

This needs some work, but improves/fixes previous implementation.

NOTE issue with (l,m) stacking introducing invalid coords, as per note at https://epsproc.readthedocs.io/en/dev/tests/hvPlotters_fn_tests_150720_v250122.html#BLMplot()-with-HV-backend. May have fixed this elsewhere? Combination of XR restack and Holoviews selection routines? Need to define mask or selectors on HV object?

phockett commented 1 year ago

Holoviews surface plotting

phockett commented 1 year ago

Plotly PAD plotting routine updated with axes options in 1c8ea8c4580808516fac79cf84c208a331f729b4

TODO: currently not allowing for all args to be passed, and now just plotting axes as default case. Need to implement global styling as note above (https://github.com/phockett/ePSproc/issues/27#issuecomment-1023389063) via dict per plotter or similar.

UPDATE 16/03/23: further improvements to Plotly plotting with facet options. Also allow for basic **kwargs passing from calling functions and class wrapper, as of b3ce53071eccaa21702196e791ff1c8570e8d711

UPDATE 12/07/23: modified fix for conditional only, otherwise may break computational-only function runs, see aaa13d4ac614da8e07feae662d96fa82107edff8.

phockett commented 1 year ago

TODO: improve on last fix above by adding also "returnFlag" option to avoid forced plotting!

phockett commented 1 year ago

Matplotlib versions for MolPlot - currently fails for >v3.5. This sometimes gives cascaded errors in notebooks, and sometimes seems to only affect MolPlot output.

Ah, looks like issue is Arrow3D class, needs patching for Matplotlib >v3.5, see https://stackoverflow.com/a/74122407

TODO: add to ePSproc with conditional patching depending on MPL version.

phockett commented 6 months ago

Multijob .plotGetCroComp() working with Holoviews as of 16de8a353f07f7a704ea0af15f04811702b56435.

TODO: fix for Ehv use too, currently only working for Eke coords. For Ehv can't swap in restacked data, and if set and used pre-stacking end up with weird HVplot results due to NaNs/discontinuities in data. May have fixed this issue elsewhere already?

phockett commented 6 months ago

To fix: Holoviews implementation in self.padPlot (for base class) stacking bug - seems to sometimes fail to stack by label? Issue with Xarray ordering, or just random?