Include lattice count
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 10m37s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 12m21s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m30s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 13m2s
Build Packages / build:rpm (rocky8) (push) Successful in 13m5s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 13m41s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 13m50s
Build Packages / XDS test (durin plugin) (push) Successful in 8m32s
Build Packages / Generate python client (push) Successful in 17s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 9m43s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (neggia plugin) (push) Successful in 8m19s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m10s
Build Packages / Build documentation (push) Successful in 47s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 10m56s
Build Packages / build:rpm (rocky9) (push) Successful in 12m44s
Build Packages / DIALS test (push) Successful in 12m28s
Build Packages / build:rpm (rocky8_nocuda) (pull_request) Successful in 9m22s
Build Packages / build:rpm (ubuntu2404_nocuda) (pull_request) Successful in 9m36s
Build Packages / build:rpm (ubuntu2204_nocuda) (pull_request) Successful in 11m0s
Build Packages / build:rpm (rocky8_sls9) (pull_request) Successful in 10m38s
Build Packages / build:rpm (rocky9_nocuda) (pull_request) Successful in 11m17s
Build Packages / build:rpm (rocky9_sls9) (pull_request) Successful in 11m34s
Build Packages / build:rpm (rocky8) (pull_request) Successful in 9m48s
Build Packages / build:rpm (ubuntu2404) (pull_request) Successful in 10m36s
Build Packages / build:rpm (rocky9) (pull_request) Successful in 11m56s
Build Packages / Generate python client (pull_request) Successful in 13s
Build Packages / build:rpm (ubuntu2204) (pull_request) Successful in 11m31s
Build Packages / Create release (pull_request) Skipped
Build Packages / Build documentation (pull_request) Successful in 38s
Build Packages / XDS test (durin plugin) (pull_request) Successful in 9m1s
Build Packages / DIALS test (pull_request) Successful in 13m53s
Build Packages / XDS test (JFJoch plugin) (pull_request) Successful in 7m19s
Build Packages / XDS test (neggia plugin) (pull_request) Successful in 5m14s
Build Packages / Unit tests (push) Successful in 1h9m8s
Build Packages / Unit tests (pull_request) Successful in 57m4s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 10m37s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 12m21s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m30s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 13m2s
Build Packages / build:rpm (rocky8) (push) Successful in 13m5s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 13m41s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 13m50s
Build Packages / XDS test (durin plugin) (push) Successful in 8m32s
Build Packages / Generate python client (push) Successful in 17s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 9m43s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (neggia plugin) (push) Successful in 8m19s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m10s
Build Packages / Build documentation (push) Successful in 47s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 10m56s
Build Packages / build:rpm (rocky9) (push) Successful in 12m44s
Build Packages / DIALS test (push) Successful in 12m28s
Build Packages / build:rpm (rocky8_nocuda) (pull_request) Successful in 9m22s
Build Packages / build:rpm (ubuntu2404_nocuda) (pull_request) Successful in 9m36s
Build Packages / build:rpm (ubuntu2204_nocuda) (pull_request) Successful in 11m0s
Build Packages / build:rpm (rocky8_sls9) (pull_request) Successful in 10m38s
Build Packages / build:rpm (rocky9_nocuda) (pull_request) Successful in 11m17s
Build Packages / build:rpm (rocky9_sls9) (pull_request) Successful in 11m34s
Build Packages / build:rpm (rocky8) (pull_request) Successful in 9m48s
Build Packages / build:rpm (ubuntu2404) (pull_request) Successful in 10m36s
Build Packages / build:rpm (rocky9) (pull_request) Successful in 11m56s
Build Packages / Generate python client (pull_request) Successful in 13s
Build Packages / build:rpm (ubuntu2204) (pull_request) Successful in 11m31s
Build Packages / Create release (pull_request) Skipped
Build Packages / Build documentation (pull_request) Successful in 38s
Build Packages / XDS test (durin plugin) (pull_request) Successful in 9m1s
Build Packages / DIALS test (pull_request) Successful in 13m53s
Build Packages / XDS test (JFJoch plugin) (pull_request) Successful in 7m19s
Build Packages / XDS test (neggia plugin) (pull_request) Successful in 5m14s
Build Packages / Unit tests (push) Successful in 1h9m8s
Build Packages / Unit tests (pull_request) Successful in 57m4s
This commit is contained in:
@@ -886,7 +886,7 @@ PlotType ConvertPlotType(const std::optional<std::string>& input) {
|
||||
if (input == "image_scale_factor") return PlotType::ImageScaleFactor;
|
||||
if (input == "image_scale_cc") return PlotType::ImageScaleCC;
|
||||
if (input == "image_scale_b") return PlotType::ImageScaleBFactor;
|
||||
|
||||
if (input == "indexing_lattice_count") return PlotType::IndexingLatticeCount;
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
|
||||
"Plot type not recognized");
|
||||
}
|
||||
@@ -1067,6 +1067,8 @@ org::openapitools::server::model::Scan_result Convert(const ScanResult& input) {
|
||||
uc.setGamma(i.uc->gamma);
|
||||
tmp.setUc(uc);
|
||||
}
|
||||
if (i.indexed_lattice_count.has_value())
|
||||
tmp.setLattCount(i.indexed_lattice_count.value());
|
||||
if (i.xfel_pulse_id.has_value())
|
||||
tmp.setXfelPulseid(i.xfel_pulse_id.value());
|
||||
if (i.res.has_value())
|
||||
|
||||
@@ -41,6 +41,8 @@ Scan_result_images_inner::Scan_result_images_inner()
|
||||
m_Spots_iceIsSet = false;
|
||||
m_Index = 0L;
|
||||
m_IndexIsSet = false;
|
||||
m_Latt_count = 0L;
|
||||
m_Latt_countIsSet = false;
|
||||
m_Pr = 0.0f;
|
||||
m_PrIsSet = false;
|
||||
m_b = 0.0f;
|
||||
@@ -80,7 +82,7 @@ bool Scan_result_images_inner::validate(std::stringstream& msg, const std::strin
|
||||
bool success = true;
|
||||
const std::string _pathPrefix = pathPrefix.empty() ? "Scan_result_images_inner" : pathPrefix;
|
||||
|
||||
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -123,6 +125,9 @@ bool Scan_result_images_inner::operator==(const Scan_result_images_inner& rhs) c
|
||||
((!indexIsSet() && !rhs.indexIsSet()) || (indexIsSet() && rhs.indexIsSet() && getIndex() == rhs.getIndex())) &&
|
||||
|
||||
|
||||
((!lattCountIsSet() && !rhs.lattCountIsSet()) || (lattCountIsSet() && rhs.lattCountIsSet() && getLattCount() == rhs.getLattCount())) &&
|
||||
|
||||
|
||||
((!prIsSet() && !rhs.prIsSet()) || (prIsSet() && rhs.prIsSet() && getPr() == rhs.getPr())) &&
|
||||
|
||||
|
||||
@@ -180,6 +185,8 @@ void to_json(nlohmann::json& j, const Scan_result_images_inner& o)
|
||||
j["spots_ice"] = o.m_Spots_ice;
|
||||
if(o.indexIsSet())
|
||||
j["index"] = o.m_Index;
|
||||
if(o.lattCountIsSet())
|
||||
j["latt_count"] = o.m_Latt_count;
|
||||
if(o.prIsSet())
|
||||
j["pr"] = o.m_Pr;
|
||||
if(o.BIsSet())
|
||||
@@ -250,6 +257,11 @@ void from_json(const nlohmann::json& j, Scan_result_images_inner& o)
|
||||
j.at("index").get_to(o.m_Index);
|
||||
o.m_IndexIsSet = true;
|
||||
}
|
||||
if(j.find("latt_count") != j.end())
|
||||
{
|
||||
j.at("latt_count").get_to(o.m_Latt_count);
|
||||
o.m_Latt_countIsSet = true;
|
||||
}
|
||||
if(j.find("pr") != j.end())
|
||||
{
|
||||
j.at("pr").get_to(o.m_Pr);
|
||||
@@ -467,6 +479,23 @@ void Scan_result_images_inner::unsetIndex()
|
||||
{
|
||||
m_IndexIsSet = false;
|
||||
}
|
||||
int64_t Scan_result_images_inner::getLattCount() const
|
||||
{
|
||||
return m_Latt_count;
|
||||
}
|
||||
void Scan_result_images_inner::setLattCount(int64_t const value)
|
||||
{
|
||||
m_Latt_count = value;
|
||||
m_Latt_countIsSet = true;
|
||||
}
|
||||
bool Scan_result_images_inner::lattCountIsSet() const
|
||||
{
|
||||
return m_Latt_countIsSet;
|
||||
}
|
||||
void Scan_result_images_inner::unsetLatt_count()
|
||||
{
|
||||
m_Latt_countIsSet = false;
|
||||
}
|
||||
float Scan_result_images_inner::getPr() const
|
||||
{
|
||||
return m_Pr;
|
||||
|
||||
@@ -132,6 +132,13 @@ public:
|
||||
bool indexIsSet() const;
|
||||
void unsetIndex();
|
||||
/// <summary>
|
||||
/// Indexing lattice count
|
||||
/// </summary>
|
||||
int64_t getLattCount() const;
|
||||
void setLattCount(int64_t const value);
|
||||
bool lattCountIsSet() const;
|
||||
void unsetLatt_count();
|
||||
/// <summary>
|
||||
/// Profile radius, i.e. how far reflections are from the Ewald sphere
|
||||
/// </summary>
|
||||
float getPr() const;
|
||||
@@ -220,6 +227,8 @@ protected:
|
||||
bool m_Spots_iceIsSet;
|
||||
int64_t m_Index;
|
||||
bool m_IndexIsSet;
|
||||
int64_t m_Latt_count;
|
||||
bool m_Latt_countIsSet;
|
||||
float m_Pr;
|
||||
bool m_PrIsSet;
|
||||
float m_b;
|
||||
|
||||
@@ -91,6 +91,7 @@ components:
|
||||
- spot_count_indexed
|
||||
- spot_count_ice
|
||||
- indexing_rate
|
||||
- indexing_lattice_count
|
||||
- indexing_unit_cell_length
|
||||
- indexing_unit_cell_angle
|
||||
- profile_radius
|
||||
@@ -1528,6 +1529,10 @@ components:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Indexing solution
|
||||
latt_count:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Indexing lattice count
|
||||
pr:
|
||||
type: number
|
||||
format: float
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -114,6 +114,7 @@ struct DataMessage {
|
||||
std::optional<bool> indexing_result;
|
||||
std::optional<CrystalLattice> indexing_lattice;
|
||||
std::vector<CrystalLattice> indexing_extra_lattices;
|
||||
std::optional<int64_t> indexing_lattice_count;
|
||||
std::optional<UnitCell> indexing_unit_cell;
|
||||
std::optional<int64_t> spot_count_indexed;
|
||||
|
||||
@@ -339,6 +340,7 @@ struct EndMessage {
|
||||
std::vector<int32_t> spot_count_low_res;
|
||||
std::vector<int32_t> spot_count_indexed;
|
||||
std::vector<uint8_t> image_indexed;
|
||||
std::vector<int32_t> indexed_lattice_count;
|
||||
std::vector<float> v_bkg_estimate;
|
||||
std::vector<float> profile_radius;
|
||||
std::vector<float> mosaicity;
|
||||
|
||||
+2
-1
@@ -20,7 +20,8 @@ struct ScanResultElem {
|
||||
std::optional<int64_t> y;
|
||||
std::optional<float> angle_deg;
|
||||
|
||||
std::optional<uint64_t> pixel_sum;
|
||||
std::optional<int64_t> pixel_sum;
|
||||
std::optional<int64_t> indexed_lattice_count;
|
||||
std::optional<int64_t> min_viable_pixel;
|
||||
std::optional<int64_t> max_viable_pixel;
|
||||
std::optional<int64_t> err_pixels;
|
||||
|
||||
@@ -45,6 +45,7 @@ void ScanResultGenerator::Add(const DataMessage &message) {
|
||||
v[image_number].bkg = message.bkg_estimate;
|
||||
v[image_number].spot_count = message.spot_count;
|
||||
v[image_number].indexing_solution = message.indexing_result;
|
||||
v[image_number].indexed_lattice_count = message.indexing_lattice_count;
|
||||
v[image_number].profile_radius = message.profile_radius;
|
||||
v[image_number].mosaicity = message.mosaicity_deg;
|
||||
v[image_number].b_factor = message.b_factor;
|
||||
@@ -105,6 +106,7 @@ void ScanResultGenerator::FillEndMessage(EndMessage &message) const {
|
||||
message.integrated_reflections.resize(n);
|
||||
message.niggli_class.resize(n);
|
||||
message.pixel_sum.resize(n);
|
||||
message.indexed_lattice_count.resize(n);
|
||||
|
||||
for (const auto &e: v) {
|
||||
if (e.number < 0)
|
||||
@@ -133,6 +135,7 @@ void ScanResultGenerator::FillEndMessage(EndMessage &message) const {
|
||||
message.image_scale_cc[number] = e.image_scale_cc.value_or(NAN);
|
||||
message.integrated_reflections[number] = static_cast<int32_t>(value_or_zero(e.integrated_reflections));
|
||||
message.niggli_class[number] = static_cast<uint8_t>(value_or_zero(e.niggli_class));
|
||||
message.pixel_sum[number] = static_cast<int64_t>(value_or_zero(e.pixel_sum));
|
||||
message.pixel_sum[number] = value_or_zero(e.pixel_sum);
|
||||
message.indexed_lattice_count[number] = static_cast<int32_t>(value_or_zero(e.indexed_lattice_count));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ Name | Type | Description | Notes
|
||||
**spots_indexed** | **int** | Spot count within indexing tolerance | [optional]
|
||||
**spots_ice** | **int** | Spot count within common ice ring resolutions | [optional]
|
||||
**index** | **int** | Indexing solution | [optional]
|
||||
**latt_count** | **int** | Indexing lattice count | [optional]
|
||||
**pr** | **float** | Profile radius, i.e. how far reflections are from the Ewald sphere | [optional]
|
||||
**b** | **float** | B-Factor estimate | [optional]
|
||||
**uc** | [**UnitCell**](UnitCell.md) | | [optional]
|
||||
|
||||
@@ -719,6 +719,8 @@ namespace {
|
||||
GetCBORUInt64Array(value, message.az_int_profile_count);
|
||||
else if (key == "indexing_result")
|
||||
message.indexing_result = GetCBORBool(value);
|
||||
else if (key == "indexing_lattice_count")
|
||||
message.indexing_lattice_count = GetCBORInt(value);
|
||||
else if (key == "indexing_lattice") {
|
||||
std::vector<float> tmp;
|
||||
GetCBORFloatArray(value, tmp);
|
||||
@@ -1367,6 +1369,8 @@ namespace {
|
||||
message.bkg_estimate = GetCBORFloat(value);
|
||||
else if (key == "indexing_rate")
|
||||
message.indexing_rate = GetCBORFloat(value);
|
||||
else if (key == "indexed_lattice_count")
|
||||
GetCBORInt32Array(value, message.indexed_lattice_count);
|
||||
else if (key == "data_collection_efficiency_image")
|
||||
GetCBORFloatArray(value, message.data_collection_efficiency);
|
||||
else if (key == "spot_count")
|
||||
|
||||
@@ -745,6 +745,7 @@ void CBORStream2Serializer::SerializeSequenceEnd(const EndMessage& message) {
|
||||
CBOR_ENC(mapEncoder, "max_viable_pixel_value", message.max_viable_pixel_value);
|
||||
CBOR_ENC(mapEncoder, "saturated_pixel_count", message.saturated_pixel_count);
|
||||
CBOR_ENC(mapEncoder, "error_pixel_count", message.error_pixel_count);
|
||||
CBOR_ENC(mapEncoder, "indexed_lattice_count", message.indexed_lattice_count);
|
||||
CBOR_ENC(mapEncoder, "image_scale_factor", message.image_scale_factor);
|
||||
CBOR_ENC(mapEncoder, "image_scale_cc", message.image_scale_cc);
|
||||
CBOR_ENC(mapEncoder, "image_scale_mosaicity", message.image_scale_mosaicity);
|
||||
@@ -778,6 +779,7 @@ void CBORStream2Serializer::SerializeImageInternal(CborEncoder &mapEncoder, cons
|
||||
CBOR_ENC(mapEncoder, "az_int_profile_count", message.az_int_profile_count);
|
||||
|
||||
CBOR_ENC(mapEncoder, "indexing_result", message.indexing_result);
|
||||
CBOR_ENC(mapEncoder, "indexing_lattice_count", message.indexing_lattice_count);
|
||||
if (message.indexing_lattice)
|
||||
CBOR_ENC(mapEncoder, "indexing_lattice", message.indexing_lattice->GetVector());
|
||||
if (!message.indexing_extra_lattices.empty()) {
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "jungfraujoch-frontend",
|
||||
"version": "1.0.0-rc.147",
|
||||
"version": "1.0.0-rc.148",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "jungfraujoch-frontend",
|
||||
"version": "1.0.0-rc.147",
|
||||
"version": "1.0.0-rc.148",
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.10.4",
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import React, {Component} from 'react';
|
||||
import React, {Component, ReactNode} from 'react';
|
||||
|
||||
import {azint_unit, DefaultService, plot_type, plot_unit_x, plots} from "../openapi";
|
||||
import MultiLinePlotWrapper from "./MultiLinePlotWrapper";
|
||||
import { ReactNode } from "react";
|
||||
|
||||
type MyProps = {
|
||||
type: plot_type;
|
||||
@@ -47,13 +46,13 @@ function AxisTypeY(plot: plot_type) : string | ReactNode {
|
||||
switch (plot) {
|
||||
case plot_type.IMAGE_COLLECTION_EFFICIENCY:
|
||||
return "Efficiency";
|
||||
case plot_type.INDEXING_LATTICE_COUNT:
|
||||
case plot_type.INTEGRATED_REFLECTIONS:
|
||||
return "Reflection count";
|
||||
case plot_type.SPOT_COUNT:
|
||||
case plot_type.SPOT_COUNT_LOW_RES:
|
||||
case plot_type.SPOT_COUNT_INDEXED:
|
||||
case plot_type.SPOT_COUNT_ICE:
|
||||
return "Spot count";
|
||||
return "Count";
|
||||
case plot_type.AZINT:
|
||||
case plot_type.AZINT_1D:
|
||||
case plot_type.BKG_ESTIMATE:
|
||||
|
||||
@@ -77,6 +77,7 @@ class DataProcessingPlots extends Component<MyProps, MyState> {
|
||||
<MenuItem value={plot_type.B_FACTOR}>Wilson B-factor</MenuItem>
|
||||
<MenuItem value={plot_type.BEAM_CENTER_X}>Beam center X (post-indexing geometry refinement)</MenuItem>
|
||||
<MenuItem value={plot_type.BEAM_CENTER_Y}>Beam center Y (post-indexing geometry refinement)</MenuItem>
|
||||
<MenuItem value={plot_type.INDEXING_LATTICE_COUNT}>Indexed lattice count</MenuItem>
|
||||
<MenuItem value={plot_type.INTEGRATED_REFLECTIONS}>Integrated reflections</MenuItem>
|
||||
<MenuItem value={plot_type.IMAGE_COLLECTION_EFFICIENCY}>Image collection efficiency</MenuItem>
|
||||
<MenuItem value={plot_type.PROCESSING_TIME}> Processing time</MenuItem>
|
||||
|
||||
@@ -15,6 +15,7 @@ export enum plot_type {
|
||||
SPOT_COUNT_INDEXED = 'spot_count_indexed',
|
||||
SPOT_COUNT_ICE = 'spot_count_ice',
|
||||
INDEXING_RATE = 'indexing_rate',
|
||||
INDEXING_LATTICE_COUNT = 'indexing_lattice_count',
|
||||
INDEXING_UNIT_CELL_LENGTH = 'indexing_unit_cell_length',
|
||||
INDEXING_UNIT_CELL_ANGLE = 'indexing_unit_cell_angle',
|
||||
PROFILE_RADIUS = 'profile_radius',
|
||||
|
||||
@@ -55,6 +55,10 @@ export type scan_result = {
|
||||
* Indexing solution
|
||||
*/
|
||||
index?: number;
|
||||
/**
|
||||
* Indexing lattice count
|
||||
*/
|
||||
latt_count?: number;
|
||||
/**
|
||||
* Profile radius, i.e. how far reflections are from the Ewald sphere
|
||||
*/
|
||||
|
||||
@@ -1031,7 +1031,7 @@ export class DefaultService {
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getPreviewPlot(
|
||||
type: 'bkg_estimate' | 'azint' | 'azint_1d' | 'spot_count' | 'spot_count_low_res' | 'spot_count_indexed' | 'spot_count_ice' | 'indexing_rate' | 'indexing_unit_cell_length' | 'indexing_unit_cell_angle' | 'profile_radius' | 'mosaicity' | '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' | 'integrated_reflections' | 'image_scale_factor' | 'image_scale_cc' | 'image_scale_b',
|
||||
type: 'bkg_estimate' | 'azint' | 'azint_1d' | 'spot_count' | 'spot_count_low_res' | 'spot_count_indexed' | 'spot_count_ice' | 'indexing_rate' | 'indexing_lattice_count' | 'indexing_unit_cell_length' | 'indexing_unit_cell_angle' | 'profile_radius' | 'mosaicity' | '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' | 'integrated_reflections' | 'image_scale_factor' | 'image_scale_cc' | 'image_scale_b',
|
||||
binning: number = 1,
|
||||
fill?: number,
|
||||
experimentalCoord: boolean = false,
|
||||
@@ -1064,7 +1064,7 @@ export class DefaultService {
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getPreviewPlotBin(
|
||||
type: 'bkg_estimate' | 'azint' | 'azint_1d' | 'spot_count' | 'spot_count_low_res' | 'spot_count_indexed' | 'spot_count_ice' | 'indexing_rate' | 'indexing_unit_cell_length' | 'indexing_unit_cell_angle' | 'profile_radius' | 'mosaicity' | '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' | 'integrated_reflections' | 'image_scale_factor' | 'image_scale_cc' | 'image_scale_b',
|
||||
type: 'bkg_estimate' | 'azint' | 'azint_1d' | 'spot_count' | 'spot_count_low_res' | 'spot_count_indexed' | 'spot_count_ice' | 'indexing_rate' | 'indexing_lattice_count' | 'indexing_unit_cell_length' | 'indexing_unit_cell_angle' | 'profile_radius' | 'mosaicity' | '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' | 'integrated_reflections' | 'image_scale_factor' | 'image_scale_cc' | 'image_scale_b',
|
||||
roi?: string,
|
||||
): CancelablePromise<Blob> {
|
||||
return __request(OpenAPI, {
|
||||
|
||||
@@ -349,11 +349,14 @@ bool AnalyzeIndexing(DataMessage &message,
|
||||
nspots_ref++;
|
||||
}
|
||||
|
||||
int64_t indexing_lattice_count = 0;
|
||||
bool outcome = false;
|
||||
if (nspots_indexed >= viable_cell_min_spots && nspots_indexed >= std::lround(min_percentage_spots * nspots_ref)) {
|
||||
auto uc = latt.GetUnitCell();
|
||||
if (ok(uc.a) && ok(uc.b) && ok(uc.c) && ok(uc.alpha) && ok(uc.beta) && ok(uc.gamma)) {
|
||||
message.indexing_result = true;
|
||||
indexing_lattice_count++;
|
||||
|
||||
assert(indexed_spots.size() == message.spots.size());
|
||||
for (int i = 0; i < message.spots.size(); i++) {
|
||||
message.spots[i].indexed = indexed_spots[i];
|
||||
@@ -415,6 +418,7 @@ bool AnalyzeIndexing(DataMessage &message,
|
||||
}
|
||||
|
||||
message.indexing_extra_lattices.push_back(el);
|
||||
indexing_lattice_count++;
|
||||
}
|
||||
outcome = true;
|
||||
}
|
||||
@@ -422,6 +426,7 @@ bool AnalyzeIndexing(DataMessage &message,
|
||||
|
||||
auto end_time = std::chrono::steady_clock::now();
|
||||
message.index_analysis_time_s = std::chrono::duration<float>(end_time - start_time).count();
|
||||
message.indexing_lattice_count = indexing_lattice_count;
|
||||
message.indexing_result = outcome;
|
||||
return outcome;
|
||||
}
|
||||
|
||||
@@ -308,6 +308,7 @@ void JFJochHDF5Reader::ReadFile(const std::string &filename) {
|
||||
dataset->bkg_estimate = master_file->ReadOptVector<float>("/entry/MX/bkgEstimate");
|
||||
dataset->resolution_estimate = master_file->ReadOptVector<float>("/entry/MX/resolutionEstimate");
|
||||
dataset->profile_radius = master_file->ReadOptVector<float>("/entry/MX/profileRadius");
|
||||
dataset->indexing_lattice_count = master_file->ReadOptVector<float>("/entry/MX/indexingLatticeCount");
|
||||
dataset->mosaicity_deg = master_file->ReadOptVector<float>("/entry/MX/mosaicity");
|
||||
dataset->b_factor = master_file->ReadOptVector<float>("/entry/MX/bFactor");
|
||||
dataset->image_scale_factor = master_file->ReadOptVector<float>("/entry/MX/imageScaleFactor");
|
||||
@@ -432,6 +433,10 @@ void JFJochHDF5Reader::ReadFile(const std::string &filename) {
|
||||
data_file, "/entry/MX/profileRadius",
|
||||
number_of_images, fimages);
|
||||
|
||||
ReadVector(dataset->indexing_lattice_count,
|
||||
data_file, "/entry/MX/indexingLatticeCount",
|
||||
number_of_images, fimages);
|
||||
|
||||
ReadVector(dataset->mosaicity_deg,
|
||||
data_file, "/entry/MX/mosaicity",
|
||||
number_of_images, fimages);
|
||||
@@ -466,9 +471,9 @@ void JFJochHDF5Reader::ReadFile(const std::string &filename) {
|
||||
|
||||
if (master_file->Exists("/entry/MX")) {
|
||||
auto indexing = master_file->GetString("/entry/MX/indexing_algorithm", "none");
|
||||
if (indexing == "fft")
|
||||
if (indexing == "fft" || indexing == "FFT (CUDA)" || indexing == "FFT (FFTW)")
|
||||
dataset->experiment.IndexingAlgorithm(IndexingAlgorithmEnum::FFT);
|
||||
else if (indexing == "ffbidx")
|
||||
else if (indexing == "ffbidx" || indexing == "FFBIDX")
|
||||
dataset->experiment.IndexingAlgorithm(IndexingAlgorithmEnum::FFBIDX);
|
||||
}
|
||||
|
||||
@@ -897,6 +902,8 @@ bool JFJochHDF5Reader::LoadImage_i(std::shared_ptr<JFJochReaderDataset> &dataset
|
||||
message.resolution_estimate = dataset->resolution_estimate[image_number];
|
||||
if (dataset->indexing_result.size() > image_number)
|
||||
message.indexing_result = dataset->indexing_result[image_number];
|
||||
if (dataset->indexing_lattice_count.size() > image_number)
|
||||
message.indexing_lattice_count = dataset->indexing_lattice_count[image_number];
|
||||
if (dataset->bkg_estimate.size() > image_number)
|
||||
message.bkg_estimate = dataset->bkg_estimate[image_number];
|
||||
if (dataset->efficiency.size() > image_number)
|
||||
@@ -907,6 +914,8 @@ bool JFJochHDF5Reader::LoadImage_i(std::shared_ptr<JFJochReaderDataset> &dataset
|
||||
message.mosaicity_deg = dataset->mosaicity_deg[image_number];
|
||||
if (dataset->b_factor.size() > image_number)
|
||||
message.b_factor = dataset->b_factor[image_number];
|
||||
if (dataset->image_scale_b.size() > image_number)
|
||||
message.image_scale_b_factor = dataset->image_scale_b[image_number];
|
||||
if (dataset->image_scale_factor.size() > image_number)
|
||||
message.image_scale_factor = dataset->image_scale_factor[image_number];
|
||||
if (dataset->image_scale_cc.size() > image_number)
|
||||
|
||||
@@ -177,6 +177,7 @@ std::shared_ptr<JFJochReaderDataset> JFJochHttpReader::UpdateDataset_i() {
|
||||
dataset->spot_count_indexed = GetPlot_i("spot_count_indexed");
|
||||
|
||||
dataset->indexing_result = GetPlot_i("indexing_rate");
|
||||
dataset->indexing_lattice_count = GetPlot_i("indexing_lattice_count");
|
||||
dataset->profile_radius = GetPlot_i("profile_radius");
|
||||
dataset->mosaicity_deg = GetPlot_i("mosaicity");
|
||||
dataset->b_factor = GetPlot_i("b_factor");
|
||||
|
||||
@@ -33,6 +33,7 @@ struct JFJochReaderDataset {
|
||||
std::vector<float> spot_count_ice_rings;
|
||||
|
||||
std::vector<float> indexing_result;
|
||||
std::vector<float> indexing_lattice_count;
|
||||
std::vector<float> bkg_estimate;
|
||||
std::vector<float> resolution_estimate;
|
||||
std::vector<float> efficiency;
|
||||
@@ -43,7 +44,6 @@ struct JFJochReaderDataset {
|
||||
std::vector<float> image_scale_factor;
|
||||
std::vector<float> image_scale_cc;
|
||||
std::vector<float> image_scale_b;
|
||||
|
||||
std::vector<int64_t> max_value;
|
||||
|
||||
std::vector<std::string> roi;
|
||||
|
||||
@@ -167,12 +167,8 @@ void JFJochReceiverPlots::Add(const DataMessage &msg, const AzimuthalIntegration
|
||||
indexing_uc_beta.AddElement(msg.number, msg.indexing_unit_cell->beta);
|
||||
indexing_uc_gamma.AddElement(msg.number, msg.indexing_unit_cell->gamma);
|
||||
}
|
||||
if (msg.indexing_result.has_value()) {
|
||||
if (!msg.indexing_result.value())
|
||||
indexing_lattice_count.AddElement(msg.number, 0);
|
||||
else
|
||||
indexing_lattice_count.AddElement(msg.number, msg.indexing_extra_lattices.size());
|
||||
}
|
||||
|
||||
indexing_lattice_count.AddElement(msg.number, msg.indexing_lattice_count);
|
||||
beam_center_x.AddElement(msg.number, msg.beam_corr_x);
|
||||
beam_center_y.AddElement(msg.number, msg.beam_corr_y);
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ void JFJochViewerDatasetInfo::UpdateLabels() {
|
||||
combo_box->addItem("B-factor", 8);
|
||||
combo_box->addItem("Mosaicity", 9);
|
||||
combo_box->addItem("Integrated reflections", 12);
|
||||
combo_box->addItem("Indexing lattice count", 13);
|
||||
}
|
||||
|
||||
if (!dataset->image_scale_factor.empty()) {
|
||||
@@ -179,6 +180,8 @@ void JFJochViewerDatasetInfo::UpdatePlot() {
|
||||
data = dataset->image_scale_cc;
|
||||
} else if (val == 12) {
|
||||
data = dataset->integrated_reflections;
|
||||
} else if (val == 13) {
|
||||
data = dataset->indexing_lattice_count;
|
||||
} else if (val >= 100) {
|
||||
int roi_index = (val - 100) / 4;
|
||||
|
||||
|
||||
@@ -60,24 +60,15 @@ void HDF5DataFilePluginMX::OpenFile(HDF5File &data_file, const DataMessage &msg,
|
||||
spot_x.reserve(max_spots * images_per_file);
|
||||
spot_y.reserve(max_spots * images_per_file);
|
||||
spot_int.reserve(max_spots * images_per_file);
|
||||
spot_indexed.reserve(max_spots * images_per_file);
|
||||
spot_ice_ring.reserve(max_spots * images_per_file);
|
||||
spot_h.reserve(max_spots * images_per_file);
|
||||
spot_k.reserve(max_spots * images_per_file);
|
||||
spot_l.reserve(max_spots * images_per_file);
|
||||
spot_dist_ewald.reserve(max_spots * images_per_file);
|
||||
|
||||
spot_x.reserve(max_spots * images_per_file);
|
||||
spot_y.reserve(max_spots * images_per_file);
|
||||
spot_int.reserve(max_spots * images_per_file);
|
||||
spot_ice_ring.reserve(max_spots * images_per_file);
|
||||
spot_h.reserve(max_spots * images_per_file);
|
||||
spot_k.reserve(max_spots * images_per_file);
|
||||
spot_l.reserve(max_spots * images_per_file);
|
||||
spot_lattice.reserve(max_spots * images_per_file);
|
||||
spot_dist_ewald.reserve(max_spots * images_per_file);
|
||||
if (indexing) {
|
||||
spot_indexed.reserve(max_spots * images_per_file);
|
||||
spot_lattice.reserve(max_spots * images_per_file);
|
||||
indexed_lattice.reserve(images_per_file * 9);
|
||||
extra_lattices.reserve(images_per_file * max_extra_lattices * 9);
|
||||
}
|
||||
@@ -156,6 +147,8 @@ void HDF5DataFilePluginMX::Write(const DataMessage &msg, uint64_t image_number)
|
||||
|
||||
if (indexing) {
|
||||
indexed[image_number] = msg.indexing_result.value_or(0);
|
||||
// Fallback value is indexing result (1 or 0 lattices)
|
||||
indexing_lattice_count[image_number] = msg.indexing_lattice_count.value_or(indexed[image_number]);
|
||||
profile_radius[image_number] = msg.profile_radius.value_or(NAN);
|
||||
mosaicity_deg[image_number] = msg.mosaicity_deg.value_or(NAN);
|
||||
b_factor[image_number] = msg.b_factor.value_or(NAN);
|
||||
@@ -240,11 +233,13 @@ void HDF5DataFilePluginMX::WriteFinal(HDF5File &data_file) {
|
||||
|
||||
if (!indexed.empty())
|
||||
data_file.SaveVector("/entry/MX/imageIndexed", indexed.vec());
|
||||
if (!indexing_lattice_count.empty())
|
||||
data_file.SaveVector("/entry/MX/indexingLatticeCount", indexing_lattice_count.vec());
|
||||
if (!indexed_lattice.empty())
|
||||
data_file.SaveVector("/entry/MX/latticeIndexed", indexed_lattice, {(hsize_t) (max_image_number + 1), 9})
|
||||
->Units("Angstrom");
|
||||
if (!extra_lattices.empty())
|
||||
data_file.SaveVector("/entry/MX/extraLattices", extra_lattices,
|
||||
data_file.SaveVector("/entry/MX/latticeIndexedExtra", extra_lattices,
|
||||
{(hsize_t) (max_image_number + 1), (hsize_t) max_extra_lattices, 9})
|
||||
->Units("Angstrom");
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ class HDF5DataFilePluginMX : public HDF5DataFilePlugin {
|
||||
|
||||
// indexing
|
||||
AutoIncrVector<uint8_t> indexed;
|
||||
AutoIncrVector<uint32_t> indexing_lattice_count;
|
||||
std::vector<float> indexed_lattice;
|
||||
std::vector<float> extra_lattices; // [nimages, max_extra_lattices, 9], NaN-filled
|
||||
|
||||
@@ -54,7 +55,6 @@ class HDF5DataFilePluginMX : public HDF5DataFilePlugin {
|
||||
|
||||
AutoIncrVector<int64_t> integrated_reflections;
|
||||
|
||||
|
||||
// scaling
|
||||
bool image_scale_present = false;
|
||||
AutoIncrVector<float> image_scale_factor{NAN};
|
||||
|
||||
+7
-4
@@ -138,6 +138,8 @@ void NXmx::LinkToData_VDS(const StartMessage &start, const EndMessage &end) {
|
||||
VDS(start, "/entry/MX/peakL", {total_images, start.max_spot_count}, HDF5DataType((int32_t) 0));
|
||||
VDS(start, "/entry/MX/peakDistEwaldSphere", {total_images, start.max_spot_count}, HDF5DataType((float) 0));
|
||||
VDS(start, "/entry/MX/latticeIndexed", {total_images,9}, HDF5DataType((float) 0))->Units("Angstrom");
|
||||
if (start.max_extra_lattices > 0)
|
||||
VDS(start, "/entry/MX/latticeIndexedExtra", {total_images, start.max_extra_lattices, 9}, HDF5DataType((float) 0))->Units("Angstrom");
|
||||
}
|
||||
|
||||
if (!start.az_int_bin_to_q.empty()) {
|
||||
@@ -795,16 +797,16 @@ void NXmx::Finalize(const EndMessage &end) {
|
||||
->Units("Angstrom");
|
||||
|
||||
if (!end.rotation_extra_lattices.empty()) {
|
||||
std::vector<float> latt_info(9 * end.rotation_extra_lattices.size());
|
||||
std::vector<float> latt_info(9 * end.rotation_extra_lattices.size());
|
||||
for (int i = 0; i < end.rotation_extra_lattices.size(); i++) {
|
||||
auto vec = end.rotation_extra_lattices[i].GetVector();
|
||||
for (int j = 0; j < 9; j++)
|
||||
latt_info[i * 9 + j] = vec[j];
|
||||
}
|
||||
SaveVector(*hdf5_file,
|
||||
"/entry/MX/rotationExtraLattices",
|
||||
latt_info,{end.rotation_extra_lattices.size(), 9})
|
||||
->Units("Angstrom");
|
||||
"/entry/MX/rotationLatticeIndexedExtra",
|
||||
latt_info, {end.rotation_extra_lattices.size(), 9})
|
||||
->Units("Angstrom");
|
||||
}
|
||||
|
||||
if (end.rotation_lattice_type)
|
||||
@@ -888,6 +890,7 @@ void NXmx::EndResultVectors(const EndMessage &end) {
|
||||
SaveVectorIfMissing(*hdf5_file, "/entry/MX/peakCountLowRes", end.spot_count_low_res);
|
||||
SaveVectorIfMissing(*hdf5_file, "/entry/MX/peakCountIndexed", end.spot_count_indexed);
|
||||
SaveVectorIfMissing(*hdf5_file, "/entry/MX/imageIndexed", end.image_indexed);
|
||||
SaveVectorIfMissing(*hdf5_file, "/entry/MX/indexedLatticeCount", end.indexed_lattice_count);
|
||||
SaveVectorIfMissing(*hdf5_file, "/entry/MX/bkgEstimate", end.v_bkg_estimate);
|
||||
SaveVectorIfMissing(*hdf5_file, "/entry/MX/profileRadius", end.profile_radius, "Angstrom^-1");
|
||||
SaveVectorIfMissing(*hdf5_file, "/entry/MX/mosaicity", end.mosaicity, "deg");
|
||||
|
||||
Reference in New Issue
Block a user