jfjoch_broker: Set Unit Cell vectors

This commit is contained in:
leonarski_f committed 2025-12-01 14:49:37 +01:00
1 parent f2a8bdbe40
commit eebcece576
10 files changed
+84 -55

No files matched your search

+13
View File
@@ -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;
}
+35 -35
View File
@@ -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<float>& value = m_Crystal_lattice;
const std::string currentValuePath = _pathPrefix + ".crystalLattice";
const std::vector<float>& 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<float> Scan_result::getCrystalLattice() const
std::vector<float> Scan_result::getRotationCrystalLattice() const
{
return m_Crystal_lattice;
return m_Rotation_crystal_lattice;
}
void Scan_result::setCrystalLattice(std::vector<float> const value)
void Scan_result::setRotationCrystalLattice(std::vector<float> 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<org::openapitools::server::model::Scan_result_images_inner> Scan_result::getImages() const
{
+12 -12
View File
@@ -71,17 +71,17 @@ public:
/// <summary>
///
/// </summary>
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();
/// <summary>
/// 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)
/// </summary>
std::vector<float> getCrystalLattice() const;
void setCrystalLattice(std::vector<float> const value);
bool crystalLatticeIsSet() const;
void unsetCrystal_lattice();
std::vector<float> getRotationCrystalLattice() const;
void setRotationCrystalLattice(std::vector<float> const value);
bool rotationCrystalLatticeIsSet() const;
void unsetRotation_crystal_lattice();
/// <summary>
///
/// </summary>
@@ -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<float> m_Crystal_lattice;
bool m_Crystal_latticeIsSet;
org::openapitools::server::model::Unit_cell m_Rotation_unit_cell;
bool m_Rotation_unit_cellIsSet;
std::vector<float> m_Rotation_crystal_lattice;
bool m_Rotation_crystal_latticeIsSet;
std::vector<org::openapitools::server::model::Scan_result_images_inner> m_Images;
+2 -2
View File
@@ -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
+2 -2
View File
@@ -1319,7 +1319,7 @@ For still measurement the number is ignored</p>
" class="sc-eVqvcJ sc-fszimp sc-etsjJW kIppRw jnwENr ljKHqG"><p>Error within Jungfraujoch code - see output message.</p>
</div></button></div></div></div><div class="sc-jwTyAe sc-hjsuWn bDYKKx FFPsr"><div class="sc-eZSpzM jjnszm"><button class="sc-buTqWO iPCVMX"><span type="get" class="sc-fQLpxn dynMBc http-verb get">get</span><span class="sc-jvKoal kZcHWP">/result/scan</span><svg class="sc-dntSTA iuNpUs" style="margin-right:-25px" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg></button><div aria-hidden="true" class="sc-ecJghI ga-DQLq"><div class="sc-iyBeIh icOxsG"><div html="&lt;p&gt;Test Jungfraujoch system&lt;/p&gt;
" class="sc-eVqvcJ sc-fszimp kIppRw drqpJr"><p>Test Jungfraujoch system</p>
</div><div tabindex="0" role="button"><div class="sc-xKhEK okJpy"><span>http://localhost:5232</span>/result/scan</div></div></div></div></div><div><h3 class="sc-lgpSej drJHMo"> <!-- -->Response samples<!-- --> </h3><div class="sc-cOpnSz fyxuKi" data-rttabs="true"><ul class="react-tabs__tab-list" role="tablist"><li class="tab-success react-tabs__tab--selected" role="tab" id="tab:R9pqq:0" aria-selected="true" aria-disabled="false" aria-controls="panel:R9pqq:0" tabindex="0" data-rttab="true">200</li><li class="tab-error" role="tab" id="tab:R9pqq:1" aria-selected="false" aria-disabled="false" aria-controls="panel:R9pqq:1" data-rttab="true">500</li></ul><div class="react-tabs__tab-panel react-tabs__tab-panel--selected" role="tabpanel" id="panel:R9pqq:0" aria-labelledby="tab:R9pqq:0"><div><div class="sc-bSFBcf iLdyBp"><span class="sc-gahYZc cXitJ">Content type</span><div class="sc-bAehkN iNRAJK">application/json</div></div><div class="sc-blIAwI eKKwxo"><div class="sc-dClGHI fdRrNy"><div class="sc-bbbBoY bBWkcI"><button><div class="sc-fYmhhH iNCOCX">Copy</div></button><button> Expand all </button><button> Collapse all </button></div><div tabindex="0" class="sc-eVqvcJ kIppRw sc-fhfEft dFvLDb"><div class="redoc-json"><code><button class="collapser" aria-label="collapse"></button><span class="token punctuation">{</span><span class="ellipsis"></span><ul class="obj collapsible"><li><div class="hoverable "><span class="property token string">"file_prefix"</span>: <span class="token string">&quot;string&quot;</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"unit_cell"</span>: <button class="collapser" aria-label="collapse"></button><span class="token punctuation">{</span><span class="ellipsis"></span><ul class="obj collapsible"><li><div class="hoverable collapsed"><span class="property token string">"a"</span>: <span class="token number">37</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"b"</span>: <span class="token number">37</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"c"</span>: <span class="token number">78</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"alpha"</span>: <span class="token number">90</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"beta"</span>: <span class="token number">90</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"gamma"</span>: <span class="token number">90</span></div></li></ul><span class="token punctuation">}</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"crystal_lattice"</span>: <button class="collapser" aria-label="collapse"></button><span class="token punctuation">[</span><span class="ellipsis"></span><ul class="array collapsible"><li><div class="hoverable collapsed"><span class="token number">0.1</span>,</div></li><li><div class="hoverable collapsed"><span class="token number">0.1</span>,</div></li><li><div class="hoverable collapsed"><span class="token number">0.1</span>,</div></li><li><div class="hoverable collapsed"><span class="token number">0.1</span>,</div></li><li><div class="hoverable collapsed"><span class="token number">0.1</span>,</div></li><li><div class="hoverable collapsed"><span class="token number">0.1</span>,</div></li><li><div class="hoverable collapsed"><span class="token number">0.1</span>,</div></li><li><div class="hoverable collapsed"><span class="token number">0.1</span>,</div></li><li><div class="hoverable collapsed"><span class="token number">0.1</span></div></li></ul><span class="token punctuation">]</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"images"</span>: <button class="collapser" aria-label="collapse"></button><span class="token punctuation">[</span><span class="ellipsis"></span><ul class="array collapsible"><li><div class="hoverable collapsed"><button class="collapser" aria-label="expand"></button><span class="token punctuation">{</span><span class="ellipsis"></span><ul class="obj collapsible"><li><div class="hoverable collapsed"><span class="property token string">"efficiency"</span>: <span class="token number">0.1</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"number"</span>: <span class="token number">0</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"nx"</span>: <span class="token number">0</span><span class="token punctuation">,</span></div></li><li><div Line truncated
</div><div tabindex="0" role="button"><div class="sc-xKhEK okJpy"><span>http://localhost:5232</span>/result/scan</div></div></div></div></div><div><h3 class="sc-lgpSej drJHMo"> <!-- -->Response samples<!-- --> </h3><div class="sc-cOpnSz fyxuKi" data-rttabs="true"><ul class="react-tabs__tab-list" role="tablist"><li class="tab-success react-tabs__tab--selected" role="tab" id="tab:R9pqq:0" aria-selected="true" aria-disabled="false" aria-controls="panel:R9pqq:0" tabindex="0" data-rttab="true">200</li><li class="tab-error" role="tab" id="tab:R9pqq:1" aria-selected="false" aria-disabled="false" aria-controls="panel:R9pqq:1" data-rttab="true">500</li></ul><div class="react-tabs__tab-panel react-tabs__tab-panel--selected" role="tabpanel" id="panel:R9pqq:0" aria-labelledby="tab:R9pqq:0"><div><div class="sc-bSFBcf iLdyBp"><span class="sc-gahYZc cXitJ">Content type</span><div class="sc-bAehkN iNRAJK">application/json</div></div><div class="sc-blIAwI eKKwxo"><div class="sc-dClGHI fdRrNy"><div class="sc-bbbBoY bBWkcI"><button><div class="sc-fYmhhH iNCOCX">Copy</div></button><button> Expand all </button><button> Collapse all </button></div><div tabindex="0" class="sc-eVqvcJ kIppRw sc-fhfEft dFvLDb"><div class="redoc-json"><code><button class="collapser" aria-label="collapse"></button><span class="token punctuation">{</span><span class="ellipsis"></span><ul class="obj collapsible"><li><div class="hoverable "><span class="property token string">"file_prefix"</span>: <span class="token string">&quot;string&quot;</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"rotation_unit_cell"</span>: <button class="collapser" aria-label="collapse"></button><span class="token punctuation">{</span><span class="ellipsis"></span><ul class="obj collapsible"><li><div class="hoverable collapsed"><span class="property token string">"a"</span>: <span class="token number">37</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"b"</span>: <span class="token number">37</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"c"</span>: <span class="token number">78</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"alpha"</span>: <span class="token number">90</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"beta"</span>: <span class="token number">90</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"gamma"</span>: <span class="token number">90</span></div></li></ul><span class="token punctuation">}</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"rotation_crystal_lattice"</span>: <button class="collapser" aria-label="collapse"></button><span class="token punctuation">[</span><span class="ellipsis"></span><ul class="array collapsible"><li><div class="hoverable collapsed"><span class="token number">0.1</span>,</div></li><li><div class="hoverable collapsed"><span class="token number">0.1</span>,</div></li><li><div class="hoverable collapsed"><span class="token number">0.1</span>,</div></li><li><div class="hoverable collapsed"><span class="token number">0.1</span>,</div></li><li><div class="hoverable collapsed"><span class="token number">0.1</span>,</div></li><li><div class="hoverable collapsed"><span class="token number">0.1</span>,</div></li><li><div class="hoverable collapsed"><span class="token number">0.1</span>,</div></li><li><div class="hoverable collapsed"><span class="token number">0.1</span>,</div></li><li><div class="hoverable collapsed"><span class="token number">0.1</span></div></li></ul><span class="token punctuation">]</span><span class="token punctuation">,</span></div></li><li><div class="hoverable "><span class="property token string">"images"</span>: <button class="collapser" aria-label="collapse"></button><span class="token punctuation">[</span><span class="ellipsis"></span><ul class="array collapsible"><li><div class="hoverable collapsed"><button class="collapser" aria-label="expand"></button><span class="token punctuation">{</span><span class="ellipsis"></span><ul class="obj collapsible"><li><div class="hoverable collapsed"><span class="property token string">"efficiency"</span>: <span class="token number">0.1</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"number"</span>: <span class="token number">0</span><span class="token punctuation">,</span></div></li><li><div class="hoverable collapsed"><span class="property token string">"nx"</span>: <span class="token number">0</span><span class="token punctuation">,</span></Line truncated
" class="sc-eVqvcJ sc-fszimp kIppRw kbZred"><p>Contains metadata for a dataset (e.g., experimental geometry)</p>
</div></div><div><h3 class="sc-gDzyrw kjrVcG">Responses</h3><div><button class="sc-jIDBmd lkmdtA"><svg class="sc-dntSTA cGxVlA" version="1.1" viewBox="0 0 24 24" x="0" xmlns="http://www.w3.org/2000/svg" y="0" aria-hidden="true"><polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "></polygon></svg><strong class="sc-eJvlPh fBhAXU">200<!-- --> </strong><div html="&lt;p&gt;Return start message&lt;/p&gt;
" class="sc-eVqvcJ sc-fszimp sc-etsjJW kIppRw jnwENr ljKHqG"><p>Return start message</p>
@@ -1405,7 +1405,7 @@ then image might be replaced in the buffer between calling /images and /image.cb
" class="sc-eVqvcJ sc-fszimp kIppRw drqpJr"><p>Test Jungfraujoch system</p>
</div><div tabindex="0" role="button"><div class="sc-xKhEK okJpy"><span>http://localhost:5232</span>/version</div></div></div></div></div></div></div></div></div><div class="sc-evkzZa iZqpqg"></div></div></div>
<script>
const __redoc_state = {"menu":{"activeItemIdx":-1},"spec":{"data":{"openapi":"3.0.3","info":{"title":"Jungfraujoch","description":"API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland).\nJungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU.\nJungfraujoch uses FPGA boards to acquire data at high data rates.\n\n# License Clarification\n\nWhile this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply**\nwhen this file is used solely to generate OpenAPI clients or when implementing applications that\ninteract with the API. Generated client code and applications using this API definition are not\nsubject to the GPL license requirements and may be distributed under terms of your choosing.\n\nThis exception is similar in spirit to the Linux Kernel's approach to userspace API headers and\nthe GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that\nuser programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not\nderivative works of the kernel and are not subject to the terms of the GPL.\n\nThis exception is intended to allow wider use of this API specification without imposing GPL\nrequirements on applications that merely interact with the API, regardless of whether they\ncommunicate through network calls or other mechanisms.\n","version":"1.0.0-rc.113","contact":{"name":"Filip Leonarski (Paul Scherrer Institute)","email":"filip.leonarski@psi.ch"},"license":{"name":"GPL-3.0","url":"https://www.gnu.org/licenses/gpl-3.0.html"}},"servers":[{"url":"http://localhost:5232","description":"Test Jungfraujoch system"}],"components":{"parameters":{"binning":{"in":"query","name":"binning","required":false,"schema":{"type":"integer"},"description":"Binning of frames for the plot (0 = default binning)"},"compression":{"in":"query","name":"compression","required":false,"schema":{"type":"boolean","default":false},"description":"Enable DEFLATE compression of output data."},"experimental_coord":{"in":"query","name":"experimental_coord","required":false,"schema":{"type":"boolean","default":false},"description":"If measurement has goniometer axis defined, plot X-axis will represent rotation angle\nIf measurement has grid scan defined, plot X-axis and Y-axis will represent grid position, Z will be used as the final value\nFor still measurement the number is ignored\n"},"azint_unit":{"in":"query","name":"azint_unit","required":false,"schema":{"type":"string","enum":["Q_recipA","d_A","two_theta_deg"],"default":"Q_recipA"},"description":"Unit used for azim int.\n"},"fill_value":{"in":"query","name":"fill","required":false,"schema":{"type":"number","format":"float"},"description":"Fill value for elements that were missed during data collection\n"},"plot_type":{"in":"query","name":"type","required":true,"description":"Type of requested plot","schema":{"type":"string","enum":["bkg_estimate","azint","azint_1d","spot_count","spot_count_low_res","spot_count_indexed","spot_count_ice","indexing_rate","indexing_time","indexing_unit_cell_length","indexing_unit_cell_angle","profile_radius","b_factor","error_pixels","saturated_pixels","image_collection_efficiency","receiver_delay","receiver_free_send_buf","strong_pixels","roi_sum","roi_mean","roi_max_count","roi_pixels","roi_weighted_x","roi_weighted_y","packets_received","max_pixel_value","resolution_estimate","pixel_sum","processing_time","beam_center_x","beam_center_y"]}},"roi":{"in":"query","name":"roi","required":false,"schema":{"type":"string","minLength":1},"description":"Name of ROI for which plot is requested"},"image_id":{"in":"query","name":"id","required":false,"schema":{"type":"integer","format":"int64","default":-1,"minimum":-2},"description":"Image ID in the image buffer. Special values: -1 - last image in the buffer, -2: last indexed image in the buffer"},"saturation":{"in":"query","name":"saturation","required":false,"schema":{"type":"number","format":"float","minimum":-32767,"maximum":32767},"description":"Saturation value to set contrast in the preview image; if not provided, then autocontrast procedure is used"},"background":{"in":"query","name":"background","required":false,"schema":{"type":"number","format":"float","default":0,"minimum":-32767,"maximum":32767},"description":"Background value to set contrast in the preview image"},"show_spots":{"in":"query","name":"show_spots","schema":{"type":"boolean","default":true},"description":"Show spot finding results on the image"},"show_beam_center":{"in":"query","name":"show_beam_center","schema":{"type":"boolean","default":true},"description":"Show beam center on the image"},"show_roi":{"in":"query","name":"show_roi","schema":{"type":"boolean","default":false},"description":"Show ROI areas on the image"},"jpeg_quality":{"in":"query","name":"jpeg_quality","description":"Quality of JPEG image (100 - highest; 0 - lowest)","schema":{"type":"integer","format":Line truncated
const __redoc_state = {"menu":{"activeItemIdx":-1},"spec":{"data":{"openapi":"3.0.3","info":{"title":"Jungfraujoch","description":"API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland).\nJungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU.\nJungfraujoch uses FPGA boards to acquire data at high data rates.\n\n# License Clarification\n\nWhile this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply**\nwhen this file is used solely to generate OpenAPI clients or when implementing applications that\ninteract with the API. Generated client code and applications using this API definition are not\nsubject to the GPL license requirements and may be distributed under terms of your choosing.\n\nThis exception is similar in spirit to the Linux Kernel's approach to userspace API headers and\nthe GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that\nuser programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not\nderivative works of the kernel and are not subject to the terms of the GPL.\n\nThis exception is intended to allow wider use of this API specification without imposing GPL\nrequirements on applications that merely interact with the API, regardless of whether they\ncommunicate through network calls or other mechanisms.\n","version":"1.0.0-rc.113","contact":{"name":"Filip Leonarski (Paul Scherrer Institute)","email":"filip.leonarski@psi.ch"},"license":{"name":"GPL-3.0","url":"https://www.gnu.org/licenses/gpl-3.0.html"}},"servers":[{"url":"http://localhost:5232","description":"Test Jungfraujoch system"}],"components":{"parameters":{"binning":{"in":"query","name":"binning","required":false,"schema":{"type":"integer"},"description":"Binning of frames for the plot (0 = default binning)"},"compression":{"in":"query","name":"compression","required":false,"schema":{"type":"boolean","default":false},"description":"Enable DEFLATE compression of output data."},"experimental_coord":{"in":"query","name":"experimental_coord","required":false,"schema":{"type":"boolean","default":false},"description":"If measurement has goniometer axis defined, plot X-axis will represent rotation angle\nIf measurement has grid scan defined, plot X-axis and Y-axis will represent grid position, Z will be used as the final value\nFor still measurement the number is ignored\n"},"azint_unit":{"in":"query","name":"azint_unit","required":false,"schema":{"type":"string","enum":["Q_recipA","d_A","two_theta_deg"],"default":"Q_recipA"},"description":"Unit used for azim int.\n"},"fill_value":{"in":"query","name":"fill","required":false,"schema":{"type":"number","format":"float"},"description":"Fill value for elements that were missed during data collection\n"},"plot_type":{"in":"query","name":"type","required":true,"description":"Type of requested plot","schema":{"type":"string","enum":["bkg_estimate","azint","azint_1d","spot_count","spot_count_low_res","spot_count_indexed","spot_count_ice","indexing_rate","indexing_time","indexing_unit_cell_length","indexing_unit_cell_angle","profile_radius","b_factor","error_pixels","saturated_pixels","image_collection_efficiency","receiver_delay","receiver_free_send_buf","strong_pixels","roi_sum","roi_mean","roi_max_count","roi_pixels","roi_weighted_x","roi_weighted_y","packets_received","max_pixel_value","resolution_estimate","pixel_sum","processing_time","beam_center_x","beam_center_y"]}},"roi":{"in":"query","name":"roi","required":false,"schema":{"type":"string","minLength":1},"description":"Name of ROI for which plot is requested"},"image_id":{"in":"query","name":"id","required":false,"schema":{"type":"integer","format":"int64","default":-1,"minimum":-2},"description":"Image ID in the image buffer. Special values: -1 - last image in the buffer, -2: last indexed image in the buffer"},"saturation":{"in":"query","name":"saturation","required":false,"schema":{"type":"number","format":"float","minimum":-32767,"maximum":32767},"description":"Saturation value to set contrast in the preview image; if not provided, then autocontrast procedure is used"},"background":{"in":"query","name":"background","required":false,"schema":{"type":"number","format":"float","default":0,"minimum":-32767,"maximum":32767},"description":"Background value to set contrast in the preview image"},"show_spots":{"in":"query","name":"show_spots","schema":{"type":"boolean","default":true},"description":"Show spot finding results on the image"},"show_beam_center":{"in":"query","name":"show_beam_center","schema":{"type":"boolean","default":true},"description":"Show beam center on the image"},"show_roi":{"in":"query","name":"show_roi","schema":{"type":"boolean","default":false},"description":"Show ROI areas on the image"},"jpeg_quality":{"in":"query","name":"jpeg_quality","description":"Quality of JPEG image (100 - highest; 0 - lowest)","schema":{"type":"integer","format":Line truncated
var container = document.getElementById('redoc');
Redoc.hydrate(__redoc_state, container);
+3
View File
@@ -10,6 +10,7 @@
#include <optional>
#include <string>
#include "CrystalLattice.h"
#include "UnitCell.h"
struct ScanResultElem {
@@ -40,6 +41,8 @@ struct ScanResultElem {
struct ScanResult {
std::string file_prefix;
std::vector<ScanResultElem> images;
std::optional<CrystalLattice> rotation_lattice;
};
#endif //JFJOCH_SCANRESULT_H
+2 -2
View File
@@ -7,8 +7,8 @@ Results of a scan
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**file_prefix** | **str** | | [optional]
**unit_cell** | [**UnitCell**](UnitCell.md) | | [optional]
**crystal_lattice** | **List[float]** | 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) | [optional]
**rotation_unit_cell** | [**UnitCell**](UnitCell.md) | | [optional]
**rotation_crystal_lattice** | **List[float]** | 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) | [optional]
**images** | [**List[ScanResultImagesInner]**](ScanResultImagesInner.md) | |
## Example
+2 -2
View File
@@ -11,8 +11,8 @@ import type { unit_cell } from './unit_cell';
*/
export type scan_result = {
file_prefix?: string;
unit_cell?: unit_cell;
crystal_lattice?: crystal_lattice;
rotation_unit_cell?: unit_cell;
rotation_crystal_lattice?: crystal_lattice;
images: Array<{
efficiency: number;
/**
+12
View File
@@ -154,6 +154,17 @@ void JFJochReceiver::SendEndMessage() {
message.az_int_result["dataset"] = plots.GetAzIntProfile();
const auto rotation_indexer_ret = indexer.Finalize(true);
if (rotation_indexer_ret.has_value()) {
message.rotation_lattice = rotation_indexer_ret->lattice;
message.rotation_lattice_type = LatticeMessage{
.centering = rotation_indexer_ret->search_result.centering,
.niggli_class = rotation_indexer_ret->search_result.niggli_class,
.crystal_system = rotation_indexer_ret->search_result.system
};
rotation_indexing_lattice = rotation_indexer_ret->lattice;
}
for (int i = 0; i < adu_histogram_module.size(); i++)
message.adu_histogram["module" + std::to_string(i)] = adu_histogram_module[i]->GetHistogram();
@@ -180,6 +191,7 @@ JFJochReceiverOutput JFJochReceiver::GetFinalStatistics() const {
ret.status = GetStatus();
ret.writer_err = writer_error;
ret.scan_result = scan_result.GetResult();
ret.scan_result.rotation_lattice = rotation_indexing_lattice;
return ret;
}
+1
View File
@@ -86,6 +86,7 @@ protected:
std::mutex max_delay_mutex;
IndexAndRefine indexer;
std::optional<CrystalLattice> rotation_indexing_lattice;
std::string writer_error;