API: the live rugnux verdict can be CANCELLED; rugnux live covers DECTRIS serial collections
From rc186b86b99691and8f3ba8d38: the verdict's description lists CANCELLED, in jfjoch_api.yaml and, as the generator writes them, broker/gen/model/Rugnux_live_status.h, frontend/src/client/{types,zod}.gen.ts and docs/python_client/docs/RugnuxLiveStatus.md. The frontend shows a CANCELLED verdict as info, and for serial data shows the model section while the collection runs (RugnuxParts/RugnuxPage/RugnuxStills.tsx as in rc186). Adapted, not copied: rc186's rugnux_settings text says the FPGA workflow is not affected by the mode, which is not true here - JFJochReceiverFPGA still analyses serial runs live. The descriptions of rugnux_settings, its `enable` and rugnux_live_stills say instead that serial collections from a DECTRIS detector or converted by the FPGA are analysed; the generated files carry the same text (edited by hand, as only comments change; VERSION stays 1.0.0-rc.185). The frontend switch reads "Process collections with rugnux live". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HVeDQsU5a8AJUdJPgWevAK
This commit is contained in:
1 parent
48ae84416d
commit
8a7f46a4e2
13 files changed
+37
-27
No files matched your search
@@ -210,7 +210,7 @@ public:
|
||||
bool lastImageToWrittenSIsSet() const;
|
||||
void unsetLast_image_to_written_s();
|
||||
/// <summary>
|
||||
/// OK, WARNINGS, UNUSABLE or FAILED; empty until the run is over
|
||||
/// OK, WARNINGS, UNUSABLE, FAILED or CANCELLED; empty until the run is over
|
||||
/// </summary>
|
||||
std::string getVerdict() const;
|
||||
void setVerdict(std::string const& value);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/*
|
||||
* Rugnux_live_stills.h
|
||||
*
|
||||
* Serial frames converted by the FPGA and analysed on the GPU: the pre-pass on the first images (the beam centre, distance and mask the whole collection is analysed with), and the analysis since.
|
||||
* Serial frames analysed on the GPU: the pre-pass on the first images (the beam centre, distance and mask the whole collection is analysed with), and the analysis since.
|
||||
*/
|
||||
|
||||
#ifndef Rugnux_live_stills_H_
|
||||
@@ -26,7 +26,7 @@ namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Serial frames converted by the FPGA and analysed on the GPU: the pre-pass on the first images (the beam centre, distance and mask the whole collection is analysed with), and the analysis since.
|
||||
/// Serial frames analysed on the GPU: the pre-pass on the first images (the beam centre, distance and mask the whole collection is analysed with), and the analysis since.
|
||||
/// </summary>
|
||||
class Rugnux_live_stills
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/*
|
||||
* Rugnux_settings.h
|
||||
*
|
||||
* Rugnux live mode: rotation collections from a DECTRIS detector are processed by rugnux inside the broker while they arrive, and the merged result is sent to the writer. Serial collections converted by the FPGA (JUNGFRAU) are analysed on the GPU after a pre-pass on their first images that decides the beam centre, distance and mask (`stills` in `/rugnux/status`).
|
||||
* Rugnux live mode: rotation collections from a DECTRIS detector are processed by rugnux inside the broker while they arrive, and the merged result is sent to the writer. Serial collections, from a DECTRIS detector or converted by the FPGA (JUNGFRAU), are analysed on the GPU after a pre-pass on their first images that decides the beam centre, distance and mask (`stills` in `/rugnux/status`), and merged as they go.
|
||||
*/
|
||||
|
||||
#ifndef Rugnux_settings_H_
|
||||
@@ -25,7 +25,7 @@ namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Rugnux live mode: rotation collections from a DECTRIS detector are processed by rugnux inside the broker while they arrive, and the merged result is sent to the writer. Serial collections converted by the FPGA (JUNGFRAU) are analysed on the GPU after a pre-pass on their first images that decides the beam centre, distance and mask (`stills` in `/rugnux/status`).
|
||||
/// Rugnux live mode: rotation collections from a DECTRIS detector are processed by rugnux inside the broker while they arrive, and the merged result is sent to the writer. Serial collections, from a DECTRIS detector or converted by the FPGA (JUNGFRAU), are analysed on the GPU after a pre-pass on their first images that decides the beam centre, distance and mask (`stills` in `/rugnux/status`), and merged as they go.
|
||||
/// </summary>
|
||||
class Rugnux_settings
|
||||
{
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
/// Rugnux_settings members
|
||||
|
||||
/// <summary>
|
||||
/// Process DECTRIS rotation collections with rugnux live, and FPGA serial collections on the GPU after a pre-pass
|
||||
/// Process DECTRIS rotation collections with rugnux live, and serial collections on the GPU after a pre-pass
|
||||
/// </summary>
|
||||
bool isEnable() const;
|
||||
void setEnable(bool const value);
|
||||
|
||||
@@ -2803,13 +2803,14 @@ components:
|
||||
description: |
|
||||
Rugnux live mode: rotation collections from a DECTRIS detector are processed by rugnux
|
||||
inside the broker while they arrive, and the merged result is sent to the writer. Serial
|
||||
collections converted by the FPGA (JUNGFRAU) are analysed on the GPU after a pre-pass on their
|
||||
first images that decides the beam centre, distance and mask (`stills` in `/rugnux/status`).
|
||||
collections, from a DECTRIS detector or converted by the FPGA (JUNGFRAU), are analysed on the GPU
|
||||
after a pre-pass on their first images that decides the beam centre, distance and mask (`stills` in
|
||||
`/rugnux/status`), and merged as they go.
|
||||
properties:
|
||||
enable:
|
||||
type: boolean
|
||||
default: false
|
||||
description: Process DECTRIS rotation collections with rugnux live, and FPGA serial collections on the GPU after a pre-pass
|
||||
description: Process DECTRIS rotation collections with rugnux live, and serial collections on the GPU after a pre-pass
|
||||
reserved_cpus:
|
||||
type: integer
|
||||
format: int64
|
||||
@@ -3070,7 +3071,7 @@ components:
|
||||
rugnux_live_stills:
|
||||
type: object
|
||||
description: |
|
||||
Serial frames converted by the FPGA and analysed on the GPU: the pre-pass on the first images (the beam
|
||||
Serial frames analysed on the GPU: the pre-pass on the first images (the beam
|
||||
centre, distance and mask the whole collection is analysed with), and the analysis since.
|
||||
required:
|
||||
- prepass
|
||||
@@ -3251,7 +3252,7 @@ components:
|
||||
description: From the last image received to all results written
|
||||
verdict:
|
||||
type: string
|
||||
description: OK, WARNINGS, UNUSABLE or FAILED; empty until the run is over
|
||||
description: OK, WARNINGS, UNUSABLE, FAILED or CANCELLED; empty until the run is over
|
||||
verdict_text:
|
||||
type: string
|
||||
summary:
|
||||
|
||||
@@ -30,7 +30,7 @@ Name | Type | Description | Notes
|
||||
**cut** | **str** | Empty, or why the analysis was cut: `deadline` (`deadline_s` after the last image) or `cancel` (`POST /cancel`). The end message then carried what was established at the cut. | [optional]
|
||||
**cut_s** | **float** | When the analysis was cut, since the first image | [optional]
|
||||
**last_image_to_written_s** | **float** | From the last image received to all results written | [optional]
|
||||
**verdict** | **str** | OK, WARNINGS, UNUSABLE or FAILED; empty until the run is over |
|
||||
**verdict** | **str** | OK, WARNINGS, UNUSABLE, FAILED or CANCELLED; empty until the run is over |
|
||||
**verdict_text** | **str** | |
|
||||
**summary** | [**List[RugnuxSummaryRow]**](RugnuxSummaryRow.md) | |
|
||||
**warnings** | **List[str]** | |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# RugnuxLiveStills
|
||||
|
||||
Serial frames converted by the FPGA and analysed on the GPU: the pre-pass on the first images (the beam centre, distance and mask the whole collection is analysed with), and the analysis since.
|
||||
Serial frames analysed on the GPU: the pre-pass on the first images (the beam centre, distance and mask the whole collection is analysed with), and the analysis since.
|
||||
|
||||
## Properties
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# RugnuxSettings
|
||||
|
||||
Rugnux live mode: rotation collections from a DECTRIS detector are processed by rugnux inside the broker while they arrive, and the merged result is sent to the writer. Serial collections converted by the FPGA (JUNGFRAU) are analysed on the GPU after a pre-pass on their first images that decides the beam centre, distance and mask (`stills` in `/rugnux/status`).
|
||||
Rugnux live mode: rotation collections from a DECTRIS detector are processed by rugnux inside the broker while they arrive, and the merged result is sent to the writer. Serial collections, from a DECTRIS detector or converted by the FPGA (JUNGFRAU), are analysed on the GPU after a pre-pass on their first images that decides the beam centre, distance and mask (`stills` in `/rugnux/status`), and merged as they go.
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**enable** | **bool** | Process DECTRIS rotation collections with rugnux live, and FPGA serial collections on the GPU after a pre-pass | [optional] [default to False]
|
||||
**enable** | **bool** | Process DECTRIS rotation collections with rugnux live, and serial collections on the GPU after a pre-pass | [optional] [default to False]
|
||||
**reserved_cpus** | **int** | CPU threads left to the receiver and the image pusher while rugnux runs | [optional] [default to 4]
|
||||
**deadline_s** | **float** | Fixed cutoff: this long after the last image the analysis is cut, and the collection ends with what it has established (as `POST /cancel` after the last image does). 0 means no cutoff. | [optional] [default to 60.0]
|
||||
|
||||
|
||||
@@ -2007,13 +2007,14 @@ export type jfjoch_settings = {
|
||||
/**
|
||||
* Rugnux live mode: rotation collections from a DECTRIS detector are processed by rugnux
|
||||
* inside the broker while they arrive, and the merged result is sent to the writer. Serial
|
||||
* collections converted by the FPGA (JUNGFRAU) are analysed on the GPU after a pre-pass on their
|
||||
* first images that decides the beam centre, distance and mask (`stills` in `/rugnux/status`).
|
||||
* collections, from a DECTRIS detector or converted by the FPGA (JUNGFRAU), are analysed on the GPU
|
||||
* after a pre-pass on their first images that decides the beam centre, distance and mask (`stills` in
|
||||
* `/rugnux/status`), and merged as they go.
|
||||
*
|
||||
*/
|
||||
export type rugnux_settings = {
|
||||
/**
|
||||
* Process DECTRIS rotation collections with rugnux live, and FPGA serial collections on the GPU after a pre-pass
|
||||
* Process DECTRIS rotation collections with rugnux live, and serial collections on the GPU after a pre-pass
|
||||
*/
|
||||
enable?: boolean;
|
||||
/**
|
||||
@@ -2233,7 +2234,7 @@ export type rugnux_live_blob = {
|
||||
};
|
||||
|
||||
/**
|
||||
* Serial frames converted by the FPGA and analysed on the GPU: the pre-pass on the first images (the beam
|
||||
* Serial frames analysed on the GPU: the pre-pass on the first images (the beam
|
||||
* centre, distance and mask the whole collection is analysed with), and the analysis since.
|
||||
*
|
||||
*/
|
||||
@@ -2373,7 +2374,7 @@ export type rugnux_live_status = {
|
||||
*/
|
||||
last_image_to_written_s?: number;
|
||||
/**
|
||||
* OK, WARNINGS, UNUSABLE or FAILED; empty until the run is over
|
||||
* OK, WARNINGS, UNUSABLE, FAILED or CANCELLED; empty until the run is over
|
||||
*/
|
||||
verdict: string;
|
||||
verdict_text: string;
|
||||
|
||||
@@ -846,8 +846,9 @@ export const zBraggIntegrationSettings = z.object({
|
||||
/**
|
||||
* Rugnux live mode: rotation collections from a DECTRIS detector are processed by rugnux
|
||||
* inside the broker while they arrive, and the merged result is sent to the writer. Serial
|
||||
* collections converted by the FPGA (JUNGFRAU) are analysed on the GPU after a pre-pass on their
|
||||
* first images that decides the beam centre, distance and mask (`stills` in `/rugnux/status`).
|
||||
* collections, from a DECTRIS detector or converted by the FPGA (JUNGFRAU), are analysed on the GPU
|
||||
* after a pre-pass on their first images that decides the beam centre, distance and mask (`stills` in
|
||||
* `/rugnux/status`), and merged as they go.
|
||||
*
|
||||
*/
|
||||
export const zRugnuxSettings = z.object({
|
||||
@@ -951,7 +952,7 @@ export const zRugnuxLiveModel = z.object({
|
||||
});
|
||||
|
||||
/**
|
||||
* Serial frames converted by the FPGA and analysed on the GPU: the pre-pass on the first images (the beam
|
||||
* Serial frames analysed on the GPU: the pre-pass on the first images (the beam
|
||||
* centre, distance and mask the whole collection is analysed with), and the analysis since.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -119,13 +119,18 @@ function SummaryTiles({s}: { s: rugnux_live_status }) {
|
||||
function ModelSection({s}: { s: rugnux_live_status }) {
|
||||
const m = s.model!;
|
||||
const mrSeconds = s.steps.find(step => step.title === "Molecular replacement")?.duration_s;
|
||||
// Serial data place the model on each provisional merge while collecting: the viewer reloads when the model
|
||||
// step has a new result, not every time the status is polled.
|
||||
const resultKey = s.stills
|
||||
? `${m.placement} ${m.r_work} ${m.r_free} ${m.refinement?.r_free} ${s.refined_model}`
|
||||
: `${s.elapsed_s}`;
|
||||
return (
|
||||
<Section title={(m.placement === "MR" ? "Molecular replacement" : "Model") + (m.predicted ? " · predicted model" : "")}
|
||||
sx={{animation: `${slideIn} 700ms ease-out`, "@media (prefers-reduced-motion: reduce)": {animation: "none"}}}>
|
||||
<ModelScores m={m} mrSeconds={mrSeconds} anomalousSignal={s.anomalous_signal}/>
|
||||
{s.placed_model && <Box sx={{mt: 2}}>
|
||||
<Suspense fallback={<Typography color="text.secondary">Loading viewer...</Typography>}>
|
||||
<RugnuxStructureViewer resultKey={`${s.elapsed_s}`} anomalous={s.anomalous_map}
|
||||
<RugnuxStructureViewer resultKey={resultKey} anomalous={s.anomalous_map}
|
||||
anomalousSignal={s.anomalous_signal} refined={s.refined_model}
|
||||
blobs={s.refined_model ? m.refinement?.blobs ?? [] : []}/>
|
||||
</Suspense>
|
||||
@@ -166,7 +171,7 @@ function RugnuxPage({measuring}: { measuring: boolean }) {
|
||||
<Section title="Timeline">
|
||||
<RugnuxTimeline s={s} deadline_s={settings?.deadline_s ?? 0}/>
|
||||
</Section>
|
||||
{s.model && s.state !== 'Running' && <ModelSection s={s}/>}
|
||||
{s.model && (s.state !== 'Running' || s.stills) && <ModelSection s={s}/>}
|
||||
<Box sx={{display: "grid", gridTemplateColumns: {xs: "1fr", lg: s.stills ? "1fr" : "minmax(400px, 1fr) 2fr"}, gap: 2,
|
||||
alignItems: "start"}}>
|
||||
<Section title="Processing">
|
||||
|
||||
@@ -11,6 +11,8 @@ export const verdictSeverity = (verdict: string) => {
|
||||
return "success";
|
||||
case "WARNINGS":
|
||||
return "warning";
|
||||
case "CANCELLED":
|
||||
return "info";
|
||||
default:
|
||||
return "error";
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ function RugnuxSettings({measuring}: { measuring: boolean }) {
|
||||
onUpload={() => settings.submit({enable, reserved_cpus: cpus, deadline_s: deadline})}
|
||||
uploadDisabled={measuring || cpusError || deadlineError || settings.pending}
|
||||
snackbar={settings.snackbar}>
|
||||
<FormControlLabel label="Process DECTRIS rotation collections with rugnux"
|
||||
<FormControlLabel label="Process collections with rugnux live"
|
||||
control={<Switch checked={enable} disabled={measuring}
|
||||
onChange={e => setEnable(e.target.checked)}/>}/>
|
||||
<NumberTextField label="Reserved CPU threads" start_val={cpus} min={0} max={512}
|
||||
|
||||
@@ -2,7 +2,7 @@ import {Box, Chip, LinearProgress, Stack, Table, TableBody, TableCell, TableHead
|
||||
import {grey, indigo} from "@mui/material/colors";
|
||||
import {rugnux_live_stills} from "../client";
|
||||
|
||||
// Serial frames converted by the FPGA and analysed on the GPU: the pre-pass on the first images - the beam
|
||||
// Serial frames analysed on the GPU: the pre-pass on the first images - the beam
|
||||
// centre, distance and mask the whole collection is analysed with - and the analysis since.
|
||||
|
||||
const PREPASS_COLOUR = {Holding: "default", Running: "primary", Done: "success", Failed: "error"} as const;
|
||||
|
||||
Reference in new issue
Block a user