Everything you need to create gratings, run simulations, and plot results inside Grax Web.
The active workspace root is {{ workspace_root }}. By default, Grax Web stores data in
.grax-web/ in the current working directory unless you switch the workspace from the home page.
Grax Web keeps all local state under the active workspace directory. The default workspace is
.grax-web/ next to where you launch grax-web.
saved_gratings/One JSON file per saved grating spec.runs/One run directory per simulation, with manifests and CSV outputs.plots/Saved comparison plots and their manifests.previews/Temporary and live preview images shown in the browser.The workspace can be changed from the home page. When you switch workspaces, the app reads and writes future gratings, runs, and plots in the new location.
The grating form uses the same packaged Henke material list that the Python API uses. Pick a material from the dropdown. The density field is prefilled with the built-in default for that element, and you can type a measured density when your sample is a film, porous layer, or otherwise not bulk-like.
xrt-style material objects still work for compatibility during the transition, but Grax will warn that this path is deprecated and will be removed in a future release. For new work, prefer the string material name plus an optional density override.
saved_gratings/<grating-id>.json.After saving, the grating detail page lets you edit the profile, review the preview image, or delete the grating. Saved gratings are the starting point for simulations. The saved JSON now stores each material as a name plus density pair so the same sample can be reconstructed later.
Each run gets its own directory under runs/<run-id>/. The manifest records the workflow, grating
metadata, selected orders, comment, and progress state. The run directory also stores the result CSV files and
generated preview images for that run.
plots/<plot-id>/.The saved plot page reopens the same interactive Plotly figure together with the selected runs and orders, so the comparison styling and the axis modes persist with the saved plot.
plots/.If you want to change the Web UI, these files control the main moving parts:
src/grax/web/app.py: routes, workspace behavior, simulation wiring, and runtime page data.src/grax/web/templates/*.html: page text, layout, and button placement.src/grax/web/static/web.css: styling and responsive layout.src/grax/web/static/web.js: client-side preview, Plotly rendering, and form interactions.src/grax/web/persistence.py: how gratings are stored and reconstructed from JSON.src/grax/web/runs.py: run manifests, result loading, and comparison plot saving.
To change the default workspace folder, edit the create_app() setup in
src/grax/web/app.py. To change the docs itself, edit this template and the matching external docs
notes in docs/index.md and docs/installation/web-ui.md.