figures/ folder side by side, and run python make_manifest.py figures after making new figures (it writes figures/manifest.json, which lets any web server show the folder).
Run Navigator
Click Open folder… and choose the folder that holds your figures. The page finds every image in it (png, jpg, svg, webp, gif) and arranges them in a grid.
Automatic folder: when this page is served (Jupyter, the eLog, any web server) it looks for, in order: the folder given as ?folder=… in the page address, a figures/ folder next to this page, the page's own folder, then DEFAULT_FOLDER if it is set at the top of the script. On a plain web server the folder needs a manifest.json (made by make_manifest.py) or a directory listing. Through Jupyter no manifest is needed and stacks are saved to the folder.
Default folder: a folder given as run_navigator.html?folder=path/to/experiment/, or DEFAULT_FOLDER set in the script, opens automatically when this page is served from the same machine, e.g. opened through Jupyter (in JupyterLab: right-click the file → Open in New Browser Tab, so the address contains /files/) or a web server. A page opened directly as a file can't open folders by path, so use Open folder… there.
Layouts it recognizes without any setup:
run_0123/delay_scan.png: a subfolder per run, with the file names as figure namesrun0123_delay_scan.png: all files in one folder, where the run name is everything up to the first number
Other layouts (stacks, overview, nested figures/ folders) are described in the ? tab.
Run info: click any key or value under a run (e.g. Scan: lxt_fast) to show only runs with the same value; click it again to undo. Several clicked values combine.
A JSON file named after a run (run004.json, anywhere in the folder), or any .json inside a run's subfolder, is read as key/value pairs such as {"Temp": "5C", "Scan": "lxt_fast"} and shown under the run name. The run filter can search it too, e.g. Scan=lxt_fast or Temp<10.
Tabs at the top right switch the view: Runs (this grid of runs × figures), Stacks (one row of figures per subfolder of stacks/; a folder named after a stack, e.g. stacks/stack02/, joins that stack with its comments, analysis keywords and runs) and Overview (figures from an Overview/ folder, any capitalization, with each subfolder on its own row, then counts, run info values, figure coverage and stacks; click a value or figure to jump back to the Runs tab filtered on it). Neither folder is shown as a run.
The four icons at the top left open and close the menu bars: ☰ general menu, ★ saved selections, ▤ stacks (a dot means unsaved stack changes), ⛶ full screen. When the viewer is shown inside another page from the same server (e.g. the eLog Summaries tab), a fifth icon ◧ hides that page's side panel (remembered), and ⛶ makes the viewer cover the whole window. A highlighted icon means its bar is open; collapse them all to give the figures the whole page.
Saved selections: set up what's shown, then click + Save current… and give it a label. Click a saved selection (or press 1–9) to switch to it, and click ⋯ to rename, overwrite or delete it. Saved selections are stored in this browser for each folder, so they're still there next session.
Stacks: click run names in the grid to select them (shift-click for a range, or use Select shown runs), then click + New stack and give it a name like lxt_fast 0-1ps 10uj. Stack members get a colored row (diagonal stripes in each stack's color when a run is in several stacks) and a stack: line in their info. A run can be in any number of stacks: click a stack label, or ⊕ in the run header, to tick the stacks it belongs to. Click a stack in the Stacks bar to make it the target: Add to … then adds the ticked runs to it, and S in the full-size view adds or removes the current run. Each stack is saved as stacks/stack01.json, stack02.json, … in your folder, with the run list, name, comments, each run's info and figure paths, ready for an LLM. The run filter accepts stack=stack01, stack=any or stack=none.
To hide a figure for every run, or a run for every figure, click ✕ in its row or column header, or untick it in the sidebar. ◎ shows only that item. Click any image to view it full size, then use the arrow keys to move between figures and runs. Ctrl-click a figure to select its run; Shift-click figures to pick several, then Open as grid in new tab. Reset… in the general menu offers View (show everything again), Selections (delete saved selections), Stacks (delete stacks) or All; the folder is always kept.
Works best in Chrome or Edge, which can remember the folder and pick up new figures with Rescan or auto-refresh. Other browsers ask you to choose the folder again each time you rescan.
Folder structure
Open the experiment's top folder (e.g. 2610_swissfel/ or XCS10163212226/), or the figures folder inside it. Opening the top folder is best: its name is unique, so remembered selections and stacks stay with that experiment. Next to a figures folder only figures/, stacks/ and overview/ are read; raw data, notebooks and other folders there are ignored. Run Navigator finds the runs, stacks and overview figures itself. Colours below: runs (Runs tab), stacked data (Stacks tab), overview (Overview tab).
Supported layouts
Runs in figures/, with stacks/ and overview/ next to it.
2610_swissfel/ ├─ raw/, notebooks/ … ignored ├─ figures/ │ ├─ run0101/ │ │ ├─ xes.png │ │ └─ delay_scan.png │ ├─ run0102/ … │ └─ run0101.json run info ├─ stacks/ │ ├─ stack01.json stack definition │ ├─ stack01/svd.png joins stack01 │ └─ water_15C/T.png own row └─ overview/ ├─ timeline.png └─ detector/gain.png
Everything inside one figures/ folder; runs in figures/figures/.
XCS10163212226/ ├─ hdf5/, scratch/ … ignored └─ figures/ ├─ figures/ │ ├─ run0101/xes.png │ └─ run0102/xes.png ├─ stacks/ │ ├─ stack01.json │ └─ stack01/svd.png └─ overview/ └─ timeline.png
Any folder in figures/ whose name is not a run name holds stacked data.
experiment/ └─ figures/ ├─ run0101/xes.png ├─ run0102/xes.png ├─ run0103/xes.png ├─ Water_15C_lxt/ │ └─ stacked.png own row ├─ Water_20C_lxt/ … └─ overview/ └─ timeline.png
Run folders at the top, or flat files named <run>_<figure>.
beamtime/ ├─ run0101/xes.png ├─ run0102/xes.png └─ stacks/stack01.json flat/ ├─ run0101_xes.png └─ run0102_xes.png
How folders are recognized
- Runs folder. Starting at the folder you opened, folders called
figuresare followed downwards; the deepest one holds the runs (or the opened folder itself if there is none). On each level that has afiguresfolder, onlyfigures/,stacks/andoverview/are read. - Runs. In the runs folder, the folders that share the most common numbered name (digits ignored, e.g.
run####) are runs. Each image in a run folder is a figure; images in subfolders are namedsub/figure. Loose images namedrun0101_xes.pngwork too. - Stacks.
stacks/folders (any capitalization), at the top or inside afiguresfolder. Each subfolder is a row of figures in the Stacks tab; a subfolder named after a stack (stack01/) is shown with that stack. In layout 3, the non-run folders next to the runs are rows as well. - Overview.
overview/,Overview/,OVERVIEW/… at the top or inside afiguresfolder. Images directly inside form the first row; each subfolder is its own row. - Ignored.
stacks,overviewandfiguresare never treated as runs; files outside the runs folder that fit none of the above are listed as unrecognized in the status tooltip.
Run info and stack files
- Run info (shown under run names and searchable, e.g.
Scan=lxt): a.jsonfile named after the run (run0101.json) or placed in the run folder. Nested keys are flattened. - Stacks are saved as
stackNN.jsonin thestacks/folder found; if there is none, astacks/folder is created next tooverview/(or next to the runs folder). The file lists the stack's name, comments, analysis note, runs and their run info, so analysis scripts can read it.
stacks/stack01.json
{ "stack": "stack01", "name": "Water 15C delay scan",
"comments": "…", "analysis": "…",
"runs": "run0101, run0102", "n_runs": 2,
"run_info": { "run0101": { "Scan": "lxt" }, … } }
Tips
- Hover the figure count in the general bar to see which layout was detected.
- On a web server (Jupyter, or any server with
manifest.jsonfrommake_manifest.py), open the page with the folder in the URL; the same rules apply.