From 0e2151494e077b1ffbd44bd611f8058318ffeba4 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Sat, 14 Nov 2026 07:39:59 +0100 Subject: [PATCH] rugnux live page: clean title line, the fitted resolution on the plots, a steady time axis, less said twice The title line is the phase and the dataset: what the run found wrong was there as well as on the side, and the checks on the side are its place (a failed run's message goes there too). The resolution the shell plots mark is now the one the report quotes - where the CC1/2 fall-off is fitted - published with the merge as `resolution_fit`; the written range, a shell beyond it on purpose, is the end of the axis, so the line sat on the plot's edge and said nothing. The Resolution tile shows the same number, with the written limit in its tooltip. The progress bars' axis spans the collection and the deadline after it from the start and keeps that scale (it extends only once the run is past it), instead of jumping when the last image came and again at the end. The two shell plots name the axis once and the limit once; the run console drops its "now" caption and shows the current step's notes instead, which the centre had room for. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01UqXYdJDrM65gxsCn2PrbfK --- broker/OpenAPIConvert.cpp | 2 + broker/gen/model/Rugnux_live_status.cpp | 31 +++++++++++- broker/gen/model/Rugnux_live_status.h | 9 ++++ broker/jfjoch_api.yaml | 6 +++ broker/redoc-static.html | 4 +- docs/JFJOCH_BROKER.md | 6 ++- docs/python_client/docs/RugnuxLiveStatus.md | 1 + frontend/src/client/types.gen.ts | 6 +++ frontend/src/client/zod.gen.ts | 1 + frontend/src/components/RugnuxHero.tsx | 7 ++- frontend/src/components/RugnuxPage.tsx | 52 +++++++------------- frontend/src/components/RugnuxProgress.tsx | 12 +++-- frontend/src/components/RugnuxShellPlots.tsx | 41 ++++++++------- receiver/JFJochReceiverRugnuxRotation.cpp | 4 +- receiver/RugnuxLiveStatus.cpp | 3 +- receiver/RugnuxLiveStatus.h | 6 ++- tests/RugnuxLiveStatusTest.cpp | 7 ++- 17 files changed, 128 insertions(+), 70 deletions(-) diff --git a/broker/OpenAPIConvert.cpp b/broker/OpenAPIConvert.cpp index bae930389..992b031b4 100644 --- a/broker/OpenAPIConvert.cpp +++ b/broker/OpenAPIConvert.cpp @@ -1322,6 +1322,8 @@ org::openapitools::server::model::Rugnux_live_status Convert(const RugnuxLiveSna ret.setSpaceGroup(input.space_group); if (input.d_min) ret.setDMin(input.d_min.value()); + if (input.resolution_fit) + ret.setResolutionFit(input.resolution_fit.value()); if (input.isa) ret.setIsa(input.isa.value()); if (input.stills) { diff --git a/broker/gen/model/Rugnux_live_status.cpp b/broker/gen/model/Rugnux_live_status.cpp index 0eb575857..cbf60a6ee 100644 --- a/broker/gen/model/Rugnux_live_status.cpp +++ b/broker/gen/model/Rugnux_live_status.cpp @@ -38,6 +38,8 @@ Rugnux_live_status::Rugnux_live_status() m_Space_groupIsSet = false; m_D_min = 0.0; m_D_minIsSet = false; + m_Resolution_fit = 0.0; + m_Resolution_fitIsSet = false; m_Isa = 0.0; m_IsaIsSet = false; m_Probe = ""; @@ -149,7 +151,7 @@ bool Rugnux_live_status::validate(std::stringstream& msg, const std::string& pat } } - + if (stepProgressIsSet()) { const float& value = m_Step_progress; @@ -304,6 +306,9 @@ bool Rugnux_live_status::operator==(const Rugnux_live_status& rhs) const ((!dMinIsSet() && !rhs.dMinIsSet()) || (dMinIsSet() && rhs.dMinIsSet() && getDMin() == rhs.getDMin())) && + ((!resolutionFitIsSet() && !rhs.resolutionFitIsSet()) || (resolutionFitIsSet() && rhs.resolutionFitIsSet() && getResolutionFit() == rhs.getResolutionFit())) && + + ((!isaIsSet() && !rhs.isaIsSet()) || (isaIsSet() && rhs.isaIsSet() && getIsa() == rhs.getIsa())) && (getProbe() == rhs.getProbe()) @@ -397,6 +402,8 @@ void to_json(nlohmann::json& j, const Rugnux_live_status& o) j["space_group"] = o.m_Space_group; if(o.dMinIsSet()) j["d_min"] = o.m_D_min; + if(o.resolutionFitIsSet()) + j["resolution_fit"] = o.m_Resolution_fit; if(o.isaIsSet()) j["isa"] = o.m_Isa; j["probe"] = o.m_Probe; @@ -482,6 +489,11 @@ void from_json(const nlohmann::json& j, Rugnux_live_status& o) j.at("d_min").get_to(o.m_D_min); o.m_D_minIsSet = true; } + if(j.find("resolution_fit") != j.end()) + { + j.at("resolution_fit").get_to(o.m_Resolution_fit); + o.m_Resolution_fitIsSet = true; + } if(j.find("isa") != j.end()) { j.at("isa").get_to(o.m_Isa); @@ -738,6 +750,23 @@ void Rugnux_live_status::unsetD_min() { m_D_minIsSet = false; } +double Rugnux_live_status::getResolutionFit() const +{ + return m_Resolution_fit; +} +void Rugnux_live_status::setResolutionFit(double const value) +{ + m_Resolution_fit = value; + m_Resolution_fitIsSet = true; +} +bool Rugnux_live_status::resolutionFitIsSet() const +{ + return m_Resolution_fitIsSet; +} +void Rugnux_live_status::unsetResolution_fit() +{ + m_Resolution_fitIsSet = false; +} double Rugnux_live_status::getIsa() const { return m_Isa; diff --git a/broker/gen/model/Rugnux_live_status.h b/broker/gen/model/Rugnux_live_status.h index 790a8be63..aaa397459 100644 --- a/broker/gen/model/Rugnux_live_status.h +++ b/broker/gen/model/Rugnux_live_status.h @@ -155,6 +155,13 @@ public: bool dMinIsSet() const; void unsetD_min(); /// + /// Where the CC1/2 fall-off is fitted, in Angstrom: the resolution to quote. The written range (`d_min`) deliberately reaches one shell beyond it. Absent without a fit (a serial merge's `d_min` is the fit itself). + /// + double getResolutionFit() const; + void setResolutionFit(double const value); + bool resolutionFitIsSet() const; + void unsetResolution_fit(); + /// /// ISa of the error model; absent until the collection is scaled and merged, or where it was not determined /// double getIsa() const; @@ -306,6 +313,8 @@ protected: bool m_Space_groupIsSet; double m_D_min; bool m_D_minIsSet; + double m_Resolution_fit; + bool m_Resolution_fitIsSet; double m_Isa; bool m_IsaIsSet; std::string m_Probe; diff --git a/broker/jfjoch_api.yaml b/broker/jfjoch_api.yaml index 39ebc40c0..36dfec97a 100644 --- a/broker/jfjoch_api.yaml +++ b/broker/jfjoch_api.yaml @@ -3377,6 +3377,12 @@ components: type: number format: double description: High-resolution limit of the merge, in Angstrom; absent until the collection is scaled and merged, or without a merge + resolution_fit: + type: number + format: double + description: | + Where the CC1/2 fall-off is fitted, in Angstrom: the resolution to quote. The written range (`d_min`) + deliberately reaches one shell beyond it. Absent without a fit (a serial merge's `d_min` is the fit itself). isa: type: number format: double diff --git a/broker/redoc-static.html b/broker/redoc-static.html index 8c3a392f3..71a30dce6 100644 --- a/broker/redoc-static.html +++ b/broker/redoc-static.html @@ -892,7 +892,7 @@ and validation of every following rugnux live collection, until it is removed wi
Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "state": "Idle",
  • "placed_model": true,
  • "refined_model": true,
  • "anomalous_map": true,
  • "anomalous_signal": true,
  • "model": {
    },
  • "stills": {
    },
  • "shells_merge": "string",
  • "shells": [
    ],
  • "overall": {
    },
  • "frame_scales": [
    ],
  • "frame_ranges": [
    ],
  • "space_group": "string",
  • "d_min": 0.1,
  • "isa": 0.1,
  • "probe": "string",
  • "probe_s": 0.1,
  • "start_to_first_image_s": 0.1,
  • "message": "string",
  • "images_expected": 0,
  • "expected_collection_s": 0.1,
  • "images_received": 0,
  • "elapsed_s": 0.1,
  • "step_progress": 1,
  • "steps": [
    ],
  • "last_image_s": 0.1,
  • "cut": "string",
  • "cut_s": 0.1,
  • "last_image_to_written_s": 0.1,
  • "verdict": "string",
  • "verdict_text": "string",
  • "summary": [
    ],
  • "warnings": [
    ],
  • "triage": [
    ]
}

Clear the live rugnux result of the last collection

Puts /rugnux/status back to Idle with nothing of the last run - its merge, model, maps, steps and notes - +

http://localhost:5232/rugnux/status

Response samples

Content type
application/json
{
  • "state": "Idle",
  • "placed_model": true,
  • "refined_model": true,
  • "anomalous_map": true,
  • "anomalous_signal": true,
  • "model": {
    },
  • "stills": {
    },
  • "shells_merge": "string",
  • "shells": [
    ],
  • "overall": {
    },
  • "frame_scales": [
    ],
  • "frame_ranges": [
    ],
  • "space_group": "string",
  • "d_min": 0.1,
  • "resolution_fit": 0.1,
  • "isa": 0.1,
  • "probe": "string",
  • "probe_s": 0.1,
  • "start_to_first_image_s": 0.1,
  • "message": "string",
  • "images_expected": 0,
  • "expected_collection_s": 0.1,
  • "images_received": 0,
  • "elapsed_s": 0.1,
  • "step_progress": 1,
  • "steps": [
    ],
  • "last_image_s": 0.1,
  • "cut": "string",
  • "cut_s": 0.1,
  • "last_image_to_written_s": 0.1,
  • "verdict": "string",
  • "verdict_text": "string",
  • "summary": [
    ],
  • "warnings": [
    ],
  • "triage": [
    ]
}

Clear the live rugnux result of the last collection

Puts /rugnux/status back to Idle with nothing of the last run - its merge, model, maps, steps and notes - as before any collection. The collection's images, plots and the rugnux live settings are kept. Can be only run when Jungfraujoch is not collecting data.

Responses