Build Packages / build:rpm (rocky8) (push) Successful in 24m0s
Build Packages / Unit tests (push) Skipped
Build Packages / build:windows:nocuda (push) Successful in 16m54s
Build Packages / build:windows:cuda (push) Successful in 19m25s
Build Packages / build:viewer-tgz:cpu (push) Successful in 14m44s
Build Packages / build:viewer-tgz:cuda (push) Successful in 16m3s
Build Packages / build:rugnux-tgz (x86_64) (push) Successful in 13m15s
Build Packages / build:rugnux:windows (push) Successful in 10m45s
Build Packages / build:rugnux:aarch64 (cross) (push) Successful in 9m34s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 19m7s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 18m9s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 24m48s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 18m13s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 24m51s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 22m58s
Build Packages / build:rpm (rocky9) (push) Successful in 21m23s
Build Packages / Generate python client (push) Successful in 1m2s
Build Packages / Build documentation (push) Successful in 1m23s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (durin plugin) (push) Successful in 9m45s
Build Packages / XDS test (neggia plugin) (push) Successful in 10m19s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 11m10s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 22m15s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 17m37s
Build Packages / DIALS test (push) Successful in 17m16s
* `rugnux --model` adopts the model's space group as a label where the data were merged in its enantiomorph, instead of reindexing the reflections - which swapped I(+) with I(-). * `rugnux --model` warns, naming the atom, when the anomalous density at the model's atoms comes out inverted, which means the data and the model are in opposite hands. * `rugnux --model` writes an anomalous difference map (`<prefix>_anom.ccp4`) when the merge kept the Bijvoet split, and names the ten model atoms it peaks highest on as `ANOMALOUS_SITE_01`..`_10`. * `MEAN_ATOM_DENSITY_SIGMA` is read from the map by cubic rather than linear interpolation and comes out around a tenth higher; it is no longer comparable with the figure earlier versions printed. * `rugnux --model` reads an mmCIF coordinate file as well as a PDB one, gzipped or not, taking the format from the file's content rather than its name. * A model `rugnux --model` cannot use is reported as a `WARNING:` line in the results report instead of only in the log. * The rugnux results report has a `10. MODEL VALIDATION` section when `--model` was given; `REPORT_VERSION` is 4, `WARNINGS` moves to section 11 and no existing key changed. * The rugnux results report records how the run was invoked, what it cost and what it ran on: `COMMAND_LINE=`, `WALL_TIME=` and `GPU_COUNT=` / `GPU=`. * rugnux says which GPUs it can see before it starts processing. * `rugnux --export-unmerged` also writes `<prefix>_unmerged.mtz` on a `--no-merge` run, and is ignored on a run with no output prefix instead of writing a file called `_unmerged.mtz`. * `/start` asks the writer whether the run can be written before the detector is armed, so a run whose master file already exists, or whose output directory cannot be created, is refused up front with the writer's own message. This needs the TCP image stream or the built-in HDF5 writer; the ZeroMQ stream is unchanged. * A calibration that fails goes to `Error` carrying the reason instead of `Inactive`, so `/wait_till_done` and `/wait_until_running` report it; a cancelled calibration still goes to `Inactive`. * `/wait_till_done` answers 500 with the message when a collection ended in an error. A cancelled collection and a collection that only triggered a warning still answer 200. * A pending start failure is discarded by `/cancel` and `/deactivate`, as it already was by `/start` and `/initialize`. * `/scan_result` no longer reports the previous run's images after a collection that failed to start, or after `/deactivate`. * The TCP image stream protocol version is 4. `jfjoch_writer` and `jfjoch_broker` have to be of the same release, as before. Reviewed-on: #75
456 lines
14 KiB
C++
456 lines
14 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.165
|
|
* 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 "Indexing_settings.h"
|
|
#include "Helpers.h"
|
|
|
|
#include <sstream>
|
|
|
|
namespace org::openapitools::server::model
|
|
{
|
|
|
|
Indexing_settings::Indexing_settings()
|
|
{
|
|
m_Fft_max_unit_cell_A = 250.0f;
|
|
m_Fft_min_unit_cell_A = 10.0f;
|
|
m_Fft_high_resolution_A = 2.0f;
|
|
m_Fft_num_vectors = 16384L;
|
|
m_Tolerance = 0.0f;
|
|
m_Thread_count = 0L;
|
|
m_Unit_cell_dist_tolerance = 0.05f;
|
|
m_Viable_cell_min_spots = 10L;
|
|
m_Index_ice_rings = false;
|
|
m_Rotation_indexing = false;
|
|
m_Rotation_indexing_min_angular_range_deg = 20.0f;
|
|
m_Rotation_indexing_angular_stride_deg = 0.5f;
|
|
m_Blocking = true;
|
|
|
|
}
|
|
|
|
void Indexing_settings::validate() const
|
|
{
|
|
std::stringstream msg;
|
|
if (!validate(msg))
|
|
{
|
|
throw org::openapitools::server::helpers::ValidationException(msg.str());
|
|
}
|
|
}
|
|
|
|
bool Indexing_settings::validate(std::stringstream& msg) const
|
|
{
|
|
return validate(msg, "");
|
|
}
|
|
|
|
bool Indexing_settings::validate(std::stringstream& msg, const std::string& pathPrefix) const
|
|
{
|
|
bool success = true;
|
|
const std::string _pathPrefix = pathPrefix.empty() ? "Indexing_settings" : pathPrefix;
|
|
|
|
|
|
|
|
/* Fft_max_unit_cell_A */ {
|
|
const float& value = m_Fft_max_unit_cell_A;
|
|
const std::string currentValuePath = _pathPrefix + ".fftMaxUnitCellA";
|
|
|
|
|
|
if (value < static_cast<float>(50))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 50;";
|
|
}
|
|
if (value > static_cast<float>(500))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be less than or equal to 500;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Fft_min_unit_cell_A */ {
|
|
const float& value = m_Fft_min_unit_cell_A;
|
|
const std::string currentValuePath = _pathPrefix + ".fftMinUnitCellA";
|
|
|
|
|
|
if (value < static_cast<float>(5))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 5;";
|
|
}
|
|
if (value > static_cast<float>(40))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be less than or equal to 40;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Fft_high_resolution_A */ {
|
|
const float& value = m_Fft_high_resolution_A;
|
|
const std::string currentValuePath = _pathPrefix + ".fftHighResolutionA";
|
|
|
|
|
|
if (value < static_cast<float>(0.5))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 0.5;";
|
|
}
|
|
if (value > static_cast<float>(6.0))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be less than or equal to 6.0;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Fft_num_vectors */ {
|
|
const int64_t& value = m_Fft_num_vectors;
|
|
const std::string currentValuePath = _pathPrefix + ".fftNumVectors";
|
|
|
|
|
|
if (value < 128ll)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 128;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Tolerance */ {
|
|
const float& value = m_Tolerance;
|
|
const std::string currentValuePath = _pathPrefix + ".tolerance";
|
|
|
|
|
|
if (value < static_cast<float>(0.0))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 0.0;";
|
|
}
|
|
if (value > static_cast<float>(0.5))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be less than or equal to 0.5;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Thread_count */ {
|
|
const int64_t& value = m_Thread_count;
|
|
const std::string currentValuePath = _pathPrefix + ".threadCount";
|
|
|
|
|
|
if (value < 1ll)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 1;";
|
|
}
|
|
if (value > 64ll)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be less than or equal to 64;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Unit_cell_dist_tolerance */ {
|
|
const float& value = m_Unit_cell_dist_tolerance;
|
|
const std::string currentValuePath = _pathPrefix + ".unitCellDistTolerance";
|
|
|
|
|
|
if (value < static_cast<float>(0.00010))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 0.00010;";
|
|
}
|
|
if (value > static_cast<float>(0.2001))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be less than or equal to 0.2001;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Viable_cell_min_spots */ {
|
|
const int64_t& value = m_Viable_cell_min_spots;
|
|
const std::string currentValuePath = _pathPrefix + ".viableCellMinSpots";
|
|
|
|
|
|
if (value < 5ll)
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 5;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Rotation_indexing_min_angular_range_deg */ {
|
|
const float& value = m_Rotation_indexing_min_angular_range_deg;
|
|
const std::string currentValuePath = _pathPrefix + ".rotationIndexingMinAngularRangeDeg";
|
|
|
|
|
|
if (value < static_cast<float>(1.0))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 1.0;";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Rotation_indexing_angular_stride_deg */ {
|
|
const float& value = m_Rotation_indexing_angular_stride_deg;
|
|
const std::string currentValuePath = _pathPrefix + ".rotationIndexingAngularStrideDeg";
|
|
|
|
|
|
if (value < static_cast<float>(0))
|
|
{
|
|
success = false;
|
|
msg << currentValuePath << ": must be greater than or equal to 0;";
|
|
}
|
|
|
|
}
|
|
|
|
return success;
|
|
}
|
|
|
|
bool Indexing_settings::operator==(const Indexing_settings& rhs) const
|
|
{
|
|
return
|
|
|
|
|
|
(getAlgorithm() == rhs.getAlgorithm())
|
|
&&
|
|
|
|
(getFftMaxUnitCellA() == rhs.getFftMaxUnitCellA())
|
|
&&
|
|
|
|
(getFftMinUnitCellA() == rhs.getFftMinUnitCellA())
|
|
&&
|
|
|
|
(getFftHighResolutionA() == rhs.getFftHighResolutionA())
|
|
&&
|
|
|
|
(getFftNumVectors() == rhs.getFftNumVectors())
|
|
&&
|
|
|
|
(getTolerance() == rhs.getTolerance())
|
|
&&
|
|
|
|
(getThreadCount() == rhs.getThreadCount())
|
|
&&
|
|
|
|
(getGeomRefinementAlgorithm() == rhs.getGeomRefinementAlgorithm())
|
|
&&
|
|
|
|
(getUnitCellDistTolerance() == rhs.getUnitCellDistTolerance())
|
|
&&
|
|
|
|
(getViableCellMinSpots() == rhs.getViableCellMinSpots())
|
|
&&
|
|
|
|
(isIndexIceRings() == rhs.isIndexIceRings())
|
|
&&
|
|
|
|
(isRotationIndexing() == rhs.isRotationIndexing())
|
|
&&
|
|
|
|
(getRotationIndexingMinAngularRangeDeg() == rhs.getRotationIndexingMinAngularRangeDeg())
|
|
&&
|
|
|
|
(getRotationIndexingAngularStrideDeg() == rhs.getRotationIndexingAngularStrideDeg())
|
|
&&
|
|
|
|
(isBlocking() == rhs.isBlocking())
|
|
|
|
|
|
;
|
|
}
|
|
|
|
bool Indexing_settings::operator!=(const Indexing_settings& rhs) const
|
|
{
|
|
return !(*this == rhs);
|
|
}
|
|
|
|
void to_json(nlohmann::json& j, const Indexing_settings& o)
|
|
{
|
|
j = nlohmann::json::object();
|
|
j["algorithm"] = o.m_Algorithm;
|
|
j["fft_max_unit_cell_A"] = o.m_Fft_max_unit_cell_A;
|
|
j["fft_min_unit_cell_A"] = o.m_Fft_min_unit_cell_A;
|
|
j["fft_high_resolution_A"] = o.m_Fft_high_resolution_A;
|
|
j["fft_num_vectors"] = o.m_Fft_num_vectors;
|
|
j["tolerance"] = o.m_Tolerance;
|
|
j["thread_count"] = o.m_Thread_count;
|
|
j["geom_refinement_algorithm"] = o.m_Geom_refinement_algorithm;
|
|
j["unit_cell_dist_tolerance"] = o.m_Unit_cell_dist_tolerance;
|
|
j["viable_cell_min_spots"] = o.m_Viable_cell_min_spots;
|
|
j["index_ice_rings"] = o.m_Index_ice_rings;
|
|
j["rotation_indexing"] = o.m_Rotation_indexing;
|
|
j["rotation_indexing_min_angular_range_deg"] = o.m_Rotation_indexing_min_angular_range_deg;
|
|
j["rotation_indexing_angular_stride_deg"] = o.m_Rotation_indexing_angular_stride_deg;
|
|
j["blocking"] = o.m_Blocking;
|
|
|
|
}
|
|
|
|
void from_json(const nlohmann::json& j, Indexing_settings& o)
|
|
{
|
|
j.at("algorithm").get_to(o.m_Algorithm);
|
|
j.at("fft_max_unit_cell_A").get_to(o.m_Fft_max_unit_cell_A);
|
|
j.at("fft_min_unit_cell_A").get_to(o.m_Fft_min_unit_cell_A);
|
|
j.at("fft_high_resolution_A").get_to(o.m_Fft_high_resolution_A);
|
|
j.at("fft_num_vectors").get_to(o.m_Fft_num_vectors);
|
|
j.at("tolerance").get_to(o.m_Tolerance);
|
|
j.at("thread_count").get_to(o.m_Thread_count);
|
|
j.at("geom_refinement_algorithm").get_to(o.m_Geom_refinement_algorithm);
|
|
j.at("unit_cell_dist_tolerance").get_to(o.m_Unit_cell_dist_tolerance);
|
|
j.at("viable_cell_min_spots").get_to(o.m_Viable_cell_min_spots);
|
|
j.at("index_ice_rings").get_to(o.m_Index_ice_rings);
|
|
j.at("rotation_indexing").get_to(o.m_Rotation_indexing);
|
|
j.at("rotation_indexing_min_angular_range_deg").get_to(o.m_Rotation_indexing_min_angular_range_deg);
|
|
j.at("rotation_indexing_angular_stride_deg").get_to(o.m_Rotation_indexing_angular_stride_deg);
|
|
j.at("blocking").get_to(o.m_Blocking);
|
|
|
|
}
|
|
|
|
org::openapitools::server::model::Indexing_algorithm Indexing_settings::getAlgorithm() const
|
|
{
|
|
return m_Algorithm;
|
|
}
|
|
void Indexing_settings::setAlgorithm(org::openapitools::server::model::Indexing_algorithm const& value)
|
|
{
|
|
m_Algorithm = value;
|
|
}
|
|
float Indexing_settings::getFftMaxUnitCellA() const
|
|
{
|
|
return m_Fft_max_unit_cell_A;
|
|
}
|
|
void Indexing_settings::setFftMaxUnitCellA(float const value)
|
|
{
|
|
m_Fft_max_unit_cell_A = value;
|
|
}
|
|
float Indexing_settings::getFftMinUnitCellA() const
|
|
{
|
|
return m_Fft_min_unit_cell_A;
|
|
}
|
|
void Indexing_settings::setFftMinUnitCellA(float const value)
|
|
{
|
|
m_Fft_min_unit_cell_A = value;
|
|
}
|
|
float Indexing_settings::getFftHighResolutionA() const
|
|
{
|
|
return m_Fft_high_resolution_A;
|
|
}
|
|
void Indexing_settings::setFftHighResolutionA(float const value)
|
|
{
|
|
m_Fft_high_resolution_A = value;
|
|
}
|
|
int64_t Indexing_settings::getFftNumVectors() const
|
|
{
|
|
return m_Fft_num_vectors;
|
|
}
|
|
void Indexing_settings::setFftNumVectors(int64_t const value)
|
|
{
|
|
m_Fft_num_vectors = value;
|
|
}
|
|
float Indexing_settings::getTolerance() const
|
|
{
|
|
return m_Tolerance;
|
|
}
|
|
void Indexing_settings::setTolerance(float const value)
|
|
{
|
|
m_Tolerance = value;
|
|
}
|
|
int64_t Indexing_settings::getThreadCount() const
|
|
{
|
|
return m_Thread_count;
|
|
}
|
|
void Indexing_settings::setThreadCount(int64_t const value)
|
|
{
|
|
m_Thread_count = value;
|
|
}
|
|
org::openapitools::server::model::Geom_refinement_algorithm Indexing_settings::getGeomRefinementAlgorithm() const
|
|
{
|
|
return m_Geom_refinement_algorithm;
|
|
}
|
|
void Indexing_settings::setGeomRefinementAlgorithm(org::openapitools::server::model::Geom_refinement_algorithm const& value)
|
|
{
|
|
m_Geom_refinement_algorithm = value;
|
|
}
|
|
float Indexing_settings::getUnitCellDistTolerance() const
|
|
{
|
|
return m_Unit_cell_dist_tolerance;
|
|
}
|
|
void Indexing_settings::setUnitCellDistTolerance(float const value)
|
|
{
|
|
m_Unit_cell_dist_tolerance = value;
|
|
}
|
|
int64_t Indexing_settings::getViableCellMinSpots() const
|
|
{
|
|
return m_Viable_cell_min_spots;
|
|
}
|
|
void Indexing_settings::setViableCellMinSpots(int64_t const value)
|
|
{
|
|
m_Viable_cell_min_spots = value;
|
|
}
|
|
bool Indexing_settings::isIndexIceRings() const
|
|
{
|
|
return m_Index_ice_rings;
|
|
}
|
|
void Indexing_settings::setIndexIceRings(bool const value)
|
|
{
|
|
m_Index_ice_rings = value;
|
|
}
|
|
bool Indexing_settings::isRotationIndexing() const
|
|
{
|
|
return m_Rotation_indexing;
|
|
}
|
|
void Indexing_settings::setRotationIndexing(bool const value)
|
|
{
|
|
m_Rotation_indexing = value;
|
|
}
|
|
float Indexing_settings::getRotationIndexingMinAngularRangeDeg() const
|
|
{
|
|
return m_Rotation_indexing_min_angular_range_deg;
|
|
}
|
|
void Indexing_settings::setRotationIndexingMinAngularRangeDeg(float const value)
|
|
{
|
|
m_Rotation_indexing_min_angular_range_deg = value;
|
|
}
|
|
float Indexing_settings::getRotationIndexingAngularStrideDeg() const
|
|
{
|
|
return m_Rotation_indexing_angular_stride_deg;
|
|
}
|
|
void Indexing_settings::setRotationIndexingAngularStrideDeg(float const value)
|
|
{
|
|
m_Rotation_indexing_angular_stride_deg = value;
|
|
}
|
|
bool Indexing_settings::isBlocking() const
|
|
{
|
|
return m_Blocking;
|
|
}
|
|
void Indexing_settings::setBlocking(bool const value)
|
|
{
|
|
m_Blocking = value;
|
|
}
|
|
|
|
|
|
} // namespace org::openapitools::server::model
|
|
|