Build Packages / Create release (push) Successful in 17s
Build Packages / build:viewer:macos-arm64:nocuda (push) Successful in 3m22s
Build Packages / build:rugnux:macos-arm64:nocuda (push) Successful in 2m37s
Build Packages / build:rugnux:linux-aarch64:cuda (push) Successful in 9m33s
Build Packages / build:rugnux:linux-x86_64:cuda (push) Successful in 10m39s
Build Packages / build:viewer:linux-x86_64:nocuda (push) Successful in 11m4s
Build Packages / build:viewer:linux-x86_64:cuda (push) Successful in 13m19s
Build Packages / build:jfjoch:rocky8:nocuda (push) Successful in 17m37s
Build Packages / build:jfjoch:rocky9:nocuda (push) Successful in 18m49s
Build Packages / build:viewer:windows-x86_64:nocuda (push) Successful in 19m10s
Build Packages / build:viewer:windows-x86_64:cuda (push) Successful in 24m26s
Build Packages / HDF5 consumer tests (DIALS, XDS) (push) Successful in 25m31s
Build Packages / build:jfjoch:ubuntu2404:nocuda (push) Successful in 18m54s
Build Packages / build:jfjoch:ubuntu2204:nocuda (push) Successful in 20m45s
Build Packages / Generate python client (push) Successful in 37s
Build Packages / build:jfjoch:rocky8:cuda-sls9 (push) Successful in 20m20s
Build Packages / Build documentation (push) Successful in 1m32s
Build Packages / build:rugnux:windows-x86_64:cuda (push) Successful in 14m37s
Build Packages / build:jfjoch:rocky9:cuda-sls9 (push) Successful in 21m6s
Build Packages / build:jfjoch:rocky8:cuda (push) Successful in 19m49s
Build Packages / build:jfjoch:rocky9:cuda (push) Successful in 20m29s
Build Packages / build:jfjoch:ubuntu2204:cuda (push) Successful in 17m2s
Build Packages / build:jfjoch:ubuntu2404:cuda (push) Successful in 14m27s
Build Packages / Unit tests (push) Successful in 1h18m12s
* Rugnux: Performance improvements on GPU and CPU (more of the pre-scan and of scaling on the GPU, faster CPU spot finding and crystal refinement), with unchanged results. * Rugnux: More robust processing - patches of persistently hot pixels are masked, an inconsistent merge triggers a retry at the measured beam centre, and builds targeting different CPU levels give the same results. * Rugnux: Improved scaling and merging - reflections with an overloaded pixel are dropped, as in XDS, sparse rotation sweeps are scaled more reliably, and French-Wilson amplitudes use an anisotropic Wilson prior. * Rugnux: Improved space-group determination - glide planes in groups without a centre of symmetry, screw axes from short or weak axial rows kept when a higher group is adopted, and more reliable decisions on twinned and pseudo-symmetric crystals. * Rugnux: Improved small-molecule processing - spots that grow wider than the integration disk and split spots are integrated over their measured footprint, sparse lattices are integrated on every frame, and the `.hkl` file holds unmerged scaled reflections (SHELX HKLF 4). * Rugnux: Reads Rigaku d*TREK SMV images (Saturn CCD), including detector 2theta and encoded pixel overflows; home-source (rotating-anode) datasets were added to the validation battery. * jfjoch_viewer: Fixed processing failing at the end with "Wrong JPEG library version" on Linux; the merge window shows the space group with proper subscripts and a checklist of crystal pathologies. Reviewed-on: #84 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
207 lines
6.2 KiB
C++
207 lines
6.2 KiB
C++
/**
|
|
* Jungfraujoch
|
|
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
|
|
*
|
|
* The version of the OpenAPI document: 1.0.0-rc.174
|
|
* Contact: filip.leonarski@psi.ch
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
|
|
#include "Pixel_mask_statistics.h"
|
|
#include "Helpers.h"
|
|
|
|
#include <sstream>
|
|
|
|
namespace org::openapitools::server::model
|
|
{
|
|
|
|
Pixel_mask_statistics::Pixel_mask_statistics()
|
|
{
|
|
m_User_mask = 0L;
|
|
m_User_maskIsSet = false;
|
|
m_Too_high_pedestal_rms = 0L;
|
|
m_Too_high_pedestal_rmsIsSet = false;
|
|
m_Wrong_gain = 0L;
|
|
m_Wrong_gainIsSet = false;
|
|
|
|
}
|
|
|
|
void Pixel_mask_statistics::validate() const
|
|
{
|
|
std::stringstream msg;
|
|
if (!validate(msg))
|
|
{
|
|
throw org::openapitools::server::helpers::ValidationException(msg.str());
|
|
}
|
|
}
|
|
|
|
bool Pixel_mask_statistics::validate(std::stringstream& msg) const
|
|
{
|
|
return validate(msg, "");
|
|
}
|
|
|
|
bool Pixel_mask_statistics::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
|
{
|
|
bool success = true;
|
|
const std::string _pathPrefix = pathPrefix.empty() ? "Pixel_mask_statistics" : pathPrefix;
|
|
|
|
|
|
if (userMaskIsSet())
|
|
{
|
|
const int64_t& value = m_User_mask;
|
|
const std::string currentValuePath = _pathPrefix + ".userMask";
|
|
|
|
|
|
if (value < 0ll)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 0;";
|
|
}
|
|
|
|
}
|
|
|
|
if (tooHighPedestalRmsIsSet())
|
|
{
|
|
const int64_t& value = m_Too_high_pedestal_rms;
|
|
const std::string currentValuePath = _pathPrefix + ".tooHighPedestalRms";
|
|
|
|
|
|
if (value < 0ll)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 0;";
|
|
}
|
|
|
|
}
|
|
|
|
if (wrongGainIsSet())
|
|
{
|
|
const int64_t& value = m_Wrong_gain;
|
|
const std::string currentValuePath = _pathPrefix + ".wrongGain";
|
|
|
|
|
|
if (value < 0ll)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 0;";
|
|
}
|
|
|
|
}
|
|
|
|
return success;
|
|
}
|
|
|
|
bool Pixel_mask_statistics::operator==(const Pixel_mask_statistics& rhs) const
|
|
{
|
|
return
|
|
|
|
|
|
|
|
((!userMaskIsSet() && !rhs.userMaskIsSet()) || (userMaskIsSet() && rhs.userMaskIsSet() && getUserMask() == rhs.getUserMask())) &&
|
|
|
|
|
|
((!tooHighPedestalRmsIsSet() && !rhs.tooHighPedestalRmsIsSet()) || (tooHighPedestalRmsIsSet() && rhs.tooHighPedestalRmsIsSet() && getTooHighPedestalRms() == rhs.getTooHighPedestalRms())) &&
|
|
|
|
|
|
((!wrongGainIsSet() && !rhs.wrongGainIsSet()) || (wrongGainIsSet() && rhs.wrongGainIsSet() && getWrongGain() == rhs.getWrongGain()))
|
|
|
|
;
|
|
}
|
|
|
|
bool Pixel_mask_statistics::operator!=(const Pixel_mask_statistics& rhs) const
|
|
{
|
|
return !(*this == rhs);
|
|
}
|
|
|
|
void to_json(nlohmann::json& j, const Pixel_mask_statistics& o)
|
|
{
|
|
j = nlohmann::json::object();
|
|
if(o.userMaskIsSet())
|
|
j["user_mask"] = o.m_User_mask;
|
|
if(o.tooHighPedestalRmsIsSet())
|
|
j["too_high_pedestal_rms"] = o.m_Too_high_pedestal_rms;
|
|
if(o.wrongGainIsSet())
|
|
j["wrong_gain"] = o.m_Wrong_gain;
|
|
|
|
}
|
|
|
|
void from_json(const nlohmann::json& j, Pixel_mask_statistics& o)
|
|
{
|
|
if(j.find("user_mask") != j.end())
|
|
{
|
|
j.at("user_mask").get_to(o.m_User_mask);
|
|
o.m_User_maskIsSet = true;
|
|
}
|
|
if(j.find("too_high_pedestal_rms") != j.end())
|
|
{
|
|
j.at("too_high_pedestal_rms").get_to(o.m_Too_high_pedestal_rms);
|
|
o.m_Too_high_pedestal_rmsIsSet = true;
|
|
}
|
|
if(j.find("wrong_gain") != j.end())
|
|
{
|
|
j.at("wrong_gain").get_to(o.m_Wrong_gain);
|
|
o.m_Wrong_gainIsSet = true;
|
|
}
|
|
|
|
}
|
|
|
|
int64_t Pixel_mask_statistics::getUserMask() const
|
|
{
|
|
return m_User_mask;
|
|
}
|
|
void Pixel_mask_statistics::setUserMask(int64_t const value)
|
|
{
|
|
m_User_mask = value;
|
|
m_User_maskIsSet = true;
|
|
}
|
|
bool Pixel_mask_statistics::userMaskIsSet() const
|
|
{
|
|
return m_User_maskIsSet;
|
|
}
|
|
void Pixel_mask_statistics::unsetUser_mask()
|
|
{
|
|
m_User_maskIsSet = false;
|
|
}
|
|
int64_t Pixel_mask_statistics::getTooHighPedestalRms() const
|
|
{
|
|
return m_Too_high_pedestal_rms;
|
|
}
|
|
void Pixel_mask_statistics::setTooHighPedestalRms(int64_t const value)
|
|
{
|
|
m_Too_high_pedestal_rms = value;
|
|
m_Too_high_pedestal_rmsIsSet = true;
|
|
}
|
|
bool Pixel_mask_statistics::tooHighPedestalRmsIsSet() const
|
|
{
|
|
return m_Too_high_pedestal_rmsIsSet;
|
|
}
|
|
void Pixel_mask_statistics::unsetToo_high_pedestal_rms()
|
|
{
|
|
m_Too_high_pedestal_rmsIsSet = false;
|
|
}
|
|
int64_t Pixel_mask_statistics::getWrongGain() const
|
|
{
|
|
return m_Wrong_gain;
|
|
}
|
|
void Pixel_mask_statistics::setWrongGain(int64_t const value)
|
|
{
|
|
m_Wrong_gain = value;
|
|
m_Wrong_gainIsSet = true;
|
|
}
|
|
bool Pixel_mask_statistics::wrongGainIsSet() const
|
|
{
|
|
return m_Wrong_gainIsSet;
|
|
}
|
|
void Pixel_mask_statistics::unsetWrong_gain()
|
|
{
|
|
m_Wrong_gainIsSet = false;
|
|
}
|
|
|
|
|
|
} // namespace org::openapitools::server::model
|
|
|