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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UqXYdJDrM65gxsCn2PrbfK
This commit is contained in:
leonarski_fandClaude Fable 5.1 committed 2026-11-14 08:05:35 +01:00
1 parent a95fc16576
commit 0e2151494e
17 files changed
+128 -70

No files matched your search

+2
View File
@@ -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) {
+30 -1
View File
@@ -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;
+9
View File
@@ -155,6 +155,13 @@ public:
bool dMinIsSet() const;
void unsetD_min();
/// <summary>
/// Where the CC1/2 fall-off is fitted, in Angstrom: the resolution to quote. The written range (&#x60;d_min&#x60;) deliberately reaches one shell beyond it. Absent without a fit (a serial merge&#39;s &#x60;d_min&#x60; is the fit itself).
/// </summary>
double getResolutionFit() const;
void setResolutionFit(double const value);
bool resolutionFitIsSet() const;
void unsetResolution_fit();
/// <summary>
/// ISa of the error model; absent until the collection is scaled and merged, or where it was not determined
/// </summary>
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;
+6
View File
@@ -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
+2 -2
View File
@@ -892,7 +892,7 @@ and validation of every following rugnux live collection, until it is removed wi
</div></div><div class="sc-jaXxmE eqYzvz"><div class="sc-iMTnTL fkPTul"><h5 class="sc-dAlyuH sc-hwdzOV jbQuod JjoyL">Authorizations:</h5><svg class="sc-cwHptR iZRiKW" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg></div><div class="sc-krNlru gkwgxc"><span class="sc-jMakVo bPNrjo"><span class="sc-ihgnxF jlNGfN"><i>bearerAuth</i></span></span></div></div><div><h3 class="sc-fMMURN egoxtT">Responses</h3><div><button class="sc-kzqdkY jgSwKD"><svg class="sc-cwHptR hWEnWx" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg><strong class="sc-dSIIpw bpEYcE">200<!-- --> </strong><div class="sc-eeDRCY sc-eBMEME sc-dCFHLb gTGgei kekOtA kCaLQd"><p>Everything OK</p>
</div></button></div><div><button class="sc-kzqdkY bXzzUN"><svg class="sc-cwHptR cSkZlF" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg><strong class="sc-dSIIpw bpEYcE">401<!-- --> </strong><div class="sc-eeDRCY sc-eBMEME sc-dCFHLb gTGgei kekOtA kCaLQd"><p>The current dataset is protected and no valid bearer token was presented.</p>
</div></button></div></div></div><div class="sc-iGgWBj sc-gsFSXq ibAZSi eDeKjd"><div class="sc-ejfMa-d bNUPQg"><button class="sc-EgOXT cFEcOl"><span type="get" class="sc-eZYNyq qGfV http-verb get">get</span><span class="sc-iEXKAA gUNSDu">/rugnux/status</span><svg class="sc-cwHptR iVFMLx" style="margin-right:-25px" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg></button><div aria-hidden="true" class="sc-dlWCHZ kWacYr"><div class="sc-hHOBiw cndTNO"><div class="sc-eeDRCY sc-eBMEME gTGgei fbXBig"><p>Test Jungfraujoch system</p>
</div><div tabindex="0" role="button"><div class="sc-kWtpeL gEncxT"><span>http://localhost:5232</span>/rugnux/status</div></div></div></div></div><div><h3 class="sc-kpDqfm eBBgSB"> <!-- -->Response samples<!-- --> </h3><div class="sc-bXCLTC dHowgL" data-rttabs="true"><ul class="react-tabs__tab-list" role="tablist"><li class="tab-success react-tabs__tab--selected" role="tab" id="tab_R_jiia_0" aria-selected="true" aria-disabled="false" aria-controls="panel_R_jiia_0" tabindex="0" data-rttab="true">200</li></ul><div class="react-tabs__tab-panel react-tabs__tab-panel--selected" role="tabpanel" id="panel_R_jiia_0" aria-labelledby="tab_R_jiia_0"><div><div class="sc-bbSZdi gCVTxk"><span class="sc-fjvvzt jWReSk">Content type</span><div class="sc-JrDLc iTKzPJ">application/json</div></div><div class="sc-uVWWZ gQROPU"><div class="sc-esYiGF dWQNJI"><div class="sc-koXPp efufqz"><button><div class="sc-fhzFiK kwZDms">Copy</div></button><button> Expand all </button><button> Collapse all </button></div><div tabindex="0" class="sc-eeDRCY gTGgei sc-fXSgeo bnrBiz"><div class="redoc-json"><code><button class="collapser" aria-label="collapse"></button><span class="token punctuation">{</span><span class="ellipsis"></span><ul class="obj collapsible"><li><div class="hoverable "><span class="property token string">"state"</span>: <span class="token string">&quot;Idle&quot;</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"placed_model"</span>: <span class="token boolean">true</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"refined_model"</span>: <span class="token boolean">true</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"anomalous_map"</span>: <span class="token boolean">true</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"anomalous_signal"</span>: <span class="token boolean">true</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"model"</span>: <button class="collapser" aria-label="collapse"></button><span class="token punctuation">{</span><span class="ellipsis"></span><ul class="obj collapsible"><li><div class="hoverable collapsed"><span class="property token string">"placement"</span>: <span class="token string">&quot;string&quot;</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"model_name"</span>: <span class="token string">&quot;string&quot;</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"predicted"</span>: <span class="token boolean">true</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"reason"</span>: <span class="token string">&quot;string&quot;</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"r_work"</span>: <span class="token number">0.1</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"r_free"</span>: <span class="token number">0.1</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"cc_model"</span>: <span class="token number">0.1</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"fit_sigma"</span>: <span class="token number">0.1</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"map_atom_sigma"</span>: <span class="token number">0.1</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"rigid_body_angle_deg"</span>: <span class="token number">0.1</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"rigid_body_shift_A"</span>: <span class="token number">0.1</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"mr_decision"</span>: <span class="token string">&quot;string&quot;</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"mr_space_group"</span>: <span class="token string">&quot;string&quot;</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"copies"</span>: <span class="token number">0</span><span class="token punctuation">,</span></div>Line truncated
</div><div tabindex="0" role="button"><div class="sc-kWtpeL gEncxT"><span>http://localhost:5232</span>/rugnux/status</div></div></div></div></div><div><h3 class="sc-kpDqfm eBBgSB"> <!-- -->Response samples<!-- --> </h3><div class="sc-bXCLTC dHowgL" data-rttabs="true"><ul class="react-tabs__tab-list" role="tablist"><li class="tab-success react-tabs__tab--selected" role="tab" id="tab_R_jiia_0" aria-selected="true" aria-disabled="false" aria-controls="panel_R_jiia_0" tabindex="0" data-rttab="true">200</li></ul><div class="react-tabs__tab-panel react-tabs__tab-panel--selected" role="tabpanel" id="panel_R_jiia_0" aria-labelledby="tab_R_jiia_0"><div><div class="sc-bbSZdi gCVTxk"><span class="sc-fjvvzt jWReSk">Content type</span><div class="sc-JrDLc iTKzPJ">application/json</div></div><div class="sc-uVWWZ gQROPU"><div class="sc-esYiGF dWQNJI"><div class="sc-koXPp efufqz"><button><div class="sc-fhzFiK kwZDms">Copy</div></button><button> Expand all </button><button> Collapse all </button></div><div tabindex="0" class="sc-eeDRCY gTGgei sc-fXSgeo bnrBiz"><div class="redoc-json"><code><button class="collapser" aria-label="collapse"></button><span class="token punctuation">{</span><span class="ellipsis"></span><ul class="obj collapsible"><li><div class="hoverable "><span class="property token string">"state"</span>: <span class="token string">&quot;Idle&quot;</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"placed_model"</span>: <span class="token boolean">true</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"refined_model"</span>: <span class="token boolean">true</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"anomalous_map"</span>: <span class="token boolean">true</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"anomalous_signal"</span>: <span class="token boolean">true</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"model"</span>: <button class="collapser" aria-label="collapse"></button><span class="token punctuation">{</span><span class="ellipsis"></span><ul class="obj collapsible"><li><div class="hoverable collapsed"><span class="property token string">"placement"</span>: <span class="token string">&quot;string&quot;</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"model_name"</span>: <span class="token string">&quot;string&quot;</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"predicted"</span>: <span class="token boolean">true</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"reason"</span>: <span class="token string">&quot;string&quot;</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"r_work"</span>: <span class="token number">0.1</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"r_free"</span>: <span class="token number">0.1</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"cc_model"</span>: <span class="token number">0.1</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"fit_sigma"</span>: <span class="token number">0.1</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"map_atom_sigma"</span>: <span class="token number">0.1</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"rigid_body_angle_deg"</span>: <span class="token number">0.1</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"rigid_body_shift_A"</span>: <span class="token number">0.1</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"mr_decision"</span>: <span class="token string">&quot;string&quot;</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"mr_space_group"</span>: <span class="token string">&quot;string&quot;</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"copies"</span>: <span class="token number">0</span><span class="token punctuation">,</span></div>Line truncated
as before any collection. The collection&#39;s images, plots and the rugnux live settings are kept.
Can be only run when Jungfraujoch is not collecting data.</p>
</div></div><div><h3 class="sc-fMMURN egoxtT">Responses</h3><div><button class="sc-kzqdkY jkjMMR" disabled=""><strong class="sc-dSIIpw bpEYcE">200<!-- --> </strong><div class="sc-eeDRCY sc-eBMEME sc-dCFHLb gTGgei kekOtA kCaLQd"><p>Done</p>
@@ -1157,7 +1157,7 @@ then image might be replaced in the buffer between calling /images and /image.cb
</div></button></div></div></div><div class="sc-iGgWBj sc-gsFSXq ibAZSi eDeKjd"><div class="sc-ejfMa-d bNUPQg"><button class="sc-EgOXT cFEcOl"><span type="get" class="sc-eZYNyq qGfV http-verb get">get</span><span class="sc-iEXKAA gUNSDu">/version</span><svg class="sc-cwHptR iVFMLx" style="margin-right:-25px" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg></button><div aria-hidden="true" class="sc-dlWCHZ kWacYr"><div class="sc-hHOBiw cndTNO"><div class="sc-eeDRCY sc-eBMEME gTGgei fbXBig"><p>Test Jungfraujoch system</p>
</div><div tabindex="0" role="button"><div class="sc-kWtpeL gEncxT"><span>http://localhost:5232</span>/version</div></div></div></div></div></div></div></div></div><div class="sc-dExYaf gZbfaQ"></div></div></div>
<script>
const __redoc_state = {"menu":{"activeItemIdx":-1},"spec":{"data":{"openapi":"3.0.3","info":{"title":"Jungfraujoch","description":"API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland).\nJungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU.\nJungfraujoch uses FPGA boards to acquire data at high data rates.\n\n# License Clarification\n\nWhile this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply**\nwhen this file is used solely to generate OpenAPI clients or when implementing applications that\ninteract with the API. Generated client code and applications using this API definition are not\nsubject to the GPL license requirements and may be distributed under terms of your choosing.\n\nThis exception is similar in spirit to the Linux Kernel's approach to userspace API headers and\nthe GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that\nuser programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not\nderivative works of the kernel and are not subject to the terms of the GPL.\n\nThis exception is intended to allow wider use of this API specification without imposing GPL\nrequirements on applications that merely interact with the API, regardless of whether they\ncommunicate through network calls or other mechanisms.\n","version":"1.0.0-rc.186","contact":{"name":"Filip Leonarski (Paul Scherrer Institute)","email":"filip.leonarski@psi.ch"},"license":{"name":"GPL-3.0","url":"https://www.gnu.org/licenses/gpl-3.0.html"}},"servers":[{"url":"http://localhost:5232","description":"Test Jungfraujoch system"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Per-dataset secret. `/start` may carry one or more equivalent `tokens`; while the current\ndataset has any, the operations marked with this scheme require `Authorization: Bearer <token>`\nand answer 401 otherwise. A dataset started without `tokens` is not protected and the header is ignored.\n"}},"parameters":{"binning":{"in":"query","name":"binning","required":false,"schema":{"default":1,"type":"integer"},"description":"Binning of frames for the plot (0 = default binning)"},"experimental_coord":{"in":"query","name":"experimental_coord","required":false,"schema":{"type":"boolean","default":false},"description":"If measurement has goniometer axis defined, plot X-axis will represent rotation angle\nIf measurement has grid scan defined, plot X-axis and Y-axis will represent grid position, Z will be used as the final value\nFor still measurement the number is ignored\n"},"azint_unit":{"in":"query","name":"azint_unit","required":false,"schema":{"type":"string","enum":["Q_recipA","d_A","two_theta_deg"],"default":"Q_recipA"},"description":"Unit used for azim int.\n"},"fill_value":{"in":"query","name":"fill","required":false,"schema":{"type":"number","format":"float"},"description":"Fill value for elements that were missed during data collection\n"},"plot_type":{"in":"query","name":"type","required":true,"description":"Type of requested plot","schema":{"type":"string","enum":["bkg_estimate","spindle_blind_fraction","azint","azint_1d","spot_count","spot_count_low_res","spot_count_indexed","spot_count_ice","indexing_rate","indexing_lattice_count","indexing_unit_cell_length","indexing_unit_cell_angle","profile_radius","mosaicity","b_factor","error_pixels","saturated_pixels","image_collection_efficiency","receiver_delay","receiver_free_send_buf","strong_pixels","roi_sum","roi_mean","roi_max_count","roi_pixels","roi_weighted_x","roi_weighted_y","packets_received","max_pixel_value","resolution_estimate","pixel_sum","processing_time","beam_center_x","beam_center_y","integrated_reflections","image_scale_factor","image_scale_cc","compression_ratio","ice_ring_score"]}},"roi":{"in":"query","name":"roi","required":false,"schema":{"type":"string","minLength":1},"description":"Name of ROI for which plot is requested"},"image_id":{"in":"query","name":"id","required":false,"schema":{"type":"integer","format":"int64","default":-1,"minimum":-2},"description":"Image ID in the image buffer. Special values: -1 - last image in the buffer, -2: last indexed image in the buffer"},"saturation":{"in":"query","name":"saturation","required":false,"schema":{"type":"number","format":"float","minimum":-32767,"maximum":32767},"description":"Saturation value to set contrast in the preview image; if not provided, then autocontrast procedure is used"},"background":{"in":"query","name":"background","required":false,"schema":{"type":"number","format":"float","default":0,"minimum":-32767,"maximum":32767},"description":"Background value to set contrast in the preview image"},"show_spots":{"in":"query","name":"show_spots","schema":{"type":"boolean","default":true},"description":"Show spot finding results on the image"},"show_predictions":{"in":"query","name":"show_predictions","schema":Line truncated
const __redoc_state = {"menu":{"activeItemIdx":-1},"spec":{"data":{"openapi":"3.0.3","info":{"title":"Jungfraujoch","description":"API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland).\nJungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU.\nJungfraujoch uses FPGA boards to acquire data at high data rates.\n\n# License Clarification\n\nWhile this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply**\nwhen this file is used solely to generate OpenAPI clients or when implementing applications that\ninteract with the API. Generated client code and applications using this API definition are not\nsubject to the GPL license requirements and may be distributed under terms of your choosing.\n\nThis exception is similar in spirit to the Linux Kernel's approach to userspace API headers and\nthe GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that\nuser programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not\nderivative works of the kernel and are not subject to the terms of the GPL.\n\nThis exception is intended to allow wider use of this API specification without imposing GPL\nrequirements on applications that merely interact with the API, regardless of whether they\ncommunicate through network calls or other mechanisms.\n","version":"1.0.0-rc.186","contact":{"name":"Filip Leonarski (Paul Scherrer Institute)","email":"filip.leonarski@psi.ch"},"license":{"name":"GPL-3.0","url":"https://www.gnu.org/licenses/gpl-3.0.html"}},"servers":[{"url":"http://localhost:5232","description":"Test Jungfraujoch system"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Per-dataset secret. `/start` may carry one or more equivalent `tokens`; while the current\ndataset has any, the operations marked with this scheme require `Authorization: Bearer <token>`\nand answer 401 otherwise. A dataset started without `tokens` is not protected and the header is ignored.\n"}},"parameters":{"binning":{"in":"query","name":"binning","required":false,"schema":{"default":1,"type":"integer"},"description":"Binning of frames for the plot (0 = default binning)"},"experimental_coord":{"in":"query","name":"experimental_coord","required":false,"schema":{"type":"boolean","default":false},"description":"If measurement has goniometer axis defined, plot X-axis will represent rotation angle\nIf measurement has grid scan defined, plot X-axis and Y-axis will represent grid position, Z will be used as the final value\nFor still measurement the number is ignored\n"},"azint_unit":{"in":"query","name":"azint_unit","required":false,"schema":{"type":"string","enum":["Q_recipA","d_A","two_theta_deg"],"default":"Q_recipA"},"description":"Unit used for azim int.\n"},"fill_value":{"in":"query","name":"fill","required":false,"schema":{"type":"number","format":"float"},"description":"Fill value for elements that were missed during data collection\n"},"plot_type":{"in":"query","name":"type","required":true,"description":"Type of requested plot","schema":{"type":"string","enum":["bkg_estimate","spindle_blind_fraction","azint","azint_1d","spot_count","spot_count_low_res","spot_count_indexed","spot_count_ice","indexing_rate","indexing_lattice_count","indexing_unit_cell_length","indexing_unit_cell_angle","profile_radius","mosaicity","b_factor","error_pixels","saturated_pixels","image_collection_efficiency","receiver_delay","receiver_free_send_buf","strong_pixels","roi_sum","roi_mean","roi_max_count","roi_pixels","roi_weighted_x","roi_weighted_y","packets_received","max_pixel_value","resolution_estimate","pixel_sum","processing_time","beam_center_x","beam_center_y","integrated_reflections","image_scale_factor","image_scale_cc","compression_ratio","ice_ring_score"]}},"roi":{"in":"query","name":"roi","required":false,"schema":{"type":"string","minLength":1},"description":"Name of ROI for which plot is requested"},"image_id":{"in":"query","name":"id","required":false,"schema":{"type":"integer","format":"int64","default":-1,"minimum":-2},"description":"Image ID in the image buffer. Special values: -1 - last image in the buffer, -2: last indexed image in the buffer"},"saturation":{"in":"query","name":"saturation","required":false,"schema":{"type":"number","format":"float","minimum":-32767,"maximum":32767},"description":"Saturation value to set contrast in the preview image; if not provided, then autocontrast procedure is used"},"background":{"in":"query","name":"background","required":false,"schema":{"type":"number","format":"float","default":0,"minimum":-32767,"maximum":32767},"description":"Background value to set contrast in the preview image"},"show_spots":{"in":"query","name":"show_spots","schema":{"type":"boolean","default":true},"description":"Show spot finding results on the image"},"show_predictions":{"in":"query","name":"show_predictions","schema":Line truncated
var container = document.getElementById('redoc');
Redoc.hydrate(__redoc_state, container);
+4 -2
View File
@@ -306,8 +306,10 @@ found, and once it is over the verdict, the summary, warnings and the time from
every result written. `shells` carries the merging statistics by resolution shell - the rows of the shell
table of `<file_prefix>_report.txt`, on the same shells: multiplicity, ⟨I/σ⟩, completeness, CC1/2, R_meas
(rotation), R_split (serial), CCref (with reference data) and the R-free of the placed model as given (with a
model), each absent where the run does not measure it - and `shells_merge` the merge they are of. A rotation
run fills them when it is over; a serial one at each provisional merge and at the end, the R-free once the model
model), each absent where the run does not measure it - and `shells_merge` the merge they are of. With them come
the merge's `d_min`, the written range, and `resolution_fit`, where the CC1/2 fall-off is fitted: the resolution to
quote, which the written range deliberately reaches a shell beyond (the page marks the fit on its shell plots).
A rotation run fills them at the scaling checkpoint, before the model work; a serial one at each provisional merge and at the end, the R-free once the model
step on that same merge has its result. A rotation run also leaves `frame_scales`, the per-image scale factor of
the merge, and `frame_ranges`, the stretches of the sweep the merge downgraded or rejected (the report's SWEEP
section) with the reason it saw there - which frames rugnux left out, and why. The web frontend shows it on the
@@ -20,6 +20,7 @@ Name | Type | Description | Notes
**frame_ranges** | [**List[RugnuxLiveFrameRange]**](RugnuxLiveFrameRange.md) | Rotation, once the run is over: the stretches of the sweep the merge downgraded or rejected, in order; every image outside them is merged at its own weight. Absent on serial data and until there is a merge; empty where the whole sweep was merged. | [optional]
**space_group** | **str** | Space group of the result (the summary&#39;s \&quot;Space group\&quot; row); absent until the collection is scaled and merged | [optional]
**d_min** | **float** | High-resolution limit of the merge, in Angstrom; absent until the collection is scaled and merged, or without a merge | [optional]
**resolution_fit** | **float** | Where the CC1/2 fall-off is fitted, in Angstrom: the resolution to quote. The written range (&#x60;d_min&#x60;) deliberately reaches one shell beyond it. Absent without a fit (a serial merge&#39;s &#x60;d_min&#x60; is the fit itself). | [optional]
**isa** | **float** | ISa of the error model; absent until the collection is scaled and merged, or where it was not determined | [optional]
**probe** | **str** | Answer of the early lattice probe on the first 60 degrees; empty until it answers, and the run&#39;s own lattice once the run has indexed |
**probe_s** | **float** | When the probe answered (or the run indexed), since the first image | [optional]
+6
View File
@@ -2490,6 +2490,12 @@ export type rugnux_live_status = {
* High-resolution limit of the merge, in Angstrom; absent until the collection is scaled and merged, or without a merge
*/
d_min?: number;
/**
* 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).
*
*/
resolution_fit?: number;
/**
* ISa of the error model; absent until the collection is scaled and merged, or where it was not determined
*/
+1
View File
@@ -1068,6 +1068,7 @@ export const zRugnuxLiveStatus = z.object({
frame_ranges: z.array(zRugnuxLiveFrameRange).optional(),
space_group: z.string().optional(),
d_min: z.number().optional(),
resolution_fit: z.number().optional(),
isa: z.number().optional(),
probe: z.string(),
probe_s: z.number().optional(),
+5 -2
View File
@@ -72,6 +72,7 @@ function overallStatistics(s: rugnux_live_status) {
const pct = (x: number | undefined) => x === undefined ? undefined : 100 * x;
return {
d_min: o?.d_min ?? s.d_min,
fit: s.resolution_fit,
cc_half: o?.cc_half ?? summaryNumber(s, /^signal/i, /CC1\/2\s+([\d.]+)/),
i_over_sigma: o?.i_over_sigma ?? summaryNumber(s, /^signal/i, /I\/sigma\s+([\d.]+)/),
completeness: pct(o?.completeness) ?? summaryNumber(s, /^completeness/i, /([\d.]+)\s*%/),
@@ -176,8 +177,10 @@ function RugnuxHero({s, modelLoaded, givenCell, column}:
? {gridTemplateColumns: {xs: "repeat(2, minmax(0, 1fr))", sm: "repeat(3, minmax(0, 1fr))", md: "1fr"}, gridAutoRows: {md: "minmax(0, 1fr)"}, flexGrow: 1,
"& > *": {display: "flex", flexDirection: "column", justifyContent: "center"}}
: {gridTemplateColumns: {xs: "repeat(3, minmax(0, 1fr))", md: "repeat(10, minmax(0, 1fr))"}})}}>
<Tile value={num(o.d_min, x => `${x.toFixed(2)} Å`)} caption="Resolution" tone={pending}
tip="High-resolution limit of the merge (d_min)."/>
<Tile value={num(o.fit ?? o.d_min, x => `${x.toFixed(2)} Å`)} caption="Resolution" tone={pending}
tip={o.fit !== undefined
? `Where the CC½ fall-off is fitted: the resolution to quote. The reflections are written to ${o.d_min?.toFixed(2)} Å, a shell beyond, on purpose.`
: "High-resolution limit of the merge (d_min)."}/>
<Tile value={num(o.cc_half, x => x.toFixed(3))} caption="CC½" tone={pending}
tip="CC½ of the whole merge; by shell in the plot."/>
<Tile value={num(o.i_over_sigma, x => x.toFixed(1))} caption="I/σ" tone={pending}
+17 -35
View File
@@ -60,22 +60,6 @@ function phase(s: rugnux_live_status, pal: LivePalette): { label: string, colour
return {label: s.state, colour: "text.disabled"};
}
// What the verdict is about, in words that say so: the conditions rugnux found in the data (the triage chips),
// else its first warning. Empty where there is nothing to say.
function verdictLine(s: rugnux_live_status) {
if (s.state === "Failed")
return s.message;
if (!s.verdict || s.verdict === "OK")
return "";
if (s.verdict === "CANCELLED")
return s.verdict_text;
const found = (s.triage ?? []).filter(t => t.severity === "serious" || t.severity === "attention").map(t => t.label);
const what = found.length > 0 ? found.join(", ") : s.warnings[0] ?? s.verdict_text;
return s.verdict === "WARNINGS"
? `Processing result: ${found.length > 1 ? `${found.length} warnings` : "warning"} - ${what}`
: `Processing result: ${s.verdict.toLowerCase()} - ${what}`;
}
// Back to the empty page, as if nothing was measured: the broker forgets the run's result (POST /rugnux/clear).
// Offered once the run is over; the images and the collection's plots elsewhere are kept.
function ClearButton() {
@@ -96,11 +80,11 @@ function ClearButton() {
// Phase, the dataset, the progress block and the clock: the number the run is judged by - seconds since the first
// image while it runs, from the last image to all results written once it is over. The line of the phase keeps
// its height whatever comes on it (the verdict, the Clear button), so nothing under it moves at the end.
// its height whatever comes on it (the Clear button), so nothing under it moves at the end. What the run found
// wrong is not here: the checks on the side say it.
function Header({s, name, deadline_s, measuring, pal}:
{ s: rugnux_live_status, name?: string, deadline_s: number, measuring: boolean, pal: LivePalette }) {
const p = phase(s, pal);
const verdict = verdictLine(s);
const running = s.state === "Running";
const lastImage = lastImageTime(s);
const latency = s.last_image_to_written_s;
@@ -125,15 +109,8 @@ function Header({s, name, deadline_s, measuring, pal}:
{name.split("/").pop()}
</Typography>
</Tooltip>}
{verdict && <Tooltip arrow title={<Box sx={{whiteSpace: "pre-line"}}>{[s.verdict_text, ...s.warnings].filter(Boolean).join("\n\n")}</Box>}>
<Typography noWrap sx={{color: p.colour, fontWeight: 600, minWidth: 0, display: {xs: "none", xl: "block"}}}>{verdict}</Typography>
</Tooltip>}
{!running && !measuring && <ClearButton/>}
</Stack>
{/* a narrow window has no room beside the phase: the verdict on a line of its own, there from the start */}
<Typography sx={{display: {xs: "block", xl: "none"}, color: p.colour, fontWeight: 600, minHeight: "1.5em", mt: -1, mb: 1}}>
{verdict}
</Typography>
<RugnuxProgress s={s} deadline_s={deadline_s}/>
</Box>
<Box sx={{textAlign: "right", minWidth: 220}}>
@@ -153,8 +130,8 @@ function Later({text}: { text: string }) {
return <Typography sx={{color: "text.disabled", m: "auto", textAlign: "center", px: 2}}>{text}</Typography>;
}
// The step rugnux is on, large with its progress, filling the centre until there is a model to show; the
// steps behind it are on the strip under the bars.
// The step rugnux is on, large with its progress and what it has noted so far, filling the centre until there
// is a model to show; the steps behind it are on the strip under the bars.
function RunConsole({s, pal}: { s: rugnux_live_status, pal: LivePalette }) {
const running = s.state === "Running";
const current = running && s.steps.length > 0 && s.steps[s.steps.length - 1].duration_s === undefined
@@ -163,11 +140,11 @@ function RunConsole({s, pal}: { s: rugnux_live_status, pal: LivePalette }) {
return <Later text={running ? "waiting for images" : s.state === "Failed" ? "failed" : "no model"}/>;
return (
<Box sx={{py: 2}}>
<Typography sx={{...LABEL_SX, color: pal.processing}}>now</Typography>
<Typography sx={{fontSize: "2rem", fontWeight: 800, lineHeight: 1.1, animation: `${pulse} 2.4s ease-in-out infinite`,
"@media (prefers-reduced-motion: reduce)": {animation: "none"}}}>
{current.title}{s.step_progress !== undefined && <Box component="span" sx={{color: pal.processing, ml: 2}}>{(100 * s.step_progress).toFixed(0)} %</Box>}
</Typography>
{current.notes.map((note, i) => <Typography key={i} sx={{color: "text.secondary", mt: i === 0 ? 1.5 : 0.5}}>{note}</Typography>)}
</Box>
);
}
@@ -182,11 +159,13 @@ function Division({label, children, sx}: { label?: React.ReactNode, children: Re
);
}
// The model shows once a rotation run is over; serial data place it on each provisional merge
const modelShown = (s: rugnux_live_status) => s.model !== undefined && s.placed_model && (s.state !== "Running" || s.stills !== undefined);
function Centre({s, pal}: { s: rugnux_live_status, pal: LivePalette }) {
const m = s.model;
// The model shows once a rotation run is over; serial data place it on each provisional merge, and the viewer
// reloads when the model step has a new result, not every time the status is polled.
if (m && s.placed_model && (s.state !== "Running" || s.stills)) {
// The viewer reloads when the model step has a new result, not every time the status is polled.
if (m && modelShown(s)) {
const resultKey = s.stills
? `${m.placement} ${m.r_work} ${m.r_free} ${m.refinement?.r_free} ${s.refined_model}`
: `${s.elapsed_s}`;
@@ -249,19 +228,22 @@ function Dashboard({s, name, givenCell, deadline_s, modelLoaded, measuring, pal}
<Division label="Image" sx={{...hairline, gridColumn: {xl: 2}, minHeight: {xs: 320, xl: 0}}}>
<RugnuxImage measuring={measuring} overlays={overlays}/>
</Division>
<Box sx={{gridColumn: {xl: 3}, minHeight: {xs: 480, xl: 0}, display: "flex", flexDirection: "column"}}>
{/* below the stage the model takes the whole width under the image, only as tall as Mol* needs, and
nothing when there is no model to show */}
<Box sx={{gridColumn: {md: "1 / 3", xl: 3}, minHeight: {xs: modelShown(s) ? 480 : 0, xl: 0}, display: "flex", flexDirection: "column"}}>
<Centre s={s} pal={pal}/>
</Box>
<Box sx={{display: "flex", flexDirection: "column", gap: 2.5, minHeight: 0, gridColumn: {xl: 4}, gridRow: {xl: "1 / 3"}, ...hairline}}>
<Box sx={{display: "flex", flexDirection: "column", gap: 2.5, minHeight: 0, gridColumn: {md: "1 / 3", xl: 4}, gridRow: {xl: "1 / 3"}, ...hairline}}>
<Division sx={{flex: "0 1 auto", maxHeight: "40%", overflowY: "auto", "& > *": {flexShrink: 0}}}>
{s.triage && s.triage.length > 0 ? <RugnuxTriage items={s.triage}/>
: <Later text={s.stills ? "checks after the first merge" : "checks after the run"}/>}
: s.state === "Failed" ? <Typography sx={{color: pal.serious, fontWeight: 600}}>{s.message}</Typography>
: <Later text={s.stills ? "checks after the first merge" : "checks after the run"}/>}
</Division>
<Division sx={{flex: {xs: "none", xl: "1 1 0"}}} label={<>By resolution{s.stills && s.shells_merge && ` · ${s.shells_merge}`}</>}>
<Box ref={plotsRef} sx={{flexGrow: 1, minHeight: {xs: 200, xl: 0}, display: "flex"}}>
{s.shells && s.shells.length > 0
? <Box sx={{width: "100%"}}>
<RugnuxShellPlots shells={s.shells} d_min={s.overall?.d_min ?? s.d_min}
<RugnuxShellPlots shells={s.shells} d_min={s.overall?.d_min ?? s.d_min} fit={s.resolution_fit}
height={stage ? Math.max(150, plotsHeight / 2) : 220}/>
</Box>
: <Later text={later}/>}
+7 -5
View File
@@ -10,7 +10,9 @@ import {inkOn, LivePalette, livePalette} from "../livePalette";
// one segment each, as wide as the step took - the running one growing to "now" - so what takes how long is
// read off the bar. Each kind of step has a tag of a few letters and a colour of its own, the same on every
// pass and on the strip under the bars that gives each kind its time; the full titles are on hover. The last
// image and the deadline are lines across both bars.
// image and the deadline are lines across both bars. The axis spans the collection and the deadline after it
// from the start and keeps that scale: nothing moves under the eye as the run goes, and it extends only once
// the run is past it.
const stripes = keyframes`
from { background-position: 0 0; }
@@ -90,10 +92,10 @@ function RugnuxProgress({s, deadline_s}: { s: rugnux_live_status, deadline_s: nu
// n images span n - 1 intervals from the first to the last
const rate = s.images_received > 1 && collectionEnd > 0 ? (s.images_received - 1) / collectionEnd : 0;
const expectedEnd = rate > 0 ? (s.images_expected - 1) / rate : (s.expected_collection_s ?? 0);
// While collecting, the axis spans at least the set-up length, so it does not rescale as images arrive
const floor = s.expected_collection_s === undefined ? 10 : collecting ? s.expected_collection_s : 0;
const deadline = running && lastImage !== undefined && deadline_s > 0 ? lastImage + deadline_s : undefined;
const span = Math.max(s.elapsed_s, expectedEnd, deadline ?? 0, floor, 1) * 1.04;
// The collection as set up, as the rate measures it, or as it was (an older broker sends no set-up length)
const collection = Math.max(expectedEnd, lastImage ?? 0, s.expected_collection_s ?? 10);
const deadline = lastImage !== undefined && deadline_s > 0 ? lastImage + deadline_s : undefined;
const span = Math.max(s.elapsed_s, collection + deadline_s, 1) * 1.04;
const pct = (t: number) => 100 * Math.min(Math.max(t, 0), span) / span;
const tick = niceStep(span);
const ticks = Array.from({length: Math.floor(span / tick) + 1}, (_, i) => i * tick);
+24 -17
View File
@@ -4,18 +4,21 @@ import {rugnux_live_shell} from "../client";
import Plot from "./Plot";
// Completeness and CC1/2 by resolution shell, the two columns of rugnux's shell table read first, one panel each,
// one under the other. Each shell is drawn at 1/d^2 of its d_min, the axis labelled in d at round values - as
// many as the panel's width holds - and the resolution limit of the merge is a dashed line. Drawn like the
// plots of the data collection (MultiLinePlotWrapper): Plotly's own colours and font, a faint grid.
// one under the other on one axis: labelled once, under the lower panel. Each shell is drawn at 1/d^2 of its
// d_min, the axis labelled in d at round values - as many as the panel's width holds - and the resolution of the
// merge is a dashed line, named once, on the upper panel: where the CC1/2 fall-off is fitted, which the written
// range (the end of the axis) deliberately reaches a shell beyond; without a fit, the written limit itself.
// Drawn like the plots of the data collection (MultiLinePlotWrapper): Plotly's own colours and font, a faint grid.
const PANELS: { title: string, value: (sh: rugnux_live_shell) => number | undefined, colour: string }[] = [
{title: "Completeness [%]", value: sh => sh.completeness, colour: "#1f77b4"},
{title: "CC1/2 [%]", value: sh => sh.cc_half, colour: "#ff7f0e"},
{title: "CC\u00bd [%]", value: sh => sh.cc_half, colour: "#ff7f0e"},
];
// The d values the axis may be labelled at
const D_TICKS = [0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.8, 2, 2.2, 2.5, 3, 3.5, 4, 5, 6, 8, 10, 20];
const MARGIN = {t: 36, b: 40, l: 44, r: 12};
const MARGIN = {t: 36, b: 22, l: 44, r: 12};
const AXIS_TITLE = 18;
const TICK_SPACING_PX = 44;
// Width of an element in px, kept up to date as the page resizes: how many labels the axis can hold.
@@ -45,27 +48,30 @@ function dTicks(x0: number, x1: number, widthPx: number) {
return ticks;
}
// height: of each panel in px; d_min: the resolution limit of the merge
function RugnuxShellPlots({shells, d_min, merge, height = 300}:
{ shells: rugnux_live_shell[], d_min?: number, merge?: string, height?: number }) {
// height: of each panel in px; d_min: the written limit of the merge; fit: where its CC1/2 fall-off is fitted
function RugnuxShellPlots({shells, d_min, fit, merge, height = 300}:
{ shells: rugnux_live_shell[], d_min?: number, fit?: number, merge?: string, height?: number }) {
const theme = useTheme();
const grid = theme.palette.mode === "dark" ? "rgba(255,255,255,.12)" : "#eee";
const [ref, width] = useWidth();
const x = shells.map(sh => 1 / (sh.d_min * sh.d_min));
const cut = d_min !== undefined ? 1 / (d_min * d_min) : undefined;
const limit = fit ?? d_min;
const cut = limit !== undefined ? 1 / (limit * limit) : undefined;
const x0 = 0;
const x1 = 1.03 * Math.max(x[x.length - 1], cut ?? 0);
const x1 = 1.03 * Math.max(x[x.length - 1], d_min !== undefined ? 1 / (d_min * d_min) : 0, cut ?? 0);
const ticks = dTicks(x0, x1, Math.max(width - MARGIN.l - MARGIN.r, 100));
return (
<Box ref={ref}>
{merge && <Typography color="text.secondary" sx={{mb: 1}}>Merge of {merge}</Typography>}
{PANELS.map(panel => {
{PANELS.map((panel, i) => {
if (!shells.some(sh => panel.value(sh) !== undefined))
return null;
const lower = i === PANELS.length - 1;
const panelHeight = lower ? height + AXIS_TITLE : height;
return (
<Plot key={panel.title}
style={{width: "100%", height}}
style={{width: "100%", height: panelHeight}}
data={[{
x: x,
y: shells.map(sh => {
@@ -80,14 +86,14 @@ function RugnuxShellPlots({shells, d_min, merge, height = 300}:
}]}
layout={{
title: {text: panel.title, font: {size: 14}},
height,
margin: MARGIN,
height: panelHeight,
margin: lower ? {...MARGIN, b: MARGIN.b + AXIS_TITLE} : MARGIN,
paper_bgcolor: "rgba(0,0,0,0)",
plot_bgcolor: "rgba(0,0,0,0)",
font: {color: theme.palette.text.secondary},
showlegend: false,
xaxis: {
title: {text: "Resolution [&#8491;]", standoff: 4}, tickangle: 0,
title: lower ? {text: "Resolution [&#8491;]", standoff: 4} : undefined, tickangle: 0,
range: [x0, x1], gridcolor: grid, zerolinecolor: grid,
tickvals: ticks.map(d => 1 / (d * d)),
ticktext: ticks.map(d => String(d)),
@@ -96,9 +102,10 @@ function RugnuxShellPlots({shells, d_min, merge, height = 300}:
shapes: cut !== undefined ? [{type: "line" as const, xref: "x" as const, yref: "paper" as const,
x0: cut, x1: cut, y0: 0, y1: 1,
line: {color: theme.palette.text.secondary, width: 1.5, dash: "dash" as const}}] : [],
annotations: cut !== undefined ? [{x: cut, y: 0.04, xref: "x" as const, yref: "paper" as const,
annotations: cut !== undefined && i === 0 ? [{x: cut, y: 0.04, xref: "x" as const, yref: "paper" as const,
xanchor: "right" as const, yanchor: "bottom" as const, showarrow: false,
text: `limit ${d_min!.toFixed(2)} Å `, font: {size: 12, color: theme.palette.text.secondary}}] : [],
text: `${fit !== undefined ? "CC½ fit" : "limit"} ${limit!.toFixed(2)} Å `,
font: {size: 12, color: theme.palette.text.secondary}}] : [],
uirevision: "shells",
}}
config={{responsive: true, displayModeBar: false}}/>
+3 -1
View File
@@ -58,7 +58,9 @@ namespace {
d_min = statistics.overall.d_min;
if (!statistics.stills && result.error_model_isa_resolved && result.error_model_isa > 0.0)
isa = result.error_model_isa;
status.Headline(result.space_group ? result.space_group->xhm() : "", d_min, isa);
// the fit the report quotes: on the plain CC1/2 where there is one (rotation), else the applied one
const auto fit = result.resolution_fit_plain_A ? result.resolution_fit_plain_A : result.resolution_fit_A;
status.Headline(result.space_group ? result.space_group->xhm() : "", d_min, isa, fit);
status.Shells("the collection", LiveShells(statistics, validation), LiveOverall(statistics, validation, refinement));
}
+2 -1
View File
@@ -184,10 +184,11 @@ void RugnuxLiveStatus::Model(const RugnuxLiveModel &model) {
}
void RugnuxLiveStatus::Headline(const std::string &space_group, std::optional<double> d_min,
std::optional<double> isa) {
std::optional<double> isa, std::optional<double> resolution_fit) {
std::unique_lock ul(status_mutex);
snapshot.space_group = space_group;
snapshot.d_min = d_min;
snapshot.resolution_fit = resolution_fit;
snapshot.isa = isa;
}
+4 -2
View File
@@ -163,7 +163,8 @@ struct RugnuxLiveSnapshot {
std::optional<RugnuxLiveModel> model; // where a model was given
// The headline numbers of the result, once the run is over
std::string space_group;
std::optional<double> d_min; // of the merge
std::optional<double> d_min; // of the merge: the written range
std::optional<double> resolution_fit; // where the CC1/2 fall-off is fitted, the resolution to quote; none without a fit
std::optional<double> isa; // where the error model determined it
// The placed and refined models and their maps, for the viewer routes
std::shared_ptr<const RugnuxStructure> structure;
@@ -204,7 +205,8 @@ public:
const std::vector<std::string> &warnings, bool anomalous_signal = false);
void Triage(const std::vector<RugnuxLiveTriage> &triage);
void Model(const RugnuxLiveModel &model);
void Headline(const std::string &space_group, std::optional<double> d_min, std::optional<double> isa);
void Headline(const std::string &space_group, std::optional<double> d_min, std::optional<double> isa,
std::optional<double> resolution_fit = std::nullopt);
void Latency(double last_image_to_written_s);
// The collection is over: last_image_s is set, and the last image's time is returned (none if no image came).
std::optional<std::chrono::steady_clock::time_point> LastImage();
+5 -2
View File
@@ -181,17 +181,20 @@ TEST_CASE("RugnuxLiveStatus_Headline", "[RugnuxLive]") {
CHECK(!j.contains("space_group"));
CHECK(!j.contains("d_min"));
CHECK(!j.contains("isa"));
CHECK(!j.contains("resolution_fit"));
status.Headline("P 1 21 1", 1.25, 24.2);
status.Headline("P 1 21 1", 1.25, 24.2, 1.31);
j = Convert(status.Get());
CHECK(j["space_group"] == "P 1 21 1");
CHECK(j["d_min"].get<double>() == Catch::Approx(1.25));
CHECK(j["isa"].get<double>() == Catch::Approx(24.2));
CHECK(j["resolution_fit"].get<double>() == Catch::Approx(1.31));
// ISa undetermined
// ISa undetermined, no fit
status.Headline("P 1 21 1", 1.25, std::nullopt);
j = Convert(status.Get());
CHECK(!j.contains("isa"));
CHECK(!j.contains("resolution_fit"));
status.Clear();
CHECK(status.Get().space_group.empty());