All checks were successful
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 7m47s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 7m20s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 8m13s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 7m10s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 7m53s
Build Packages / build:rpm (rocky8) (push) Successful in 7m57s
Build Packages / Generate python client (push) Successful in 13s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 7m39s
Build Packages / Create release (push) Has been skipped
Build Packages / Build documentation (push) Successful in 36s
Build Packages / build:rpm (rocky9) (push) Successful in 9m0s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 6m55s
Build Packages / Unit tests (push) Successful in 1h10m44s
This is an UNSTABLE release. * Fixes in CI pipeline * jfjoch_broker: Remove PNG preview, no dependency on libpng * jfjoch_writer: Fix UTC timestamp being generated wrong (mix between milli- and microseconds) * jfjoch_viewer: Show data collection time in dataset tooltip * jfjoch_viewer: Allow to choose the calibrant (presets for LaB6 and silver behenate) * jfjoch_viewer: Auto foreground value * Use external libjpeg-turbo and libtiff: simpler build stack, these are built and linked statically in automated Docker builds * Remove OpenBLAS dependency Reviewed-on: #1 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch> Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
41 lines
1.6 KiB
C++
41 lines
1.6 KiB
C++
// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#ifndef JFJOCH_ASSIGNSPOTSTORINGS_H
|
|
#define JFJOCH_ASSIGNSPOTSTORINGS_H
|
|
|
|
#include <vector>
|
|
#include "../../common/UnitCell.h"
|
|
#include "../../common/SpotToSave.h"
|
|
#include "RingOptimizer.h"
|
|
|
|
struct RingClusters {
|
|
std::vector<int> spots;
|
|
float R_obs;
|
|
int ring_idx = -1;
|
|
};
|
|
|
|
struct FindCircleCenterResult {
|
|
int64_t total_votes;
|
|
int64_t votes_for_beam_center;
|
|
float x;
|
|
float y;
|
|
};
|
|
|
|
FindCircleCenterResult FindCircleCenter(const std::vector<SpotToSave> &v,
|
|
int64_t width = 4000,
|
|
int64_t height = 4000,
|
|
int64_t max_spots = 500);
|
|
|
|
std::vector<std::vector<int>> ClusterSpotsIntoRings(const std::vector<float>& r, float eps = 1.5, int minPts = 5);
|
|
std::vector<RingClusters> AnalyzeClusters(const std::vector<float>& r, const std::vector<std::vector<int>> &clusters);
|
|
std::vector<float> CalculateXtalRings(const UnitCell &cell, int hkl_max = 6);
|
|
std::vector<float> CalculateCubicXtalRings( float a, int hkl_max = 4);
|
|
float GuessDetectorDistance(const DiffractionGeometry& geom, float ring_radius_pxl, float d_A);
|
|
|
|
std::vector<RingClusters> GuessInitialGeometry(DiffractionGeometry &geom, const std::vector<SpotToSave> &v, float calibrant_a_A);
|
|
void GuessGeometry(DiffractionGeometry &geom, const std::vector<SpotToSave> &v, const UnitCell &calibrant);
|
|
void OptimizeGeometry(DiffractionGeometry &geom, const std::vector<SpotToSave> &v, const UnitCell &calibrant);
|
|
|
|
#endif //JFJOCH_ASSIGNSPOTSTORINGS_H
|