All checks were successful
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 12m8s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m57s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 12m55s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 12m0s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 13m30s
Build Packages / Generate python client (push) Successful in 20s
Build Packages / Unit tests (push) Has been skipped
Build Packages / Create release (push) Has been skipped
Build Packages / Build documentation (push) Successful in 39s
Build Packages / build:rpm (rocky8) (push) Successful in 9m23s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 10m33s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 8m2s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 8m42s
Build Packages / build:rpm (rocky9) (push) Successful in 9m38s
This is an UNSTABLE release. This version adds scalign and merging. These are experimental at the moment, and should not be used for production analysis. If things go wrong with analysis, it is better to revert to 1.0.0-rc.124. * jfjoch_broker: Improve logic on switching on/off spot finding * jfjoch_broker: Increase maximum spot count for FFBIDX to 65536 * jfjoch_broker: Increase default maximum unit cell for FFT to 500 A (could have performance impact, TBD) * jfjoch_process: Add scalign and merging functionality - program is experimental at the moment and should not be used for production analysis * jfjoch_viewer: Display partiality and reciprocal Lorentz-polarization correction for each reflection * jfjoch_writer: Save more information about each reflection Reviewed-on: #32 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch> Co-committed-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.125
|
|
* 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
|
|
|