Repository navigation
Description
What is missing
The GUI can save any plot or page as a figure, but not the numbers behind it. Analyse's pages offer Export ▾ → Figure… and Pop out (ResultPage), and every plot's right-click menu offers a figure or an image (ViewPanel.show_menu). To replot a curve in another tool, a user has to save the session and read result.h5 in Python.
Why it matters
Collaborators often want the retrieved pulse, spectrum or marginals as columns for their own plotting or for a paper's data file. The redesign's plan listed "Data as CSV…" beside "Figure…" on Export ▾, and it was left out to keep #16 reviewable.
Context
- Every on-screen plot is a Qt-free view from
croak.plotting.screen(aLineViewof curves, or aMapViewimage), drawn through the display settings bycroak.plotting.display.displayed. These views are normalised for display (unit peaks, dB below the peak). - Physical arrays live in
RetrievalPlotData/ProcessedResult(croak.plotting.panels,croak.processing).
Checked against 5140b0f; read, not run.
To do
- Needs a decision (maintainers): write what is drawn (the view as shown, so a CSV matches its plot, display axis included) or the physical arrays (in SI units, unnormalised)? Recommendation: the view as shown, with the units in the column headers, because that is what "the data of this plot" means to a user, and say so in the manual. A map is written as a long table (x, y, value).
- A pure function that turns a
LineVieworMapViewinto a table (header row with units, then columns), incroak.plotting, with tests and an example. - "Save data as CSV…" in each plot's right-click menu, and "Data as CSV…" on Export ▾ for a page (one file per plot in a chosen folder, named from the plot titles).
- Document it in the GUI how-to, under Figures for publication.
Done when
A plot's CSV, read back with numpy.loadtxt, reproduces its curves (or image) to float precision, tested for a line view with a right axis, a map, and a view on the other spectral axis; the manual says what is written.
Activity