You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, pineappl plot relies on Python and Matplotlib. This is actually quite nice, because people using PineAPPL are often familiar with Python, and know how to plot the information, once given.
A current mild pain-point is that there is a lot of string manipulation involved in the call, since a Python script is generated everytime, embedding the data:
However, dumping the script is a design featured, in such a way that people are able to customize it.
I see a few possible ways of improving:
split the two pineappl plot operations: dump the script and the data separately (in a common data format, like CSV)
leverage pineappl_py in the script, and directly extract the data from the grid (requires the installation of the PineAPPL python extension)
move the plotting feature to pineappl_py itself (possibly with a pineappl-plot CLI, but it would be installed separately, at least until Distribute CLI as a Python package #176 will be completed)
use PyO3 to make the call from the CLI (i.e. from Rust) - in this way people will be able to customize the script and pass it again, but there won't be any need of dumping the data any longer (most likely this is an overkill)
Currently,
pineappl plotrelies on Python and Matplotlib. This is actually quite nice, because people using PineAPPL are often familiar with Python, and know how to plot the information, once given.A current mild pain-point is that there is a lot of string manipulation involved in the call, since a Python script is generated everytime, embedding the data:
pineappl/pineappl_cli/src/plot.rs
Lines 508 to 521 in 3476629
However, dumping the script is a design featured, in such a way that people are able to customize it.
I see a few possible ways of improving:
pineappl plotoperations: dump the script and the data separately (in a common data format, like CSV)pineappl_pyin the script, and directly extract the data from the grid (requires the installation of the PineAPPL python extension)pineappl_pyitself (possibly with apineappl-plotCLI, but it would be installed separately, at least until Distribute CLI as a Python package #176 will be completed)