api: name the calibration schemas powder_, not calibration_
"Calibration" already means something else in this broker: the JUNGFRAU pedestal and gain measurement, which owns /statistics/calibration, calibration_statistics and JFJochState::Calibration. Four schemas called calibration_* would have sat beside it meaning a completely different procedure, and the confusion is cheapest to remove now, before an endpoint returns them. calibration_output, calibration_quality, calibration_fit_sigma and calibration_spot_check become powder_calibration_output, powder_calibration_quality, powder_calibration_fit_sigma and powder_calibration_spot_check. All four, not only the outer one - the collision is in the word, and half a rename would read as though the inner three belonged to the other kind of calibration. Rename only. Every client regenerated from the spec: the C++ server model, the TypeScript frontend client, redoc-static.html, and the python client, which is gitignored but was checked to still decode the file rugnux writes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NfuDvf5ipV3Hi8TiCUKD27
This commit is contained in:
+38
-38
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "Calibration_fit_sigma.h"
|
||||
#include "Powder_calibration_fit_sigma.h"
|
||||
#include "Helpers.h"
|
||||
|
||||
#include <sstream>
|
||||
@@ -19,7 +19,7 @@
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
Calibration_fit_sigma::Calibration_fit_sigma()
|
||||
Powder_calibration_fit_sigma::Powder_calibration_fit_sigma()
|
||||
{
|
||||
m_Beam_x_pxl = 0.0f;
|
||||
m_Beam_x_pxlIsSet = false;
|
||||
@@ -38,7 +38,7 @@ Calibration_fit_sigma::Calibration_fit_sigma()
|
||||
|
||||
}
|
||||
|
||||
void Calibration_fit_sigma::validate() const
|
||||
void Powder_calibration_fit_sigma::validate() const
|
||||
{
|
||||
std::stringstream msg;
|
||||
if (!validate(msg))
|
||||
@@ -47,21 +47,21 @@ void Calibration_fit_sigma::validate() const
|
||||
}
|
||||
}
|
||||
|
||||
bool Calibration_fit_sigma::validate(std::stringstream& msg) const
|
||||
bool Powder_calibration_fit_sigma::validate(std::stringstream& msg) const
|
||||
{
|
||||
return validate(msg, "");
|
||||
}
|
||||
|
||||
bool Calibration_fit_sigma::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
||||
bool Powder_calibration_fit_sigma::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
||||
{
|
||||
bool success = true;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Calibration_fit_sigma" : pathPrefix;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Powder_calibration_fit_sigma" : pathPrefix;
|
||||
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
bool Calibration_fit_sigma::operator==(const Calibration_fit_sigma& rhs) const
|
||||
bool Powder_calibration_fit_sigma::operator==(const Powder_calibration_fit_sigma& rhs) const
|
||||
{
|
||||
return
|
||||
|
||||
@@ -90,12 +90,12 @@ bool Calibration_fit_sigma::operator==(const Calibration_fit_sigma& rhs) const
|
||||
;
|
||||
}
|
||||
|
||||
bool Calibration_fit_sigma::operator!=(const Calibration_fit_sigma& rhs) const
|
||||
bool Powder_calibration_fit_sigma::operator!=(const Powder_calibration_fit_sigma& rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
void to_json(nlohmann::json& j, const Calibration_fit_sigma& o)
|
||||
void to_json(nlohmann::json& j, const Powder_calibration_fit_sigma& o)
|
||||
{
|
||||
j = nlohmann::json::object();
|
||||
if(o.beamXPxlIsSet())
|
||||
@@ -115,7 +115,7 @@ void to_json(nlohmann::json& j, const Calibration_fit_sigma& o)
|
||||
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json& j, Calibration_fit_sigma& o)
|
||||
void from_json(const nlohmann::json& j, Powder_calibration_fit_sigma& o)
|
||||
{
|
||||
if(j.find("beam_x_pxl") != j.end())
|
||||
{
|
||||
@@ -155,122 +155,122 @@ void from_json(const nlohmann::json& j, Calibration_fit_sigma& o)
|
||||
|
||||
}
|
||||
|
||||
float Calibration_fit_sigma::getBeamXPxl() const
|
||||
float Powder_calibration_fit_sigma::getBeamXPxl() const
|
||||
{
|
||||
return m_Beam_x_pxl;
|
||||
}
|
||||
void Calibration_fit_sigma::setBeamXPxl(float const value)
|
||||
void Powder_calibration_fit_sigma::setBeamXPxl(float const value)
|
||||
{
|
||||
m_Beam_x_pxl = value;
|
||||
m_Beam_x_pxlIsSet = true;
|
||||
}
|
||||
bool Calibration_fit_sigma::beamXPxlIsSet() const
|
||||
bool Powder_calibration_fit_sigma::beamXPxlIsSet() const
|
||||
{
|
||||
return m_Beam_x_pxlIsSet;
|
||||
}
|
||||
void Calibration_fit_sigma::unsetBeam_x_pxl()
|
||||
void Powder_calibration_fit_sigma::unsetBeam_x_pxl()
|
||||
{
|
||||
m_Beam_x_pxlIsSet = false;
|
||||
}
|
||||
float Calibration_fit_sigma::getBeamYPxl() const
|
||||
float Powder_calibration_fit_sigma::getBeamYPxl() const
|
||||
{
|
||||
return m_Beam_y_pxl;
|
||||
}
|
||||
void Calibration_fit_sigma::setBeamYPxl(float const value)
|
||||
void Powder_calibration_fit_sigma::setBeamYPxl(float const value)
|
||||
{
|
||||
m_Beam_y_pxl = value;
|
||||
m_Beam_y_pxlIsSet = true;
|
||||
}
|
||||
bool Calibration_fit_sigma::beamYPxlIsSet() const
|
||||
bool Powder_calibration_fit_sigma::beamYPxlIsSet() const
|
||||
{
|
||||
return m_Beam_y_pxlIsSet;
|
||||
}
|
||||
void Calibration_fit_sigma::unsetBeam_y_pxl()
|
||||
void Powder_calibration_fit_sigma::unsetBeam_y_pxl()
|
||||
{
|
||||
m_Beam_y_pxlIsSet = false;
|
||||
}
|
||||
float Calibration_fit_sigma::getDetectorDistanceMm() const
|
||||
float Powder_calibration_fit_sigma::getDetectorDistanceMm() const
|
||||
{
|
||||
return m_Detector_distance_mm;
|
||||
}
|
||||
void Calibration_fit_sigma::setDetectorDistanceMm(float const value)
|
||||
void Powder_calibration_fit_sigma::setDetectorDistanceMm(float const value)
|
||||
{
|
||||
m_Detector_distance_mm = value;
|
||||
m_Detector_distance_mmIsSet = true;
|
||||
}
|
||||
bool Calibration_fit_sigma::detectorDistanceMmIsSet() const
|
||||
bool Powder_calibration_fit_sigma::detectorDistanceMmIsSet() const
|
||||
{
|
||||
return m_Detector_distance_mmIsSet;
|
||||
}
|
||||
void Calibration_fit_sigma::unsetDetector_distance_mm()
|
||||
void Powder_calibration_fit_sigma::unsetDetector_distance_mm()
|
||||
{
|
||||
m_Detector_distance_mmIsSet = false;
|
||||
}
|
||||
float Calibration_fit_sigma::getPoniRot1Rad() const
|
||||
float Powder_calibration_fit_sigma::getPoniRot1Rad() const
|
||||
{
|
||||
return m_Poni_rot1_rad;
|
||||
}
|
||||
void Calibration_fit_sigma::setPoniRot1Rad(float const value)
|
||||
void Powder_calibration_fit_sigma::setPoniRot1Rad(float const value)
|
||||
{
|
||||
m_Poni_rot1_rad = value;
|
||||
m_Poni_rot1_radIsSet = true;
|
||||
}
|
||||
bool Calibration_fit_sigma::poniRot1RadIsSet() const
|
||||
bool Powder_calibration_fit_sigma::poniRot1RadIsSet() const
|
||||
{
|
||||
return m_Poni_rot1_radIsSet;
|
||||
}
|
||||
void Calibration_fit_sigma::unsetPoni_rot1_rad()
|
||||
void Powder_calibration_fit_sigma::unsetPoni_rot1_rad()
|
||||
{
|
||||
m_Poni_rot1_radIsSet = false;
|
||||
}
|
||||
float Calibration_fit_sigma::getPoniRot2Rad() const
|
||||
float Powder_calibration_fit_sigma::getPoniRot2Rad() const
|
||||
{
|
||||
return m_Poni_rot2_rad;
|
||||
}
|
||||
void Calibration_fit_sigma::setPoniRot2Rad(float const value)
|
||||
void Powder_calibration_fit_sigma::setPoniRot2Rad(float const value)
|
||||
{
|
||||
m_Poni_rot2_rad = value;
|
||||
m_Poni_rot2_radIsSet = true;
|
||||
}
|
||||
bool Calibration_fit_sigma::poniRot2RadIsSet() const
|
||||
bool Powder_calibration_fit_sigma::poniRot2RadIsSet() const
|
||||
{
|
||||
return m_Poni_rot2_radIsSet;
|
||||
}
|
||||
void Calibration_fit_sigma::unsetPoni_rot2_rad()
|
||||
void Powder_calibration_fit_sigma::unsetPoni_rot2_rad()
|
||||
{
|
||||
m_Poni_rot2_radIsSet = false;
|
||||
}
|
||||
float Calibration_fit_sigma::getCorrelationBeamXRot1() const
|
||||
float Powder_calibration_fit_sigma::getCorrelationBeamXRot1() const
|
||||
{
|
||||
return m_Correlation_beam_x_rot1;
|
||||
}
|
||||
void Calibration_fit_sigma::setCorrelationBeamXRot1(float const value)
|
||||
void Powder_calibration_fit_sigma::setCorrelationBeamXRot1(float const value)
|
||||
{
|
||||
m_Correlation_beam_x_rot1 = value;
|
||||
m_Correlation_beam_x_rot1IsSet = true;
|
||||
}
|
||||
bool Calibration_fit_sigma::correlationBeamXRot1IsSet() const
|
||||
bool Powder_calibration_fit_sigma::correlationBeamXRot1IsSet() const
|
||||
{
|
||||
return m_Correlation_beam_x_rot1IsSet;
|
||||
}
|
||||
void Calibration_fit_sigma::unsetCorrelation_beam_x_rot1()
|
||||
void Powder_calibration_fit_sigma::unsetCorrelation_beam_x_rot1()
|
||||
{
|
||||
m_Correlation_beam_x_rot1IsSet = false;
|
||||
}
|
||||
float Calibration_fit_sigma::getCorrelationBeamYRot2() const
|
||||
float Powder_calibration_fit_sigma::getCorrelationBeamYRot2() const
|
||||
{
|
||||
return m_Correlation_beam_y_rot2;
|
||||
}
|
||||
void Calibration_fit_sigma::setCorrelationBeamYRot2(float const value)
|
||||
void Powder_calibration_fit_sigma::setCorrelationBeamYRot2(float const value)
|
||||
{
|
||||
m_Correlation_beam_y_rot2 = value;
|
||||
m_Correlation_beam_y_rot2IsSet = true;
|
||||
}
|
||||
bool Calibration_fit_sigma::correlationBeamYRot2IsSet() const
|
||||
bool Powder_calibration_fit_sigma::correlationBeamYRot2IsSet() const
|
||||
{
|
||||
return m_Correlation_beam_y_rot2IsSet;
|
||||
}
|
||||
void Calibration_fit_sigma::unsetCorrelation_beam_y_rot2()
|
||||
void Powder_calibration_fit_sigma::unsetCorrelation_beam_y_rot2()
|
||||
{
|
||||
m_Correlation_beam_y_rot2IsSet = false;
|
||||
}
|
||||
+12
-12
@@ -10,13 +10,13 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
/*
|
||||
* Calibration_fit_sigma.h
|
||||
* Powder_calibration_fit_sigma.h
|
||||
*
|
||||
* What the powder ring fit knows about its own answer, from the covariance of the converged problem. Each sigma is in its parameter's own unit and is scaled by the residual scatter of that fit, so it is the usual \"how far could this move before the fit got visibly worse\". The two correlations are the ones that matter: a tilt and a beam-centre shift both displace a ring's radius as cos(phi) and are told apart only by how that amplitude grows with the ring's radius, so as the rings run out the pair stops being separable and these approach 1. The rotation sigmas and the correlations are absent when the tilt was not a free parameter.
|
||||
*/
|
||||
|
||||
#ifndef Calibration_fit_sigma_H_
|
||||
#define Calibration_fit_sigma_H_
|
||||
#ifndef Powder_calibration_fit_sigma_H_
|
||||
#define Powder_calibration_fit_sigma_H_
|
||||
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
@@ -27,11 +27,11 @@ namespace org::openapitools::server::model
|
||||
/// <summary>
|
||||
/// What the powder ring fit knows about its own answer, from the covariance of the converged problem. Each sigma is in its parameter's own unit and is scaled by the residual scatter of that fit, so it is the usual \"how far could this move before the fit got visibly worse\". The two correlations are the ones that matter: a tilt and a beam-centre shift both displace a ring's radius as cos(phi) and are told apart only by how that amplitude grows with the ring's radius, so as the rings run out the pair stops being separable and these approach 1. The rotation sigmas and the correlations are absent when the tilt was not a free parameter.
|
||||
/// </summary>
|
||||
class Calibration_fit_sigma
|
||||
class Powder_calibration_fit_sigma
|
||||
{
|
||||
public:
|
||||
Calibration_fit_sigma();
|
||||
virtual ~Calibration_fit_sigma() = default;
|
||||
Powder_calibration_fit_sigma();
|
||||
virtual ~Powder_calibration_fit_sigma() = default;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -51,11 +51,11 @@ public:
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
|
||||
|
||||
bool operator==(const Calibration_fit_sigma& rhs) const;
|
||||
bool operator!=(const Calibration_fit_sigma& rhs) const;
|
||||
bool operator==(const Powder_calibration_fit_sigma& rhs) const;
|
||||
bool operator!=(const Powder_calibration_fit_sigma& rhs) const;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Calibration_fit_sigma members
|
||||
/// Powder_calibration_fit_sigma members
|
||||
|
||||
/// <summary>
|
||||
/// Standard error of the fitted PONI x [pixels]
|
||||
@@ -107,8 +107,8 @@ public:
|
||||
bool correlationBeamYRot2IsSet() const;
|
||||
void unsetCorrelation_beam_y_rot2();
|
||||
|
||||
friend void to_json(nlohmann::json& j, const Calibration_fit_sigma& o);
|
||||
friend void from_json(const nlohmann::json& j, Calibration_fit_sigma& o);
|
||||
friend void to_json(nlohmann::json& j, const Powder_calibration_fit_sigma& o);
|
||||
friend void from_json(const nlohmann::json& j, Powder_calibration_fit_sigma& o);
|
||||
protected:
|
||||
float m_Beam_x_pxl;
|
||||
bool m_Beam_x_pxlIsSet;
|
||||
@@ -129,4 +129,4 @@ protected:
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
#endif /* Calibration_fit_sigma_H_ */
|
||||
#endif /* Powder_calibration_fit_sigma_H_ */
|
||||
+20
-20
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "Calibration_output.h"
|
||||
#include "Powder_calibration_output.h"
|
||||
#include "Helpers.h"
|
||||
|
||||
#include <sstream>
|
||||
@@ -19,7 +19,7 @@
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
Calibration_output::Calibration_output()
|
||||
Powder_calibration_output::Powder_calibration_output()
|
||||
{
|
||||
m_CalibrationIsSet = false;
|
||||
m_Jfjoch_version = "";
|
||||
@@ -27,7 +27,7 @@ Calibration_output::Calibration_output()
|
||||
|
||||
}
|
||||
|
||||
void Calibration_output::validate() const
|
||||
void Powder_calibration_output::validate() const
|
||||
{
|
||||
std::stringstream msg;
|
||||
if (!validate(msg))
|
||||
@@ -36,15 +36,15 @@ void Calibration_output::validate() const
|
||||
}
|
||||
}
|
||||
|
||||
bool Calibration_output::validate(std::stringstream& msg) const
|
||||
bool Powder_calibration_output::validate(std::stringstream& msg) const
|
||||
{
|
||||
return validate(msg, "");
|
||||
}
|
||||
|
||||
bool Calibration_output::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
||||
bool Powder_calibration_output::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
||||
{
|
||||
bool success = true;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Calibration_output" : pathPrefix;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Powder_calibration_output" : pathPrefix;
|
||||
|
||||
|
||||
if (!m_Dataset_settings.validate(msg, _pathPrefix + ".datasetSettings")) {
|
||||
@@ -54,7 +54,7 @@ bool Calibration_output::validate(std::stringstream& msg, const std::string& pat
|
||||
return success;
|
||||
}
|
||||
|
||||
bool Calibration_output::operator==(const Calibration_output& rhs) const
|
||||
bool Powder_calibration_output::operator==(const Powder_calibration_output& rhs) const
|
||||
{
|
||||
return
|
||||
|
||||
@@ -71,12 +71,12 @@ bool Calibration_output::operator==(const Calibration_output& rhs) const
|
||||
;
|
||||
}
|
||||
|
||||
bool Calibration_output::operator!=(const Calibration_output& rhs) const
|
||||
bool Powder_calibration_output::operator!=(const Powder_calibration_output& rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
void to_json(nlohmann::json& j, const Calibration_output& o)
|
||||
void to_json(nlohmann::json& j, const Powder_calibration_output& o)
|
||||
{
|
||||
j = nlohmann::json::object();
|
||||
j["dataset_settings"] = o.m_Dataset_settings;
|
||||
@@ -87,7 +87,7 @@ void to_json(nlohmann::json& j, const Calibration_output& o)
|
||||
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json& j, Calibration_output& o)
|
||||
void from_json(const nlohmann::json& j, Powder_calibration_output& o)
|
||||
{
|
||||
j.at("dataset_settings").get_to(o.m_Dataset_settings);
|
||||
if(j.find("calibration") != j.end())
|
||||
@@ -103,45 +103,45 @@ void from_json(const nlohmann::json& j, Calibration_output& o)
|
||||
|
||||
}
|
||||
|
||||
org::openapitools::server::model::Dataset_settings Calibration_output::getDatasetSettings() const
|
||||
org::openapitools::server::model::Dataset_settings Powder_calibration_output::getDatasetSettings() const
|
||||
{
|
||||
return m_Dataset_settings;
|
||||
}
|
||||
void Calibration_output::setDatasetSettings(org::openapitools::server::model::Dataset_settings const& value)
|
||||
void Powder_calibration_output::setDatasetSettings(org::openapitools::server::model::Dataset_settings const& value)
|
||||
{
|
||||
m_Dataset_settings = value;
|
||||
}
|
||||
org::openapitools::server::model::Calibration_quality Calibration_output::getCalibration() const
|
||||
org::openapitools::server::model::Powder_calibration_quality Powder_calibration_output::getCalibration() const
|
||||
{
|
||||
return m_Calibration;
|
||||
}
|
||||
void Calibration_output::setCalibration(org::openapitools::server::model::Calibration_quality const& value)
|
||||
void Powder_calibration_output::setCalibration(org::openapitools::server::model::Powder_calibration_quality const& value)
|
||||
{
|
||||
m_Calibration = value;
|
||||
m_CalibrationIsSet = true;
|
||||
}
|
||||
bool Calibration_output::calibrationIsSet() const
|
||||
bool Powder_calibration_output::calibrationIsSet() const
|
||||
{
|
||||
return m_CalibrationIsSet;
|
||||
}
|
||||
void Calibration_output::unsetCalibration()
|
||||
void Powder_calibration_output::unsetCalibration()
|
||||
{
|
||||
m_CalibrationIsSet = false;
|
||||
}
|
||||
std::string Calibration_output::getJfjochVersion() const
|
||||
std::string Powder_calibration_output::getJfjochVersion() const
|
||||
{
|
||||
return m_Jfjoch_version;
|
||||
}
|
||||
void Calibration_output::setJfjochVersion(std::string const& value)
|
||||
void Powder_calibration_output::setJfjochVersion(std::string const& value)
|
||||
{
|
||||
m_Jfjoch_version = value;
|
||||
m_Jfjoch_versionIsSet = true;
|
||||
}
|
||||
bool Calibration_output::jfjochVersionIsSet() const
|
||||
bool Powder_calibration_output::jfjochVersionIsSet() const
|
||||
{
|
||||
return m_Jfjoch_versionIsSet;
|
||||
}
|
||||
void Calibration_output::unsetJfjoch_version()
|
||||
void Powder_calibration_output::unsetJfjoch_version()
|
||||
{
|
||||
m_Jfjoch_versionIsSet = false;
|
||||
}
|
||||
+16
-16
@@ -10,17 +10,17 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
/*
|
||||
* Calibration_output.h
|
||||
* Powder_calibration_output.h
|
||||
*
|
||||
* The result of a powder-ring detector calibration - what rugnux --mode calibration writes as <prefix>.json, and what a calibration run over the image buffer would return. dataset_settings holds the geometry and nothing else, under the property names this API gives them, so it can be POSTed or merged without translating a field. Its beam_x_pxl/beam_y_pxl is the PONI, the foot of the perpendicular from the sample; where the beam actually lands is calibration.direct_beam_x_pxl. The poni_rot*_rad are present whenever any of them is non-zero and absent when all are zero, since a body omitting them states a FLAT detector rather than an unstated one.
|
||||
*/
|
||||
|
||||
#ifndef Calibration_output_H_
|
||||
#define Calibration_output_H_
|
||||
#ifndef Powder_calibration_output_H_
|
||||
#define Powder_calibration_output_H_
|
||||
|
||||
|
||||
#include "Dataset_settings.h"
|
||||
#include "Calibration_quality.h"
|
||||
#include "Powder_calibration_quality.h"
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
@@ -30,11 +30,11 @@ namespace org::openapitools::server::model
|
||||
/// <summary>
|
||||
/// The result of a powder-ring detector calibration - what rugnux --mode calibration writes as <prefix>.json, and what a calibration run over the image buffer would return. dataset_settings holds the geometry and nothing else, under the property names this API gives them, so it can be POSTed or merged without translating a field. Its beam_x_pxl/beam_y_pxl is the PONI, the foot of the perpendicular from the sample; where the beam actually lands is calibration.direct_beam_x_pxl. The poni_rot*_rad are present whenever any of them is non-zero and absent when all are zero, since a body omitting them states a FLAT detector rather than an unstated one.
|
||||
/// </summary>
|
||||
class Calibration_output
|
||||
class Powder_calibration_output
|
||||
{
|
||||
public:
|
||||
Calibration_output();
|
||||
virtual ~Calibration_output() = default;
|
||||
Powder_calibration_output();
|
||||
virtual ~Powder_calibration_output() = default;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -54,11 +54,11 @@ public:
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
|
||||
|
||||
bool operator==(const Calibration_output& rhs) const;
|
||||
bool operator!=(const Calibration_output& rhs) const;
|
||||
bool operator==(const Powder_calibration_output& rhs) const;
|
||||
bool operator!=(const Powder_calibration_output& rhs) const;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Calibration_output members
|
||||
/// Powder_calibration_output members
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -68,8 +68,8 @@ public:
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
org::openapitools::server::model::Calibration_quality getCalibration() const;
|
||||
void setCalibration(org::openapitools::server::model::Calibration_quality const& value);
|
||||
org::openapitools::server::model::Powder_calibration_quality getCalibration() const;
|
||||
void setCalibration(org::openapitools::server::model::Powder_calibration_quality const& value);
|
||||
bool calibrationIsSet() const;
|
||||
void unsetCalibration();
|
||||
/// <summary>
|
||||
@@ -80,12 +80,12 @@ public:
|
||||
bool jfjochVersionIsSet() const;
|
||||
void unsetJfjoch_version();
|
||||
|
||||
friend void to_json(nlohmann::json& j, const Calibration_output& o);
|
||||
friend void from_json(const nlohmann::json& j, Calibration_output& o);
|
||||
friend void to_json(nlohmann::json& j, const Powder_calibration_output& o);
|
||||
friend void from_json(const nlohmann::json& j, Powder_calibration_output& o);
|
||||
protected:
|
||||
org::openapitools::server::model::Dataset_settings m_Dataset_settings;
|
||||
|
||||
org::openapitools::server::model::Calibration_quality m_Calibration;
|
||||
org::openapitools::server::model::Powder_calibration_quality m_Calibration;
|
||||
bool m_CalibrationIsSet;
|
||||
std::string m_Jfjoch_version;
|
||||
bool m_Jfjoch_versionIsSet;
|
||||
@@ -94,4 +94,4 @@ protected:
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
#endif /* Calibration_output_H_ */
|
||||
#endif /* Powder_calibration_output_H_ */
|
||||
+62
-62
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "Calibration_quality.h"
|
||||
#include "Powder_calibration_quality.h"
|
||||
#include "Helpers.h"
|
||||
|
||||
#include <sstream>
|
||||
@@ -19,7 +19,7 @@
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
Calibration_quality::Calibration_quality()
|
||||
Powder_calibration_quality::Powder_calibration_quality()
|
||||
{
|
||||
m_Calibrant = "";
|
||||
m_CalibrantIsSet = false;
|
||||
@@ -48,7 +48,7 @@ Calibration_quality::Calibration_quality()
|
||||
|
||||
}
|
||||
|
||||
void Calibration_quality::validate() const
|
||||
void Powder_calibration_quality::validate() const
|
||||
{
|
||||
std::stringstream msg;
|
||||
if (!validate(msg))
|
||||
@@ -57,21 +57,21 @@ void Calibration_quality::validate() const
|
||||
}
|
||||
}
|
||||
|
||||
bool Calibration_quality::validate(std::stringstream& msg) const
|
||||
bool Powder_calibration_quality::validate(std::stringstream& msg) const
|
||||
{
|
||||
return validate(msg, "");
|
||||
}
|
||||
|
||||
bool Calibration_quality::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
||||
bool Powder_calibration_quality::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
||||
{
|
||||
bool success = true;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Calibration_quality" : pathPrefix;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Powder_calibration_quality" : pathPrefix;
|
||||
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
bool Calibration_quality::operator==(const Calibration_quality& rhs) const
|
||||
bool Powder_calibration_quality::operator==(const Powder_calibration_quality& rhs) const
|
||||
{
|
||||
return
|
||||
|
||||
@@ -118,12 +118,12 @@ bool Calibration_quality::operator==(const Calibration_quality& rhs) const
|
||||
;
|
||||
}
|
||||
|
||||
bool Calibration_quality::operator!=(const Calibration_quality& rhs) const
|
||||
bool Powder_calibration_quality::operator!=(const Powder_calibration_quality& rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
void to_json(nlohmann::json& j, const Calibration_quality& o)
|
||||
void to_json(nlohmann::json& j, const Powder_calibration_quality& o)
|
||||
{
|
||||
j = nlohmann::json::object();
|
||||
if(o.calibrantIsSet())
|
||||
@@ -155,7 +155,7 @@ void to_json(nlohmann::json& j, const Calibration_quality& o)
|
||||
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json& j, Calibration_quality& o)
|
||||
void from_json(const nlohmann::json& j, Powder_calibration_quality& o)
|
||||
{
|
||||
if(j.find("calibrant") != j.end())
|
||||
{
|
||||
@@ -225,224 +225,224 @@ void from_json(const nlohmann::json& j, Calibration_quality& o)
|
||||
|
||||
}
|
||||
|
||||
std::string Calibration_quality::getCalibrant() const
|
||||
std::string Powder_calibration_quality::getCalibrant() const
|
||||
{
|
||||
return m_Calibrant;
|
||||
}
|
||||
void Calibration_quality::setCalibrant(std::string const& value)
|
||||
void Powder_calibration_quality::setCalibrant(std::string const& value)
|
||||
{
|
||||
m_Calibrant = value;
|
||||
m_CalibrantIsSet = true;
|
||||
}
|
||||
bool Calibration_quality::calibrantIsSet() const
|
||||
bool Powder_calibration_quality::calibrantIsSet() const
|
||||
{
|
||||
return m_CalibrantIsSet;
|
||||
}
|
||||
void Calibration_quality::unsetCalibrant()
|
||||
void Powder_calibration_quality::unsetCalibrant()
|
||||
{
|
||||
m_CalibrantIsSet = false;
|
||||
}
|
||||
std::string Calibration_quality::getMethod() const
|
||||
std::string Powder_calibration_quality::getMethod() const
|
||||
{
|
||||
return m_Method;
|
||||
}
|
||||
void Calibration_quality::setMethod(std::string const& value)
|
||||
void Powder_calibration_quality::setMethod(std::string const& value)
|
||||
{
|
||||
m_Method = value;
|
||||
m_MethodIsSet = true;
|
||||
}
|
||||
bool Calibration_quality::methodIsSet() const
|
||||
bool Powder_calibration_quality::methodIsSet() const
|
||||
{
|
||||
return m_MethodIsSet;
|
||||
}
|
||||
void Calibration_quality::unsetMethod()
|
||||
void Powder_calibration_quality::unsetMethod()
|
||||
{
|
||||
m_MethodIsSet = false;
|
||||
}
|
||||
int64_t Calibration_quality::getRingPoints() const
|
||||
int64_t Powder_calibration_quality::getRingPoints() const
|
||||
{
|
||||
return m_Ring_points;
|
||||
}
|
||||
void Calibration_quality::setRingPoints(int64_t const value)
|
||||
void Powder_calibration_quality::setRingPoints(int64_t const value)
|
||||
{
|
||||
m_Ring_points = value;
|
||||
m_Ring_pointsIsSet = true;
|
||||
}
|
||||
bool Calibration_quality::ringPointsIsSet() const
|
||||
bool Powder_calibration_quality::ringPointsIsSet() const
|
||||
{
|
||||
return m_Ring_pointsIsSet;
|
||||
}
|
||||
void Calibration_quality::unsetRing_points()
|
||||
void Powder_calibration_quality::unsetRing_points()
|
||||
{
|
||||
m_Ring_pointsIsSet = false;
|
||||
}
|
||||
float Calibration_quality::getRmsRadialPxl() const
|
||||
float Powder_calibration_quality::getRmsRadialPxl() const
|
||||
{
|
||||
return m_Rms_radial_pxl;
|
||||
}
|
||||
void Calibration_quality::setRmsRadialPxl(float const value)
|
||||
void Powder_calibration_quality::setRmsRadialPxl(float const value)
|
||||
{
|
||||
m_Rms_radial_pxl = value;
|
||||
m_Rms_radial_pxlIsSet = true;
|
||||
}
|
||||
bool Calibration_quality::rmsRadialPxlIsSet() const
|
||||
bool Powder_calibration_quality::rmsRadialPxlIsSet() const
|
||||
{
|
||||
return m_Rms_radial_pxlIsSet;
|
||||
}
|
||||
void Calibration_quality::unsetRms_radial_pxl()
|
||||
void Powder_calibration_quality::unsetRms_radial_pxl()
|
||||
{
|
||||
m_Rms_radial_pxlIsSet = false;
|
||||
}
|
||||
float Calibration_quality::getBeamSigmaPxl() const
|
||||
float Powder_calibration_quality::getBeamSigmaPxl() const
|
||||
{
|
||||
return m_Beam_sigma_pxl;
|
||||
}
|
||||
void Calibration_quality::setBeamSigmaPxl(float const value)
|
||||
void Powder_calibration_quality::setBeamSigmaPxl(float const value)
|
||||
{
|
||||
m_Beam_sigma_pxl = value;
|
||||
m_Beam_sigma_pxlIsSet = true;
|
||||
}
|
||||
bool Calibration_quality::beamSigmaPxlIsSet() const
|
||||
bool Powder_calibration_quality::beamSigmaPxlIsSet() const
|
||||
{
|
||||
return m_Beam_sigma_pxlIsSet;
|
||||
}
|
||||
void Calibration_quality::unsetBeam_sigma_pxl()
|
||||
void Powder_calibration_quality::unsetBeam_sigma_pxl()
|
||||
{
|
||||
m_Beam_sigma_pxlIsSet = false;
|
||||
}
|
||||
float Calibration_quality::getDirectBeamXPxl() const
|
||||
float Powder_calibration_quality::getDirectBeamXPxl() const
|
||||
{
|
||||
return m_Direct_beam_x_pxl;
|
||||
}
|
||||
void Calibration_quality::setDirectBeamXPxl(float const value)
|
||||
void Powder_calibration_quality::setDirectBeamXPxl(float const value)
|
||||
{
|
||||
m_Direct_beam_x_pxl = value;
|
||||
m_Direct_beam_x_pxlIsSet = true;
|
||||
}
|
||||
bool Calibration_quality::directBeamXPxlIsSet() const
|
||||
bool Powder_calibration_quality::directBeamXPxlIsSet() const
|
||||
{
|
||||
return m_Direct_beam_x_pxlIsSet;
|
||||
}
|
||||
void Calibration_quality::unsetDirect_beam_x_pxl()
|
||||
void Powder_calibration_quality::unsetDirect_beam_x_pxl()
|
||||
{
|
||||
m_Direct_beam_x_pxlIsSet = false;
|
||||
}
|
||||
float Calibration_quality::getDirectBeamYPxl() const
|
||||
float Powder_calibration_quality::getDirectBeamYPxl() const
|
||||
{
|
||||
return m_Direct_beam_y_pxl;
|
||||
}
|
||||
void Calibration_quality::setDirectBeamYPxl(float const value)
|
||||
void Powder_calibration_quality::setDirectBeamYPxl(float const value)
|
||||
{
|
||||
m_Direct_beam_y_pxl = value;
|
||||
m_Direct_beam_y_pxlIsSet = true;
|
||||
}
|
||||
bool Calibration_quality::directBeamYPxlIsSet() const
|
||||
bool Powder_calibration_quality::directBeamYPxlIsSet() const
|
||||
{
|
||||
return m_Direct_beam_y_pxlIsSet;
|
||||
}
|
||||
void Calibration_quality::unsetDirect_beam_y_pxl()
|
||||
void Powder_calibration_quality::unsetDirect_beam_y_pxl()
|
||||
{
|
||||
m_Direct_beam_y_pxlIsSet = false;
|
||||
}
|
||||
float Calibration_quality::getHeaderDistanceMm() const
|
||||
float Powder_calibration_quality::getHeaderDistanceMm() const
|
||||
{
|
||||
return m_Header_distance_mm;
|
||||
}
|
||||
void Calibration_quality::setHeaderDistanceMm(float const value)
|
||||
void Powder_calibration_quality::setHeaderDistanceMm(float const value)
|
||||
{
|
||||
m_Header_distance_mm = value;
|
||||
m_Header_distance_mmIsSet = true;
|
||||
}
|
||||
bool Calibration_quality::headerDistanceMmIsSet() const
|
||||
bool Powder_calibration_quality::headerDistanceMmIsSet() const
|
||||
{
|
||||
return m_Header_distance_mmIsSet;
|
||||
}
|
||||
void Calibration_quality::unsetHeader_distance_mm()
|
||||
void Powder_calibration_quality::unsetHeader_distance_mm()
|
||||
{
|
||||
m_Header_distance_mmIsSet = false;
|
||||
}
|
||||
float Calibration_quality::getRingSeedDistanceMm() const
|
||||
float Powder_calibration_quality::getRingSeedDistanceMm() const
|
||||
{
|
||||
return m_Ring_seed_distance_mm;
|
||||
}
|
||||
void Calibration_quality::setRingSeedDistanceMm(float const value)
|
||||
void Powder_calibration_quality::setRingSeedDistanceMm(float const value)
|
||||
{
|
||||
m_Ring_seed_distance_mm = value;
|
||||
m_Ring_seed_distance_mmIsSet = true;
|
||||
}
|
||||
bool Calibration_quality::ringSeedDistanceMmIsSet() const
|
||||
bool Powder_calibration_quality::ringSeedDistanceMmIsSet() const
|
||||
{
|
||||
return m_Ring_seed_distance_mmIsSet;
|
||||
}
|
||||
void Calibration_quality::unsetRing_seed_distance_mm()
|
||||
void Powder_calibration_quality::unsetRing_seed_distance_mm()
|
||||
{
|
||||
m_Ring_seed_distance_mmIsSet = false;
|
||||
}
|
||||
bool Calibration_quality::isTiltRefined() const
|
||||
bool Powder_calibration_quality::isTiltRefined() const
|
||||
{
|
||||
return m_Tilt_refined;
|
||||
}
|
||||
void Calibration_quality::setTiltRefined(bool const value)
|
||||
void Powder_calibration_quality::setTiltRefined(bool const value)
|
||||
{
|
||||
m_Tilt_refined = value;
|
||||
m_Tilt_refinedIsSet = true;
|
||||
}
|
||||
bool Calibration_quality::tiltRefinedIsSet() const
|
||||
bool Powder_calibration_quality::tiltRefinedIsSet() const
|
||||
{
|
||||
return m_Tilt_refinedIsSet;
|
||||
}
|
||||
void Calibration_quality::unsetTilt_refined()
|
||||
void Powder_calibration_quality::unsetTilt_refined()
|
||||
{
|
||||
m_Tilt_refinedIsSet = false;
|
||||
}
|
||||
float Calibration_quality::getTiltSignificance() const
|
||||
float Powder_calibration_quality::getTiltSignificance() const
|
||||
{
|
||||
return m_Tilt_significance;
|
||||
}
|
||||
void Calibration_quality::setTiltSignificance(float const value)
|
||||
void Powder_calibration_quality::setTiltSignificance(float const value)
|
||||
{
|
||||
m_Tilt_significance = value;
|
||||
m_Tilt_significanceIsSet = true;
|
||||
}
|
||||
bool Calibration_quality::tiltSignificanceIsSet() const
|
||||
bool Powder_calibration_quality::tiltSignificanceIsSet() const
|
||||
{
|
||||
return m_Tilt_significanceIsSet;
|
||||
}
|
||||
void Calibration_quality::unsetTilt_significance()
|
||||
void Powder_calibration_quality::unsetTilt_significance()
|
||||
{
|
||||
m_Tilt_significanceIsSet = false;
|
||||
}
|
||||
org::openapitools::server::model::Calibration_fit_sigma Calibration_quality::getFitSigma() const
|
||||
org::openapitools::server::model::Powder_calibration_fit_sigma Powder_calibration_quality::getFitSigma() const
|
||||
{
|
||||
return m_Fit_sigma;
|
||||
}
|
||||
void Calibration_quality::setFitSigma(org::openapitools::server::model::Calibration_fit_sigma const& value)
|
||||
void Powder_calibration_quality::setFitSigma(org::openapitools::server::model::Powder_calibration_fit_sigma const& value)
|
||||
{
|
||||
m_Fit_sigma = value;
|
||||
m_Fit_sigmaIsSet = true;
|
||||
}
|
||||
bool Calibration_quality::fitSigmaIsSet() const
|
||||
bool Powder_calibration_quality::fitSigmaIsSet() const
|
||||
{
|
||||
return m_Fit_sigmaIsSet;
|
||||
}
|
||||
void Calibration_quality::unsetFit_sigma()
|
||||
void Powder_calibration_quality::unsetFit_sigma()
|
||||
{
|
||||
m_Fit_sigmaIsSet = false;
|
||||
}
|
||||
org::openapitools::server::model::Calibration_spot_check Calibration_quality::getSpotCrossCheck() const
|
||||
org::openapitools::server::model::Powder_calibration_spot_check Powder_calibration_quality::getSpotCrossCheck() const
|
||||
{
|
||||
return m_Spot_cross_check;
|
||||
}
|
||||
void Calibration_quality::setSpotCrossCheck(org::openapitools::server::model::Calibration_spot_check const& value)
|
||||
void Powder_calibration_quality::setSpotCrossCheck(org::openapitools::server::model::Powder_calibration_spot_check const& value)
|
||||
{
|
||||
m_Spot_cross_check = value;
|
||||
m_Spot_cross_checkIsSet = true;
|
||||
}
|
||||
bool Calibration_quality::spotCrossCheckIsSet() const
|
||||
bool Powder_calibration_quality::spotCrossCheckIsSet() const
|
||||
{
|
||||
return m_Spot_cross_checkIsSet;
|
||||
}
|
||||
void Calibration_quality::unsetSpot_cross_check()
|
||||
void Powder_calibration_quality::unsetSpot_cross_check()
|
||||
{
|
||||
m_Spot_cross_checkIsSet = false;
|
||||
}
|
||||
+21
-21
@@ -10,18 +10,18 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
/*
|
||||
* Calibration_quality.h
|
||||
* Powder_calibration_quality.h
|
||||
*
|
||||
* What a powder calibration knows about the geometry it produced. A calibration that has gone wrong - the wrong standard named, a header too far out for the rings to be found - looks exactly like one that has not until these are read.
|
||||
*/
|
||||
|
||||
#ifndef Calibration_quality_H_
|
||||
#define Calibration_quality_H_
|
||||
#ifndef Powder_calibration_quality_H_
|
||||
#define Powder_calibration_quality_H_
|
||||
|
||||
|
||||
#include "Calibration_spot_check.h"
|
||||
#include "Calibration_fit_sigma.h"
|
||||
#include <string>
|
||||
#include "Powder_calibration_fit_sigma.h"
|
||||
#include "Powder_calibration_spot_check.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace org::openapitools::server::model
|
||||
@@ -30,11 +30,11 @@ namespace org::openapitools::server::model
|
||||
/// <summary>
|
||||
/// What a powder calibration knows about the geometry it produced. A calibration that has gone wrong - the wrong standard named, a header too far out for the rings to be found - looks exactly like one that has not until these are read.
|
||||
/// </summary>
|
||||
class Calibration_quality
|
||||
class Powder_calibration_quality
|
||||
{
|
||||
public:
|
||||
Calibration_quality();
|
||||
virtual ~Calibration_quality() = default;
|
||||
Powder_calibration_quality();
|
||||
virtual ~Powder_calibration_quality() = default;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -54,11 +54,11 @@ public:
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
|
||||
|
||||
bool operator==(const Calibration_quality& rhs) const;
|
||||
bool operator!=(const Calibration_quality& rhs) const;
|
||||
bool operator==(const Powder_calibration_quality& rhs) const;
|
||||
bool operator!=(const Powder_calibration_quality& rhs) const;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Calibration_quality members
|
||||
/// Powder_calibration_quality members
|
||||
|
||||
/// <summary>
|
||||
/// The powder standard the rings were fitted to, or the unit cell given in its place
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
bool rmsRadialPxlIsSet() const;
|
||||
void unsetRms_radial_pxl();
|
||||
/// <summary>
|
||||
/// Standard error the scatter implies on the beam centre [pixels], for a ring of that many points. See calibration_fit_sigma for what the fit itself says, which is not the same and is the larger of the two whenever the tilt is poorly separated.
|
||||
/// Standard error the scatter implies on the beam centre [pixels], for a ring of that many points. See powder_calibration_fit_sigma for what the fit itself says, which is not the same and is the larger of the two whenever the tilt is poorly separated.
|
||||
/// </summary>
|
||||
float getBeamSigmaPxl() const;
|
||||
void setBeamSigmaPxl(float const value);
|
||||
@@ -140,20 +140,20 @@ public:
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
org::openapitools::server::model::Calibration_fit_sigma getFitSigma() const;
|
||||
void setFitSigma(org::openapitools::server::model::Calibration_fit_sigma const& value);
|
||||
org::openapitools::server::model::Powder_calibration_fit_sigma getFitSigma() const;
|
||||
void setFitSigma(org::openapitools::server::model::Powder_calibration_fit_sigma const& value);
|
||||
bool fitSigmaIsSet() const;
|
||||
void unsetFit_sigma();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
org::openapitools::server::model::Calibration_spot_check getSpotCrossCheck() const;
|
||||
void setSpotCrossCheck(org::openapitools::server::model::Calibration_spot_check const& value);
|
||||
org::openapitools::server::model::Powder_calibration_spot_check getSpotCrossCheck() const;
|
||||
void setSpotCrossCheck(org::openapitools::server::model::Powder_calibration_spot_check const& value);
|
||||
bool spotCrossCheckIsSet() const;
|
||||
void unsetSpot_cross_check();
|
||||
|
||||
friend void to_json(nlohmann::json& j, const Calibration_quality& o);
|
||||
friend void from_json(const nlohmann::json& j, Calibration_quality& o);
|
||||
friend void to_json(nlohmann::json& j, const Powder_calibration_quality& o);
|
||||
friend void from_json(const nlohmann::json& j, Powder_calibration_quality& o);
|
||||
protected:
|
||||
std::string m_Calibrant;
|
||||
bool m_CalibrantIsSet;
|
||||
@@ -177,13 +177,13 @@ protected:
|
||||
bool m_Tilt_refinedIsSet;
|
||||
float m_Tilt_significance;
|
||||
bool m_Tilt_significanceIsSet;
|
||||
org::openapitools::server::model::Calibration_fit_sigma m_Fit_sigma;
|
||||
org::openapitools::server::model::Powder_calibration_fit_sigma m_Fit_sigma;
|
||||
bool m_Fit_sigmaIsSet;
|
||||
org::openapitools::server::model::Calibration_spot_check m_Spot_cross_check;
|
||||
org::openapitools::server::model::Powder_calibration_spot_check m_Spot_cross_check;
|
||||
bool m_Spot_cross_checkIsSet;
|
||||
|
||||
};
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
#endif /* Calibration_quality_H_ */
|
||||
#endif /* Powder_calibration_quality_H_ */
|
||||
+26
-26
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "Calibration_spot_check.h"
|
||||
#include "Powder_calibration_spot_check.h"
|
||||
#include "Helpers.h"
|
||||
|
||||
#include <sstream>
|
||||
@@ -19,7 +19,7 @@
|
||||
namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
Calibration_spot_check::Calibration_spot_check()
|
||||
Powder_calibration_spot_check::Powder_calibration_spot_check()
|
||||
{
|
||||
m_Beam_x_pxl = 0.0f;
|
||||
m_Beam_x_pxlIsSet = false;
|
||||
@@ -32,7 +32,7 @@ Calibration_spot_check::Calibration_spot_check()
|
||||
|
||||
}
|
||||
|
||||
void Calibration_spot_check::validate() const
|
||||
void Powder_calibration_spot_check::validate() const
|
||||
{
|
||||
std::stringstream msg;
|
||||
if (!validate(msg))
|
||||
@@ -41,21 +41,21 @@ void Calibration_spot_check::validate() const
|
||||
}
|
||||
}
|
||||
|
||||
bool Calibration_spot_check::validate(std::stringstream& msg) const
|
||||
bool Powder_calibration_spot_check::validate(std::stringstream& msg) const
|
||||
{
|
||||
return validate(msg, "");
|
||||
}
|
||||
|
||||
bool Calibration_spot_check::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
||||
bool Powder_calibration_spot_check::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
||||
{
|
||||
bool success = true;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Calibration_spot_check" : pathPrefix;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Powder_calibration_spot_check" : pathPrefix;
|
||||
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
bool Calibration_spot_check::operator==(const Calibration_spot_check& rhs) const
|
||||
bool Powder_calibration_spot_check::operator==(const Powder_calibration_spot_check& rhs) const
|
||||
{
|
||||
return
|
||||
|
||||
@@ -75,12 +75,12 @@ bool Calibration_spot_check::operator==(const Calibration_spot_check& rhs) const
|
||||
;
|
||||
}
|
||||
|
||||
bool Calibration_spot_check::operator!=(const Calibration_spot_check& rhs) const
|
||||
bool Powder_calibration_spot_check::operator!=(const Powder_calibration_spot_check& rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
void to_json(nlohmann::json& j, const Calibration_spot_check& o)
|
||||
void to_json(nlohmann::json& j, const Powder_calibration_spot_check& o)
|
||||
{
|
||||
j = nlohmann::json::object();
|
||||
if(o.beamXPxlIsSet())
|
||||
@@ -94,7 +94,7 @@ void to_json(nlohmann::json& j, const Calibration_spot_check& o)
|
||||
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json& j, Calibration_spot_check& o)
|
||||
void from_json(const nlohmann::json& j, Powder_calibration_spot_check& o)
|
||||
{
|
||||
if(j.find("beam_x_pxl") != j.end())
|
||||
{
|
||||
@@ -119,71 +119,71 @@ void from_json(const nlohmann::json& j, Calibration_spot_check& o)
|
||||
|
||||
}
|
||||
|
||||
float Calibration_spot_check::getBeamXPxl() const
|
||||
float Powder_calibration_spot_check::getBeamXPxl() const
|
||||
{
|
||||
return m_Beam_x_pxl;
|
||||
}
|
||||
void Calibration_spot_check::setBeamXPxl(float const value)
|
||||
void Powder_calibration_spot_check::setBeamXPxl(float const value)
|
||||
{
|
||||
m_Beam_x_pxl = value;
|
||||
m_Beam_x_pxlIsSet = true;
|
||||
}
|
||||
bool Calibration_spot_check::beamXPxlIsSet() const
|
||||
bool Powder_calibration_spot_check::beamXPxlIsSet() const
|
||||
{
|
||||
return m_Beam_x_pxlIsSet;
|
||||
}
|
||||
void Calibration_spot_check::unsetBeam_x_pxl()
|
||||
void Powder_calibration_spot_check::unsetBeam_x_pxl()
|
||||
{
|
||||
m_Beam_x_pxlIsSet = false;
|
||||
}
|
||||
float Calibration_spot_check::getBeamYPxl() const
|
||||
float Powder_calibration_spot_check::getBeamYPxl() const
|
||||
{
|
||||
return m_Beam_y_pxl;
|
||||
}
|
||||
void Calibration_spot_check::setBeamYPxl(float const value)
|
||||
void Powder_calibration_spot_check::setBeamYPxl(float const value)
|
||||
{
|
||||
m_Beam_y_pxl = value;
|
||||
m_Beam_y_pxlIsSet = true;
|
||||
}
|
||||
bool Calibration_spot_check::beamYPxlIsSet() const
|
||||
bool Powder_calibration_spot_check::beamYPxlIsSet() const
|
||||
{
|
||||
return m_Beam_y_pxlIsSet;
|
||||
}
|
||||
void Calibration_spot_check::unsetBeam_y_pxl()
|
||||
void Powder_calibration_spot_check::unsetBeam_y_pxl()
|
||||
{
|
||||
m_Beam_y_pxlIsSet = false;
|
||||
}
|
||||
float Calibration_spot_check::getDetectorDistanceMm() const
|
||||
float Powder_calibration_spot_check::getDetectorDistanceMm() const
|
||||
{
|
||||
return m_Detector_distance_mm;
|
||||
}
|
||||
void Calibration_spot_check::setDetectorDistanceMm(float const value)
|
||||
void Powder_calibration_spot_check::setDetectorDistanceMm(float const value)
|
||||
{
|
||||
m_Detector_distance_mm = value;
|
||||
m_Detector_distance_mmIsSet = true;
|
||||
}
|
||||
bool Calibration_spot_check::detectorDistanceMmIsSet() const
|
||||
bool Powder_calibration_spot_check::detectorDistanceMmIsSet() const
|
||||
{
|
||||
return m_Detector_distance_mmIsSet;
|
||||
}
|
||||
void Calibration_spot_check::unsetDetector_distance_mm()
|
||||
void Powder_calibration_spot_check::unsetDetector_distance_mm()
|
||||
{
|
||||
m_Detector_distance_mmIsSet = false;
|
||||
}
|
||||
float Calibration_spot_check::getDisagreementPxl() const
|
||||
float Powder_calibration_spot_check::getDisagreementPxl() const
|
||||
{
|
||||
return m_Disagreement_pxl;
|
||||
}
|
||||
void Calibration_spot_check::setDisagreementPxl(float const value)
|
||||
void Powder_calibration_spot_check::setDisagreementPxl(float const value)
|
||||
{
|
||||
m_Disagreement_pxl = value;
|
||||
m_Disagreement_pxlIsSet = true;
|
||||
}
|
||||
bool Calibration_spot_check::disagreementPxlIsSet() const
|
||||
bool Powder_calibration_spot_check::disagreementPxlIsSet() const
|
||||
{
|
||||
return m_Disagreement_pxlIsSet;
|
||||
}
|
||||
void Calibration_spot_check::unsetDisagreement_pxl()
|
||||
void Powder_calibration_spot_check::unsetDisagreement_pxl()
|
||||
{
|
||||
m_Disagreement_pxlIsSet = false;
|
||||
}
|
||||
+12
-12
@@ -10,13 +10,13 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
/*
|
||||
* Calibration_spot_check.h
|
||||
* Powder_calibration_spot_check.h
|
||||
*
|
||||
* Where the circle through the found spots puts the beam, and how far that is from the geometry actually fitted. An independent cross-check: it reads nothing from the file's own geometry, so it holds where the summed azimuthal profile does not - a profile binned about a badly wrong centre shows each ring smeared across its sectors, and a fit on it converges on the wrong answer without saying so. Two methods sharing no assumption, so the disagreement is the statement. Absent when no spots were available.
|
||||
*/
|
||||
|
||||
#ifndef Calibration_spot_check_H_
|
||||
#define Calibration_spot_check_H_
|
||||
#ifndef Powder_calibration_spot_check_H_
|
||||
#define Powder_calibration_spot_check_H_
|
||||
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
@@ -27,11 +27,11 @@ namespace org::openapitools::server::model
|
||||
/// <summary>
|
||||
/// Where the circle through the found spots puts the beam, and how far that is from the geometry actually fitted. An independent cross-check: it reads nothing from the file's own geometry, so it holds where the summed azimuthal profile does not - a profile binned about a badly wrong centre shows each ring smeared across its sectors, and a fit on it converges on the wrong answer without saying so. Two methods sharing no assumption, so the disagreement is the statement. Absent when no spots were available.
|
||||
/// </summary>
|
||||
class Calibration_spot_check
|
||||
class Powder_calibration_spot_check
|
||||
{
|
||||
public:
|
||||
Calibration_spot_check();
|
||||
virtual ~Calibration_spot_check() = default;
|
||||
Powder_calibration_spot_check();
|
||||
virtual ~Powder_calibration_spot_check() = default;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -51,11 +51,11 @@ public:
|
||||
/// </summary>
|
||||
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
|
||||
|
||||
bool operator==(const Calibration_spot_check& rhs) const;
|
||||
bool operator!=(const Calibration_spot_check& rhs) const;
|
||||
bool operator==(const Powder_calibration_spot_check& rhs) const;
|
||||
bool operator!=(const Powder_calibration_spot_check& rhs) const;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Calibration_spot_check members
|
||||
/// Powder_calibration_spot_check members
|
||||
|
||||
/// <summary>
|
||||
/// Beam centre x the spots vote for [pixels]
|
||||
@@ -86,8 +86,8 @@ public:
|
||||
bool disagreementPxlIsSet() const;
|
||||
void unsetDisagreement_pxl();
|
||||
|
||||
friend void to_json(nlohmann::json& j, const Calibration_spot_check& o);
|
||||
friend void from_json(const nlohmann::json& j, Calibration_spot_check& o);
|
||||
friend void to_json(nlohmann::json& j, const Powder_calibration_spot_check& o);
|
||||
friend void from_json(const nlohmann::json& j, Powder_calibration_spot_check& o);
|
||||
protected:
|
||||
float m_Beam_x_pxl;
|
||||
bool m_Beam_x_pxlIsSet;
|
||||
@@ -102,4 +102,4 @@ protected:
|
||||
|
||||
} // namespace org::openapitools::server::model
|
||||
|
||||
#endif /* Calibration_spot_check_H_ */
|
||||
#endif /* Powder_calibration_spot_check_H_ */
|
||||
@@ -1684,7 +1684,7 @@ components:
|
||||
type: number
|
||||
format: float
|
||||
description: Diffraction resolution estimate
|
||||
calibration_fit_sigma:
|
||||
powder_calibration_fit_sigma:
|
||||
type: object
|
||||
description: |
|
||||
What the powder ring fit knows about its own answer, from the covariance of the converged
|
||||
@@ -1723,7 +1723,7 @@ components:
|
||||
type: number
|
||||
format: float
|
||||
description: Correlation between the fitted PONI y and rot2, -1 to 1
|
||||
calibration_spot_check:
|
||||
powder_calibration_spot_check:
|
||||
type: object
|
||||
description: |
|
||||
Where the circle through the found spots puts the beam, and how far that is from the geometry
|
||||
@@ -1749,7 +1749,7 @@ components:
|
||||
type: number
|
||||
format: float
|
||||
description: Distance between the spots' beam centre and the fitted one [pixels]
|
||||
calibration_quality:
|
||||
powder_calibration_quality:
|
||||
type: object
|
||||
description: |
|
||||
What a powder calibration knows about the geometry it produced. A calibration that has gone
|
||||
@@ -1782,7 +1782,7 @@ components:
|
||||
format: float
|
||||
description: |
|
||||
Standard error the scatter implies on the beam centre [pixels], for a ring of that many
|
||||
points. See calibration_fit_sigma for what the fit itself says, which is not the same and
|
||||
points. See powder_calibration_fit_sigma for what the fit itself says, which is not the same and
|
||||
is the larger of the two whenever the tilt is poorly separated.
|
||||
direct_beam_x_pxl:
|
||||
type: number
|
||||
@@ -1820,10 +1820,10 @@ components:
|
||||
measurement of a tilt but of a beam-centre shift, and the tilt is declined. Passing does
|
||||
not certify a tilt: that estimator is limited by systematics rather than by this sigma.
|
||||
fit_sigma:
|
||||
$ref: '#/components/schemas/calibration_fit_sigma'
|
||||
$ref: '#/components/schemas/powder_calibration_fit_sigma'
|
||||
spot_cross_check:
|
||||
$ref: '#/components/schemas/calibration_spot_check'
|
||||
calibration_output:
|
||||
$ref: '#/components/schemas/powder_calibration_spot_check'
|
||||
powder_calibration_output:
|
||||
type: object
|
||||
required:
|
||||
- dataset_settings
|
||||
@@ -1841,7 +1841,7 @@ components:
|
||||
dataset_settings:
|
||||
$ref: '#/components/schemas/dataset_settings'
|
||||
calibration:
|
||||
$ref: '#/components/schemas/calibration_quality'
|
||||
$ref: '#/components/schemas/powder_calibration_quality'
|
||||
jfjoch_version:
|
||||
type: string
|
||||
description: Version of the program that produced this
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1135,7 +1135,7 @@ export type scan_result = {
|
||||
* The rotation sigmas and the correlations are absent when the tilt was not a free parameter.
|
||||
*
|
||||
*/
|
||||
export type calibration_fit_sigma = {
|
||||
export type powder_calibration_fit_sigma = {
|
||||
/**
|
||||
* Standard error of the fitted PONI x [pixels]
|
||||
*/
|
||||
@@ -1175,7 +1175,7 @@ export type calibration_fit_sigma = {
|
||||
* statement. Absent when no spots were available.
|
||||
*
|
||||
*/
|
||||
export type calibration_spot_check = {
|
||||
export type powder_calibration_spot_check = {
|
||||
/**
|
||||
* Beam centre x the spots vote for [pixels]
|
||||
*/
|
||||
@@ -1200,7 +1200,7 @@ export type calibration_spot_check = {
|
||||
* exactly like one that has not until these are read.
|
||||
*
|
||||
*/
|
||||
export type calibration_quality = {
|
||||
export type powder_calibration_quality = {
|
||||
/**
|
||||
* The powder standard the rings were fitted to, or the unit cell given in its place
|
||||
*/
|
||||
@@ -1223,7 +1223,7 @@ export type calibration_quality = {
|
||||
rms_radial_pxl?: number;
|
||||
/**
|
||||
* Standard error the scatter implies on the beam centre [pixels], for a ring of that many
|
||||
* points. See calibration_fit_sigma for what the fit itself says, which is not the same and
|
||||
* points. See powder_calibration_fit_sigma for what the fit itself says, which is not the same and
|
||||
* is the larger of the two whenever the tilt is poorly separated.
|
||||
*
|
||||
*/
|
||||
@@ -1264,8 +1264,8 @@ export type calibration_quality = {
|
||||
*
|
||||
*/
|
||||
tilt_significance?: number;
|
||||
fit_sigma?: calibration_fit_sigma;
|
||||
spot_cross_check?: calibration_spot_check;
|
||||
fit_sigma?: powder_calibration_fit_sigma;
|
||||
spot_cross_check?: powder_calibration_spot_check;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1280,9 +1280,9 @@ export type calibration_quality = {
|
||||
* unstated one.
|
||||
*
|
||||
*/
|
||||
export type calibration_output = {
|
||||
export type powder_calibration_output = {
|
||||
dataset_settings: dataset_settings;
|
||||
calibration?: calibration_quality;
|
||||
calibration?: powder_calibration_quality;
|
||||
/**
|
||||
* Version of the program that produced this
|
||||
*/
|
||||
|
||||
@@ -461,7 +461,7 @@ export const zScanResult = z.object({
|
||||
* The rotation sigmas and the correlations are absent when the tilt was not a free parameter.
|
||||
*
|
||||
*/
|
||||
export const zCalibrationFitSigma = z.object({
|
||||
export const zPowderCalibrationFitSigma = z.object({
|
||||
beam_x_pxl: z.number().optional(),
|
||||
beam_y_pxl: z.number().optional(),
|
||||
detector_distance_mm: z.number().optional(),
|
||||
@@ -480,7 +480,7 @@ export const zCalibrationFitSigma = z.object({
|
||||
* statement. Absent when no spots were available.
|
||||
*
|
||||
*/
|
||||
export const zCalibrationSpotCheck = z.object({
|
||||
export const zPowderCalibrationSpotCheck = z.object({
|
||||
beam_x_pxl: z.number().optional(),
|
||||
beam_y_pxl: z.number().optional(),
|
||||
detector_distance_mm: z.number().optional(),
|
||||
@@ -493,7 +493,7 @@ export const zCalibrationSpotCheck = z.object({
|
||||
* exactly like one that has not until these are read.
|
||||
*
|
||||
*/
|
||||
export const zCalibrationQuality = z.object({
|
||||
export const zPowderCalibrationQuality = z.object({
|
||||
calibrant: z.string().optional(),
|
||||
method: z.enum(['rings', 'spots']).optional(),
|
||||
ring_points: z.coerce.bigint().min(BigInt('-9223372036854775808'), { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(BigInt('9223372036854775807'), { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }).optional(),
|
||||
@@ -505,8 +505,8 @@ export const zCalibrationQuality = z.object({
|
||||
ring_seed_distance_mm: z.number().optional(),
|
||||
tilt_refined: z.boolean().optional(),
|
||||
tilt_significance: z.number().optional(),
|
||||
fit_sigma: zCalibrationFitSigma.optional(),
|
||||
spot_cross_check: zCalibrationSpotCheck.optional()
|
||||
fit_sigma: zPowderCalibrationFitSigma.optional(),
|
||||
spot_cross_check: zPowderCalibrationSpotCheck.optional()
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -521,9 +521,9 @@ export const zCalibrationQuality = z.object({
|
||||
* unstated one.
|
||||
*
|
||||
*/
|
||||
export const zCalibrationOutput = z.object({
|
||||
export const zPowderCalibrationOutput = z.object({
|
||||
dataset_settings: zDatasetSettings,
|
||||
calibration: zCalibrationQuality.optional(),
|
||||
calibration: zPowderCalibrationQuality.optional(),
|
||||
jfjoch_version: z.string().optional()
|
||||
});
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "../common/JFJochMath.h"
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include "Calibration_output.h"
|
||||
#include "Powder_calibration_output.h"
|
||||
#include "Dataset_settings.h"
|
||||
#include "../image_analysis/geom_refinement/AssignSpotsToRings.h"
|
||||
#include "../image_analysis/geom_refinement/Calibrants.h"
|
||||
@@ -266,7 +266,7 @@ TEST_CASE("Calibration_JsonIsADatasetSettingsBody", "[DetGeomCalib]") {
|
||||
// The WHOLE file is a calibration_output, not just its geometry member - so the quality block a
|
||||
// reader needs in order to tell a calibration that worked from one that did not is part of the
|
||||
// published contract too, and a python client can decode the file without knowing anything else.
|
||||
org::openapitools::server::model::Calibration_output output;
|
||||
org::openapitools::server::model::Powder_calibration_output output;
|
||||
REQUIRE_NOTHROW(from_json(j, output));
|
||||
std::stringstream output_msg;
|
||||
CHECK(output.validate(output_msg));
|
||||
|
||||
Reference in New Issue
Block a user