v1.0.0-rc.113 #19
@@ -23,6 +23,8 @@ Scan_result::Scan_result()
|
||||
{
|
||||
m_File_prefix = "";
|
||||
m_File_prefixIsSet = false;
|
||||
m_Unit_cellIsSet = false;
|
||||
m_Crystal_latticeIsSet = false;
|
||||
|
||||
}
|
||||
|
||||
@@ -45,7 +47,38 @@ bool Scan_result::validate(std::stringstream& msg, const std::string& pathPrefix
|
||||
bool success = true;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Scan_result" : pathPrefix;
|
||||
|
||||
|
||||
|
||||
if (crystalLatticeIsSet())
|
||||
{
|
||||
const std::vector<float>& value = m_Crystal_lattice;
|
||||
const std::string currentValuePath = _pathPrefix + ".crystalLattice";
|
||||
|
||||
|
||||
if (value.size() < 9)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must have at least 9 elements;";
|
||||
}
|
||||
if (value.size() > 9)
|
||||
{
|
||||
success = false;
|
||||
msg << currentValuePath << ": must have at most 9 elements;";
|
||||
}
|
||||
{ // Recursive validation of array elements
|
||||
const std::string oldValuePath = currentValuePath;
|
||||
int i = 0;
|
||||
for (const float& value : value)
|
||||
{
|
||||
const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]";
|
||||
|
||||
|
||||
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Images */ {
|
||||
const std::vector<org::openapitools::server::model::Scan_result_images_inner>& value = m_Images;
|
||||
@@ -78,6 +111,12 @@ 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())) &&
|
||||
|
||||
|
||||
((!crystalLatticeIsSet() && !rhs.crystalLatticeIsSet()) || (crystalLatticeIsSet() && rhs.crystalLatticeIsSet() && getCrystalLattice() == rhs.getCrystalLattice())) &&
|
||||
|
||||
(getImages() == rhs.getImages())
|
||||
|
||||
|
||||
@@ -94,6 +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;
|
||||
j["images"] = o.m_Images;
|
||||
|
||||
}
|
||||
@@ -105,6 +148,16 @@ 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())
|
||||
{
|
||||
j.at("unit_cell").get_to(o.m_Unit_cell);
|
||||
o.m_Unit_cellIsSet = true;
|
||||
}
|
||||
if(j.find("crystal_lattice") != j.end())
|
||||
{
|
||||
j.at("crystal_lattice").get_to(o.m_Crystal_lattice);
|
||||
o.m_Crystal_latticeIsSet = true;
|
||||
}
|
||||
j.at("images").get_to(o.m_Images);
|
||||
|
||||
}
|
||||
@@ -126,6 +179,40 @@ void Scan_result::unsetFile_prefix()
|
||||
{
|
||||
m_File_prefixIsSet = false;
|
||||
}
|
||||
org::openapitools::server::model::Unit_cell Scan_result::getUnitCell() const
|
||||
{
|
||||
return m_Unit_cell;
|
||||
}
|
||||
void Scan_result::setUnitCell(org::openapitools::server::model::Unit_cell const& value)
|
||||
{
|
||||
m_Unit_cell = value;
|
||||
m_Unit_cellIsSet = true;
|
||||
}
|
||||
bool Scan_result::unitCellIsSet() const
|
||||
{
|
||||
return m_Unit_cellIsSet;
|
||||
}
|
||||
void Scan_result::unsetUnit_cell()
|
||||
{
|
||||
m_Unit_cellIsSet = false;
|
||||
}
|
||||
std::vector<float> Scan_result::getCrystalLattice() const
|
||||
{
|
||||
return m_Crystal_lattice;
|
||||
}
|
||||
void Scan_result::setCrystalLattice(std::vector<float> const value)
|
||||
{
|
||||
m_Crystal_lattice = value;
|
||||
m_Crystal_latticeIsSet = true;
|
||||
}
|
||||
bool Scan_result::crystalLatticeIsSet() const
|
||||
{
|
||||
return m_Crystal_latticeIsSet;
|
||||
}
|
||||
void Scan_result::unsetCrystal_lattice()
|
||||
{
|
||||
m_Crystal_latticeIsSet = false;
|
||||
}
|
||||
std::vector<org::openapitools::server::model::Scan_result_images_inner> Scan_result::getImages() const
|
||||
{
|
||||
return m_Images;
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
|
||||
#include "Scan_result_images_inner.h"
|
||||
#include "Unit_cell.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <nlohmann/json.hpp>
|
||||
@@ -70,6 +71,20 @@ 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();
|
||||
/// <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();
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
std::vector<org::openapitools::server::model::Scan_result_images_inner> getImages() const;
|
||||
void setImages(std::vector<org::openapitools::server::model::Scan_result_images_inner> const& value);
|
||||
|
||||
@@ -78,6 +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;
|
||||
std::vector<org::openapitools::server::model::Scan_result_images_inner> m_Images;
|
||||
|
||||
|
||||
|
||||
@@ -588,6 +588,16 @@ components:
|
||||
type: number
|
||||
format: float
|
||||
description: X-ray fluorescence scan result in arbitrary units; must be exactly the same length, as energy_eV
|
||||
crystal_lattice:
|
||||
type: array
|
||||
items:
|
||||
type: number
|
||||
format: float
|
||||
minItems: 9
|
||||
maxItems: 9
|
||||
description: |
|
||||
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)
|
||||
unit_cell:
|
||||
type: object
|
||||
description: Unit cell parameters. Necessary to run indexing. Units of angstrom and degree
|
||||
@@ -1365,6 +1375,10 @@ components:
|
||||
properties:
|
||||
file_prefix:
|
||||
type: string
|
||||
unit_cell:
|
||||
$ref: '#/components/schemas/unit_cell'
|
||||
crystal_lattice:
|
||||
$ref: '#/components/schemas/crystal_lattice'
|
||||
images:
|
||||
type: array
|
||||
items:
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -7,6 +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]
|
||||
**images** | [**List[ScanResultImagesInner]**](ScanResultImagesInner.md) | |
|
||||
|
||||
## Example
|
||||
|
||||
4
frontend/package-lock.json
generated
4
frontend/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "jungfraujoch-frontend",
|
||||
"version": "1.0.0-rc.112",
|
||||
"version": "1.0.0-rc.113",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "jungfraujoch-frontend",
|
||||
"version": "1.0.0-rc.112",
|
||||
"version": "1.0.0-rc.113",
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.10.4",
|
||||
|
||||
@@ -15,6 +15,7 @@ export { broker_status } from './models/broker_status';
|
||||
export type { calibration_statistics } from './models/calibration_statistics';
|
||||
export { color_scale } from './models/color_scale';
|
||||
export type { compression } from './models/compression';
|
||||
export type { crystal_lattice } from './models/crystal_lattice';
|
||||
export type { dark_mask_settings } from './models/dark_mask_settings';
|
||||
export { dataset_settings } from './models/dataset_settings';
|
||||
export type { detector } from './models/detector';
|
||||
|
||||
11
frontend/src/openapi/models/crystal_lattice.ts
Normal file
11
frontend/src/openapi/models/crystal_lattice.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* 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)
|
||||
*
|
||||
*/
|
||||
export type crystal_lattice = Array<number>;
|
||||
@@ -3,6 +3,7 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import type { crystal_lattice } from './crystal_lattice';
|
||||
import type { unit_cell } from './unit_cell';
|
||||
|
||||
/**
|
||||
@@ -10,6 +11,8 @@ import type { unit_cell } from './unit_cell';
|
||||
*/
|
||||
export type scan_result = {
|
||||
file_prefix?: string;
|
||||
unit_cell?: unit_cell;
|
||||
crystal_lattice?: crystal_lattice;
|
||||
images: Array<{
|
||||
efficiency: number;
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user