diff --git a/broker/OpenAPIConvert.cpp b/broker/OpenAPIConvert.cpp index 992b031b4..07a92ed97 100644 --- a/broker/OpenAPIConvert.cpp +++ b/broker/OpenAPIConvert.cpp @@ -1449,6 +1449,8 @@ org::openapitools::server::model::Rugnux_live_status Convert(const RugnuxLiveSna blob.setNearestAtom(b.nearest_atom); if (b.nearest_atom_distance_A) blob.setNearestAtomDistanceA(*b.nearest_atom_distance_A); + if (b.anomalous_sigma) + blob.setAnomalousSigma(*b.anomalous_sigma); blobs.push_back(blob); } refinement.setBlobs(blobs); diff --git a/broker/gen/model/Rugnux_live_blob.cpp b/broker/gen/model/Rugnux_live_blob.cpp index 187896f0b..984f1ee11 100644 --- a/broker/gen/model/Rugnux_live_blob.cpp +++ b/broker/gen/model/Rugnux_live_blob.cpp @@ -30,6 +30,8 @@ Rugnux_live_blob::Rugnux_live_blob() m_Nearest_atom = ""; m_Nearest_atom_distance_A = 0.0; m_Nearest_atom_distance_AIsSet = false; + m_Anomalous_sigma = 0.0; + m_Anomalous_sigmaIsSet = false; } @@ -52,7 +54,7 @@ bool Rugnux_live_blob::validate(std::stringstream& msg, const std::string& pathP bool success = true; const std::string _pathPrefix = pathPrefix.empty() ? "Rugnux_live_blob" : pathPrefix; - + return success; } @@ -83,7 +85,10 @@ bool Rugnux_live_blob::operator==(const Rugnux_live_blob& rhs) const && - ((!nearestAtomDistanceAIsSet() && !rhs.nearestAtomDistanceAIsSet()) || (nearestAtomDistanceAIsSet() && rhs.nearestAtomDistanceAIsSet() && getNearestAtomDistanceA() == rhs.getNearestAtomDistanceA())) + ((!nearestAtomDistanceAIsSet() && !rhs.nearestAtomDistanceAIsSet()) || (nearestAtomDistanceAIsSet() && rhs.nearestAtomDistanceAIsSet() && getNearestAtomDistanceA() == rhs.getNearestAtomDistanceA())) && + + + ((!anomalousSigmaIsSet() && !rhs.anomalousSigmaIsSet()) || (anomalousSigmaIsSet() && rhs.anomalousSigmaIsSet() && getAnomalousSigma() == rhs.getAnomalousSigma())) ; } @@ -105,6 +110,8 @@ void to_json(nlohmann::json& j, const Rugnux_live_blob& o) j["nearest_atom"] = o.m_Nearest_atom; if(o.nearestAtomDistanceAIsSet()) j["nearest_atom_distance_A"] = o.m_Nearest_atom_distance_A; + if(o.anomalousSigmaIsSet()) + j["anomalous_sigma"] = o.m_Anomalous_sigma; } @@ -122,6 +129,11 @@ void from_json(const nlohmann::json& j, Rugnux_live_blob& o) j.at("nearest_atom_distance_A").get_to(o.m_Nearest_atom_distance_A); o.m_Nearest_atom_distance_AIsSet = true; } + if(j.find("anomalous_sigma") != j.end()) + { + j.at("anomalous_sigma").get_to(o.m_Anomalous_sigma); + o.m_Anomalous_sigmaIsSet = true; + } } @@ -198,6 +210,23 @@ void Rugnux_live_blob::unsetNearest_atom_distance_A() { m_Nearest_atom_distance_AIsSet = false; } +double Rugnux_live_blob::getAnomalousSigma() const +{ + return m_Anomalous_sigma; +} +void Rugnux_live_blob::setAnomalousSigma(double const value) +{ + m_Anomalous_sigma = value; + m_Anomalous_sigmaIsSet = true; +} +bool Rugnux_live_blob::anomalousSigmaIsSet() const +{ + return m_Anomalous_sigmaIsSet; +} +void Rugnux_live_blob::unsetAnomalous_sigma() +{ + m_Anomalous_sigmaIsSet = false; +} } // namespace org::openapitools::server::model diff --git a/broker/gen/model/Rugnux_live_blob.h b/broker/gen/model/Rugnux_live_blob.h index a56f3c977..142f860a2 100644 --- a/broker/gen/model/Rugnux_live_blob.h +++ b/broker/gen/model/Rugnux_live_blob.h @@ -100,6 +100,13 @@ public: void setNearestAtomDistanceA(double const value); bool nearestAtomDistanceAIsSet() const; void unsetNearest_atom_distance_A(); + /// + /// The anomalous difference map's peak height within 1 Angstrom of the blob's peak, in the map's sigma. Absent where there is no anomalous map (`anomalous_map`); a measure of the blob only where the data carry anomalous signal (`anomalous_signal`), noise otherwise. + /// + double getAnomalousSigma() const; + void setAnomalousSigma(double const value); + bool anomalousSigmaIsSet() const; + void unsetAnomalous_sigma(); friend void to_json(nlohmann::json& j, const Rugnux_live_blob& o); friend void from_json(const nlohmann::json& j, Rugnux_live_blob& o); @@ -120,6 +127,8 @@ protected: double m_Nearest_atom_distance_A; bool m_Nearest_atom_distance_AIsSet; + double m_Anomalous_sigma; + bool m_Anomalous_sigmaIsSet; }; diff --git a/broker/jfjoch_api.yaml b/broker/jfjoch_api.yaml index 36dfec97a..21a60d85f 100644 --- a/broker/jfjoch_api.yaml +++ b/broker/jfjoch_api.yaml @@ -3130,6 +3130,13 @@ components: type: number format: double description: Absent where no atom is within 12 Angstrom + anomalous_sigma: + type: number + format: double + description: | + The anomalous difference map's peak height within 1 Angstrom of the blob's peak, in the map's sigma. + Absent where there is no anomalous map (`anomalous_map`); a measure of the blob only where the data + carry anomalous signal (`anomalous_signal`), noise otherwise. rugnux_live_stills: type: object description: | diff --git a/broker/redoc-static.html b/broker/redoc-static.html index 71a30dce6..212c3cb81 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,
  • "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 - +

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