Implement Plotting extension
Summary
Create a modular plotting extension in QEDprobing.jl for generating 1D and 2D diagnostics from scattering event lists. The goal is to support reproducible, high-quality visualizations directly within the simulation workflow.
Tasks
1. Create QEDprobingPlots submodule
-
Add directory src/QEDprobingPlots/ -
Include in QEDprobing.jlunderQEDprobing.Plots -
use the package extension functionality to load the plottig module, if CairoMakieis loaded.
2. Implement 1D projection plotting
-
plot_1d_projection(events; quantity, unit, bins) -
Add support for: :q,:omega,:theta,:costheta,:omega' -
Enable units: :me,:eV,:keV,:invA
3. Implement 2D projection plotting
-
plot_2d_projection(events; x, y, xunit, yunit) -
Default to :omegavs.:q
4. Implement plot_all_diagnostics(events; savedir="plots/")
-
Reproduce all currently hardcoded plots in a consistent format -
Automatically save to pdfandpng(maybe specify this in an kwarg)
5. Centralize quantity and unit handling
-
Add compute_quantity(events, name)and unit conversion utilities -
Reuse code across all plots
6. Add documentation and test coverage
-
Minimal plotting tutorial in README and docs/ -
Add plotting smoke tests in test/plots.jl
Benefits
- Eliminates duplication in plotting scripts
- Ensures consistent style and labeling across publications
- Enables interactive exploration of simulation results
Optional Extensions
- Add support for interactive sliders (via
MakieLayoutorGLMakie) - Enable filtering by process types or phase-space cuts
- Support export of data points as CSV or HDF5 for external plotting