diff --git a/broker/OpenAPIConvert.cpp b/broker/OpenAPIConvert.cpp
index e04169bd..09261457 100644
--- a/broker/OpenAPIConvert.cpp
+++ b/broker/OpenAPIConvert.cpp
@@ -1026,6 +1026,19 @@ org::openapitools::server::model::Scan_result Convert(const ScanResult& input) {
v.emplace_back(std::move(tmp));
}
ret.setImages(v);
+ if (input.rotation_lattice) {
+ ret.setRotationCrystalLattice(input.rotation_lattice->GetVector());
+ org::openapitools::server::model::Unit_cell uc;
+ auto i_uc = input.rotation_lattice->GetUnitCell();
+
+ uc.setA(i_uc.a);
+ uc.setB(i_uc.b);
+ uc.setC(i_uc.c);
+ uc.setAlpha(i_uc.alpha);
+ uc.setBeta(i_uc.beta);
+ uc.setGamma(i_uc.gamma);
+ ret.setRotationUnitCell(uc);
+ }
return ret;
}
diff --git a/broker/gen/model/Scan_result.cpp b/broker/gen/model/Scan_result.cpp
index 2e7df240..3e251f08 100644
--- a/broker/gen/model/Scan_result.cpp
+++ b/broker/gen/model/Scan_result.cpp
@@ -23,8 +23,8 @@ Scan_result::Scan_result()
{
m_File_prefix = "";
m_File_prefixIsSet = false;
- m_Unit_cellIsSet = false;
- m_Crystal_latticeIsSet = false;
+ m_Rotation_unit_cellIsSet = false;
+ m_Rotation_crystal_latticeIsSet = false;
}
@@ -48,10 +48,10 @@ bool Scan_result::validate(std::stringstream& msg, const std::string& pathPrefix
const std::string _pathPrefix = pathPrefix.empty() ? "Scan_result" : pathPrefix;
- if (crystalLatticeIsSet())
+ if (rotationCrystalLatticeIsSet())
{
- const std::vector& value = m_Crystal_lattice;
- const std::string currentValuePath = _pathPrefix + ".crystalLattice";
+ const std::vector& value = m_Rotation_crystal_lattice;
+ const std::string currentValuePath = _pathPrefix + ".rotationCrystalLattice";
if (value.size() < 9)
@@ -112,10 +112,10 @@ bool Scan_result::operator==(const Scan_result& rhs) const
((!filePrefixIsSet() && !rhs.filePrefixIsSet()) || (filePrefixIsSet() && rhs.filePrefixIsSet() && getFilePrefix() == rhs.getFilePrefix())) &&
- ((!unitCellIsSet() && !rhs.unitCellIsSet()) || (unitCellIsSet() && rhs.unitCellIsSet() && getUnitCell() == rhs.getUnitCell())) &&
+ ((!rotationUnitCellIsSet() && !rhs.rotationUnitCellIsSet()) || (rotationUnitCellIsSet() && rhs.rotationUnitCellIsSet() && getRotationUnitCell() == rhs.getRotationUnitCell())) &&
- ((!crystalLatticeIsSet() && !rhs.crystalLatticeIsSet()) || (crystalLatticeIsSet() && rhs.crystalLatticeIsSet() && getCrystalLattice() == rhs.getCrystalLattice())) &&
+ ((!rotationCrystalLatticeIsSet() && !rhs.rotationCrystalLatticeIsSet()) || (rotationCrystalLatticeIsSet() && rhs.rotationCrystalLatticeIsSet() && getRotationCrystalLattice() == rhs.getRotationCrystalLattice())) &&
(getImages() == rhs.getImages())
@@ -133,10 +133,10 @@ void to_json(nlohmann::json& j, const Scan_result& o)
j = nlohmann::json::object();
if(o.filePrefixIsSet())
j["file_prefix"] = o.m_File_prefix;
- if(o.unitCellIsSet())
- j["unit_cell"] = o.m_Unit_cell;
- if(o.crystalLatticeIsSet() || !o.m_Crystal_lattice.empty())
- j["crystal_lattice"] = o.m_Crystal_lattice;
+ if(o.rotationUnitCellIsSet())
+ j["rotation_unit_cell"] = o.m_Rotation_unit_cell;
+ if(o.rotationCrystalLatticeIsSet() || !o.m_Rotation_crystal_lattice.empty())
+ j["rotation_crystal_lattice"] = o.m_Rotation_crystal_lattice;
j["images"] = o.m_Images;
}
@@ -148,15 +148,15 @@ void from_json(const nlohmann::json& j, Scan_result& o)
j.at("file_prefix").get_to(o.m_File_prefix);
o.m_File_prefixIsSet = true;
}
- if(j.find("unit_cell") != j.end())
+ if(j.find("rotation_unit_cell") != j.end())
{
- j.at("unit_cell").get_to(o.m_Unit_cell);
- o.m_Unit_cellIsSet = true;
+ j.at("rotation_unit_cell").get_to(o.m_Rotation_unit_cell);
+ o.m_Rotation_unit_cellIsSet = true;
}
- if(j.find("crystal_lattice") != j.end())
+ if(j.find("rotation_crystal_lattice") != j.end())
{
- j.at("crystal_lattice").get_to(o.m_Crystal_lattice);
- o.m_Crystal_latticeIsSet = true;
+ j.at("rotation_crystal_lattice").get_to(o.m_Rotation_crystal_lattice);
+ o.m_Rotation_crystal_latticeIsSet = true;
}
j.at("images").get_to(o.m_Images);
@@ -179,39 +179,39 @@ void Scan_result::unsetFile_prefix()
{
m_File_prefixIsSet = false;
}
-org::openapitools::server::model::Unit_cell Scan_result::getUnitCell() const
+org::openapitools::server::model::Unit_cell Scan_result::getRotationUnitCell() const
{
- return m_Unit_cell;
+ return m_Rotation_unit_cell;
}
-void Scan_result::setUnitCell(org::openapitools::server::model::Unit_cell const& value)
+void Scan_result::setRotationUnitCell(org::openapitools::server::model::Unit_cell const& value)
{
- m_Unit_cell = value;
- m_Unit_cellIsSet = true;
+ m_Rotation_unit_cell = value;
+ m_Rotation_unit_cellIsSet = true;
}
-bool Scan_result::unitCellIsSet() const
+bool Scan_result::rotationUnitCellIsSet() const
{
- return m_Unit_cellIsSet;
+ return m_Rotation_unit_cellIsSet;
}
-void Scan_result::unsetUnit_cell()
+void Scan_result::unsetRotation_unit_cell()
{
- m_Unit_cellIsSet = false;
+ m_Rotation_unit_cellIsSet = false;
}
-std::vector Scan_result::getCrystalLattice() const
+std::vector Scan_result::getRotationCrystalLattice() const
{
- return m_Crystal_lattice;
+ return m_Rotation_crystal_lattice;
}
-void Scan_result::setCrystalLattice(std::vector const value)
+void Scan_result::setRotationCrystalLattice(std::vector const value)
{
- m_Crystal_lattice = value;
- m_Crystal_latticeIsSet = true;
+ m_Rotation_crystal_lattice = value;
+ m_Rotation_crystal_latticeIsSet = true;
}
-bool Scan_result::crystalLatticeIsSet() const
+bool Scan_result::rotationCrystalLatticeIsSet() const
{
- return m_Crystal_latticeIsSet;
+ return m_Rotation_crystal_latticeIsSet;
}
-void Scan_result::unsetCrystal_lattice()
+void Scan_result::unsetRotation_crystal_lattice()
{
- m_Crystal_latticeIsSet = false;
+ m_Rotation_crystal_latticeIsSet = false;
}
std::vector Scan_result::getImages() const
{
diff --git a/broker/gen/model/Scan_result.h b/broker/gen/model/Scan_result.h
index c40a9ea5..5274a297 100644
--- a/broker/gen/model/Scan_result.h
+++ b/broker/gen/model/Scan_result.h
@@ -71,17 +71,17 @@ public:
///
///
///
- org::openapitools::server::model::Unit_cell getUnitCell() const;
- void setUnitCell(org::openapitools::server::model::Unit_cell const& value);
- bool unitCellIsSet() const;
- void unsetUnit_cell();
+ org::openapitools::server::model::Unit_cell getRotationUnitCell() const;
+ void setRotationUnitCell(org::openapitools::server::model::Unit_cell const& value);
+ bool rotationUnitCellIsSet() const;
+ void unsetRotation_unit_cell();
///
/// Real-space crystal lattice 3D vectors in Angstrom. Order is 1st vector (x,y,z), 2nd vector (x,y,z) and 3rd vector (x,y,z)
///
- std::vector getCrystalLattice() const;
- void setCrystalLattice(std::vector const value);
- bool crystalLatticeIsSet() const;
- void unsetCrystal_lattice();
+ std::vector getRotationCrystalLattice() const;
+ void setRotationCrystalLattice(std::vector const value);
+ bool rotationCrystalLatticeIsSet() const;
+ void unsetRotation_crystal_lattice();
///
///
///
@@ -93,10 +93,10 @@ public:
protected:
std::string m_File_prefix;
bool m_File_prefixIsSet;
- org::openapitools::server::model::Unit_cell m_Unit_cell;
- bool m_Unit_cellIsSet;
- std::vector m_Crystal_lattice;
- bool m_Crystal_latticeIsSet;
+ org::openapitools::server::model::Unit_cell m_Rotation_unit_cell;
+ bool m_Rotation_unit_cellIsSet;
+ std::vector m_Rotation_crystal_lattice;
+ bool m_Rotation_crystal_latticeIsSet;
std::vector m_Images;
diff --git a/broker/jfjoch_api.yaml b/broker/jfjoch_api.yaml
index bc7149cd..35acea84 100644
--- a/broker/jfjoch_api.yaml
+++ b/broker/jfjoch_api.yaml
@@ -1375,9 +1375,9 @@ components:
properties:
file_prefix:
type: string
- unit_cell:
+ rotation_unit_cell:
$ref: '#/components/schemas/unit_cell'
- crystal_lattice:
+ rotation_crystal_lattice:
$ref: '#/components/schemas/crystal_lattice'
images:
type: array
diff --git a/broker/redoc-static.html b/broker/redoc-static.html
index 3da39545..e9116d10 100644
--- a/broker/redoc-static.html
+++ b/broker/redoc-static.html
@@ -1319,7 +1319,7 @@ For still measurement the number is ignored
" class="sc-eVqvcJ sc-fszimp sc-etsjJW kIppRw jnwENr ljKHqG">Error within Jungfraujoch code - see output message.
Test Jungfraujoch system
-
http://localhost:5232/result/scan
Response samples
Content typeapplication/json
{"file_prefix": "string",
"unit_cell":
{"a": 37,
"b": 37,
"c": 78,
"alpha": 90,
"beta": 90,
"gamma": 90
}, "crystal_lattice":
[0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
], "images":
[{"efficiency": 0.1,
"number": 0,
"nx": 0,
"ny": 0,
"angle": 0.1,
"bkg": 0.1,
"spots": 0,
"spots_low_res": 0,
"spots_indexed": 0,
"spots_ice": 0,
"index": 0,
"pr": 0.1,
"b": 0.1,
"uc":
{"a": 37,
"b": 37,
"c": 78,
"alpha": 90,
"beta": 90,
"gamma": 90
}, "xfel_pulseid": 0,
"pixel_sum": 0,
"max": 0,
"sat": 0,
"err": 0,
"res": 0.1
}
]
}Get Start message in CBOR format
http://localhost:5232/result/scan
Response samples
Content typeapplication/json
{"file_prefix": "string",
"rotation_unit_cell":
{"a": 37,
"b": 37,
"c": 78,
"alpha": 90,
"beta": 90,
"gamma": 90
}, "rotation_crystal_lattice":
[0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
], "images":
[{"efficiency": 0.1,
"number": 0,
"nx": 0,
"ny": 0,
"angle": 0.1,
"bkg": 0.1,
"spots": 0,
"spots_low_res": 0,
"spots_indexed": 0,
"spots_ice": 0,
"index": 0,
"pr": 0.1,
"b": 0.1,
"uc":
{"a": 37,
"b": 37,
"c": 78,
"alpha": 90,
"beta": 90,
"gamma": 90
}, "xfel_pulseid": 0,
"pixel_sum": 0,
"max": 0,
"sat": 0,
"err": 0,
"res": 0.1
}
]
}Get Start message in CBOR format
Contains metadata for a dataset (e.g., experimental geometry)
Responses