The serial pre-pass runs once on the first stills_prepass_images frames (new rugnux live setting, default 1000, 100-20000, reset to 1000 by POST /initialize) instead of the doubling stages (500 -> ... -> 2000 frames, stop at 200 geometry frames). One decision: with a cell and at least RUGNUX_LIVE_GEOMETRY_MIN_FRAMES (50) strong frames among them, the beam centre, distance and cell are refined on them; otherwise the header geometry is used exactly as given - the rugnux pre-pass then neither fits nor tries a centre (ProcessConfig::stills_geometry_min_frames), and StillsGPUAnalysis applies beam/distance/cell only where the fit ran. The X-ray-only steps (saturation, shadow, defective pixels, polarization, background ring, powder rings) run as before on the start of the window; the background beam-centre estimate is reported, not applied, when the geometry is kept. Log and live-status notes say "Geometry refined from K of N frames" or "Fewer than 50 strong frames in the first N: header geometry used". Where the hold (at most half of the image buffer) fills before N frames, the pre-pass runs on those held and says so. The first N images are always analysed under stills_downsample. Rotation is unaffected. Two fixes in the stills geometry: - The refit (bundle indexed again at the fitted geometry) was skipped on every modular detector whenever the modules were not being placed, i.e. always live: placing_modules now also needs refine_modules. Offline, where the first fit places the modules and so skips its refit, the fit is run again from the placed geometry, as after a centre the trial moved. - The local beam-centre grid no longer adopts a chance maximum: it moves the centre only from one that puts spots on the lattice. OpenAPI: rugnux_settings/rugnux_status.stills_prepass_images; C++ model, frontend client and python client docs regenerated; frontend settings field. jfjoch_stills_gpu_replay and jfjoch_fpga_stills_test take -P <images>. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HVeDQrPqZ52Tp6rzzZGxf3
382 lines
20 KiB
C++
382 lines
20 KiB
C++
// SPDX-FileCopyrightText: 2026 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
// Rugnux live stills on the FPGA card(s), with a stored dataset as the detector: the first images of a JUNGFRAU
|
|
// dataset folded back into module frames, loaded into the card's internal frame generator and returned verbatim
|
|
// (no conversion), then assembled on the host and analysed through FPGAImagePuller and JFJochReceiverRugnuxStills.
|
|
// The generator cycles through the images its memory holds, so images repeat: throughput, latency and indexing rate
|
|
// are meaningful, the merge and its statistics are not.
|
|
|
|
#include <algorithm>
|
|
#include <atomic>
|
|
#include <getopt.h>
|
|
#include <iostream>
|
|
#include <thread>
|
|
#include <sys/resource.h>
|
|
|
|
#include "../acquisition_device/PCIExpressDevice.h"
|
|
#include "../acquisition_device/MockAcquisitionDevice.h"
|
|
#include "../common/RawToConvertedGeometry.h"
|
|
#include "../common/print_license.h"
|
|
#include "../image_pusher/NonePusher.h"
|
|
#include "../reader/JFJochHDF5Reader.h"
|
|
#include "../receiver/JFJochReceiverService.h"
|
|
#include "../writer/HDF5Objects.h"
|
|
|
|
void print_usage(Logger &logger) {
|
|
logger.Info("Usage ./jfjoch_fpga_stills_test {<options>} <master.h5>");
|
|
logger.Info("The dataset: JUNGFRAU modules, as the file states them (module groups, else the gaps of its mask).");
|
|
logger.Info("Its first images - per card, as many as its generator memory holds of that card's modules - are");
|
|
logger.Info("loaded into the cards' internal generators, which cycle through them: images repeat, so throughput, latency");
|
|
logger.Info("and indexing rate are meaningful, the merge and its statistics are not. See docs/TOOLS.md.");
|
|
logger.Info("Options:");
|
|
logger.Info(" -v Each card's progress, the receiver's and the analysis' counts every 0.5 s");
|
|
logger.Info(" -i<num> Images in the run (default: as many as the file has)");
|
|
logger.Info(" -s<num> Number of data streams (cards)");
|
|
logger.Info(" -N<num> Number of image processing threads (default 64)");
|
|
logger.Info(" -B<num> Size of the image buffer in MiB (default 16384)");
|
|
logger.Info(" -C<a,b,c,alpha,beta,gamma> Unit cell (default: the file's)");
|
|
logger.Info(" -S<group> Space group of the collection (a space group stored in the file is ignored)");
|
|
logger.Info(" -X<txt> Indexing (auto|fft|fftw|ffbidx), auto is default");
|
|
logger.Info(" -t<num> Indexing thread pool size (default: 8, as offline rugnux on stills; the broker's default is 4)");
|
|
logger.Info(" -k<num> Analyse 1 of every <num> images on average (rugnux live stills_downsample, default 1)");
|
|
logger.Info(" -P<num> Pre-pass on the first <num> images (rugnux live stills_prepass_images, default {})",
|
|
STILLS_PREPASS_IMAGES);
|
|
logger.Info(" -m<num> Frames summed into an image (default 1): the card sums the largest divisor up to 256, the");
|
|
logger.Info(" host the rest (1000 = 250 on the card x 4 on the host)");
|
|
logger.Info(" -K{<MiB>} Mock of the card instead of /dev/jfjoch* (optional: its generator memory, default 64 MiB =");
|
|
logger.Info(" 128 module frames)");
|
|
}
|
|
|
|
// A module the file gives the readout of keeps it; one it does not (taken from the gaps of its mask, +x +y) is read
|
|
// out from the top-left corner of its box, along its 1030-pixel side. As the multipixels are symmetric in a module,
|
|
// which corner it is does not change the frames the card returns.
|
|
std::optional<DetectorGeometryModular> GeometryFromModules(const DetectorModules &modules) {
|
|
using Direction = DetectorModuleGeometry::Direction;
|
|
auto along_x = [](Direction d) { return (d == Direction::Xpos) || (d == Direction::Xneg); };
|
|
|
|
std::vector<DetectorModuleGeometry> ret;
|
|
for (const auto &m: modules.Get()) {
|
|
if ((m.width == CONVERTED_MODULE_COLS) && (m.height == CONVERTED_MODULE_LINES) && along_x(m.fast))
|
|
ret.emplace_back(m.ReadoutX0(), m.ReadoutY0(), m.fast, m.slow);
|
|
else if ((m.width == CONVERTED_MODULE_LINES) && (m.height == CONVERTED_MODULE_COLS) && !along_x(m.fast))
|
|
ret.emplace_back(m.ReadoutX0(), m.ReadoutY0(), m.fast, m.slow);
|
|
else if ((m.width == CONVERTED_MODULE_LINES) && (m.height == CONVERTED_MODULE_COLS))
|
|
ret.emplace_back(m.x0, m.y0, Direction::Ypos, Direction::Xpos);
|
|
else
|
|
return {};
|
|
}
|
|
if (ret.empty())
|
|
return {};
|
|
return DetectorGeometryModular(ret);
|
|
}
|
|
|
|
// The images the internal generator holds for this run: what the card memory and the firmware hold (not the broker's
|
|
// limit), at most what the run needs
|
|
int64_t GeneratorImages(AcquisitionDeviceGroup &aq_devices, const DiffractionExperiment &x, int64_t file_images) {
|
|
int64_t ret = std::min<int64_t>(file_images, x.GetImageNum());
|
|
ret = std::min<int64_t>(ret, FPGA_INTERNAL_GENERATOR_MAX_IMAGES);
|
|
for (int i = 0; i < x.GetDataStreamsNum(); i++) {
|
|
// CheckInternalGeneratorFrame leaves the last module frame of the card memory free
|
|
const int64_t module_frames = std::min<int64_t>(aq_devices[i].GetInternalGeneratorModuleFrames() - 1,
|
|
FPGA_INTERNAL_GENERATOR_MAX_MODULE_FRAMES);
|
|
ret = std::min<int64_t>(ret, module_frames / x.GetModulesNum(i));
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
// A stored dataset through the card and rugnux live stills; returns false where the run failed
|
|
bool RunDataset(Logger &logger, AcquisitionDeviceGroup &aq_devices, const std::string &file,
|
|
std::optional<size_t> nimages, uint16_t nstreams, uint16_t nthreads, size_t send_buffer_size_MiB,
|
|
const IndexingSettings &indexing, const std::optional<UnitCell> &cell, bool verbose,
|
|
int64_t downsample, int64_t prepass_images, const std::optional<gemmi::SpaceGroup> &space_group,
|
|
int64_t summation) {
|
|
RegisterHDF5Filter();
|
|
JFJochHDF5Reader reader;
|
|
reader.ReadFile(file);
|
|
const auto dataset = reader.GetDataset();
|
|
const auto &file_x = dataset->experiment;
|
|
|
|
// The modules as the file states them (module groups, else the gaps of its mask)
|
|
const auto geometry = GeometryFromModules(file_x.GetModules());
|
|
if (!geometry || (geometry->GetWidth(true) != file_x.GetXPixelsNum())
|
|
|| (geometry->GetHeight(true) != file_x.GetYPixelsNum())) {
|
|
logger.Error("The file does not state JUNGFRAU modules (1030 x 514) that make up its {} x {} image",
|
|
file_x.GetXPixelsNum(), file_x.GetYPixelsNum());
|
|
return false;
|
|
}
|
|
|
|
DiffractionExperiment x(DetJF(geometry.value()));
|
|
x.Modules(file_x.GetModules());
|
|
x.ImagesPerTrigger(nimages.value_or(reader.GetNumberOfImages())).NumTriggers(1).PedestalG0Frames(0)
|
|
.UseInternalPacketGenerator(true).DataStreams(nstreams);
|
|
// The card returns the frames as loaded; the host assembles them as signed 16-bit photon counts
|
|
x.JungfrauConvPhotonCnt(false).GeometryTransformation(true).PixelSigned(true).BitDepthImage(16);
|
|
// Summed: 32-bit images
|
|
if (summation > 1)
|
|
x.Summation(summation).BitDepthImage(32);
|
|
x.Compression(CompressionAlgorithm::BSHUF_LZ4);
|
|
x.IncidentEnergy_keV(file_x.GetIncidentEnergy_keV()).DetectorDistance_mm(file_x.GetDetectorDistance_mm())
|
|
.BeamX_pxl(file_x.GetBeamX_pxl()).BeamY_pxl(file_x.GetBeamY_pxl());
|
|
x.SetUnitCell(cell ? cell : file_x.GetUnitCell());
|
|
// A space group stored in the file is ignored: only -S gives one, as the user gives it for a collection
|
|
if (space_group)
|
|
x.SetSpaceGroup(*space_group);
|
|
else if (file_x.GetGemmiSpaceGroup())
|
|
logger.Info("Space group {} stored in the file is ignored; -S gives the collection one",
|
|
file_x.GetGemmiSpaceGroup()->hm);
|
|
x.ImportIndexingSettings(indexing);
|
|
|
|
const int64_t generator_images = GeneratorImages(aq_devices, x, reader.GetNumberOfImages());
|
|
if (generator_images < 1) {
|
|
logger.Error("The card memory cannot hold one image of {} modules", x.GetModulesNum(0));
|
|
return false;
|
|
}
|
|
x.InternalPacketGeneratorImages(generator_images, FPGA_INTERNAL_GENERATOR_MAX_IMAGES);
|
|
|
|
PixelMask mask(x);
|
|
if (dataset->pixel_mask->GetMask().size() == x.GetPixelsNum())
|
|
mask.LoadUserMask(x, dataset->pixel_mask->GetMask());
|
|
|
|
logger.Info("Dataset {}: {} images of {} modules, {} distinct ones in the generator, {} in the run",
|
|
file, reader.GetNumberOfImages(), x.GetModulesNum(), generator_images, x.GetImageNum());
|
|
for (int i = 0; i < x.GetDataStreamsNum(); i++)
|
|
logger.Info(" card {}: modules {}-{}, generator memory {} module frames, {} used", i,
|
|
x.GetFirstModuleOfDataStream(i), x.GetFirstModuleOfDataStream(i) + x.GetModulesNum(i) - 1,
|
|
aq_devices[i].GetInternalGeneratorModuleFrames(), x.GetModulesNum(i) * generator_images);
|
|
for (int m = 0; m < x.GetModulesNum(); m++)
|
|
logger.Debug(" module {}: pixel 0 at ({}, {}), fast step {}, slow step {}", m,
|
|
x.GetPixel0OfModuleConv(m) % x.GetXPixelsNum(), x.GetPixel0OfModuleConv(m) / x.GetXPixelsNum(),
|
|
x.GetModuleFastDirectionStep(m), x.GetModuleSlowDirectionStep(m));
|
|
|
|
NonePusher pusher;
|
|
JFJochReceiverService service(aq_devices, logger, pusher, send_buffer_size_MiB);
|
|
service.NumThreads(nthreads);
|
|
service.Indexing(x.GetIndexingSettings());
|
|
service.RugnuxLive(true, nullptr, 4, 60, false, false, downsample, prepass_images);
|
|
|
|
// Error, gap and beam-stop pixels of the reader become error pixels of the module frame
|
|
std::vector<int16_t> frame(x.GetModulesNum() * RAW_MODULE_SIZE);
|
|
std::vector<uint16_t> raw_frame(x.GetModulesNum() * RAW_MODULE_SIZE);
|
|
for (int64_t i = 0; i < generator_images; i++) {
|
|
const auto image = reader.LoadImage(i);
|
|
SqueezeToRawGeometry<int16_t, int32_t>(x, frame.data(), image->Image().data(), BEAM_STOP_PXL_VALUE,
|
|
SATURATED_PXL_VALUE, INT16_MIN, INT16_MAX);
|
|
memcpy(raw_frame.data(), frame.data(), frame.size() * sizeof(int16_t));
|
|
service.LoadInternalGeneratorImage(x, raw_frame, i);
|
|
}
|
|
|
|
logger.Info("");
|
|
logger.Info("=== FPGAImagePuller, {} images ===", x.GetImageNum());
|
|
|
|
rusage usage_start{};
|
|
getrusage(RUSAGE_SELF, &usage_start);
|
|
const auto wall_start = std::chrono::steady_clock::now();
|
|
|
|
service.Start(x, mask, nullptr);
|
|
// -v: each card's progress, the frames of its fastest and slowest module written to the host
|
|
std::atomic<bool> running = true;
|
|
std::thread progress([&] {
|
|
while (running) {
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
|
std::string line;
|
|
for (int i = 0; i < x.GetDataStreamsNum(); i++)
|
|
line += fmt::format(" card {}: {} .. {}{}", i, aq_devices[i].Counters().GetSlowestFrameNumber(),
|
|
aq_devices[i].Counters().GetFastestFrameNumber(),
|
|
aq_devices[i].Counters().IsAcquisitionFinished() ? " done" : "");
|
|
// Where a run stands, so that one that stops shows which part waits
|
|
if (const auto st = service.GetStatus())
|
|
line += fmt::format(" receiver: collected {} sent {}", st->images_collected, st->images_sent);
|
|
const auto live = service.GetRugnuxStatus();
|
|
if (live.stills)
|
|
line += fmt::format(" stills: held {} analysed {} pre-pass {}", live.stills->images_held,
|
|
live.stills->images_analysed, static_cast<int>(live.stills->prepass));
|
|
if (verbose)
|
|
logger.Info("{:.1f} s{}", std::chrono::duration<double>(std::chrono::steady_clock::now()
|
|
- wall_start).count(), line);
|
|
}
|
|
});
|
|
const auto output = service.Stop();
|
|
running = false;
|
|
progress.join();
|
|
const auto live = service.GetRugnuxStatus();
|
|
|
|
const double wall_time = std::chrono::duration<double>(std::chrono::steady_clock::now() - wall_start).count();
|
|
rusage usage_end{};
|
|
getrusage(RUSAGE_SELF, &usage_end);
|
|
auto seconds = [](const timeval &t) { return static_cast<double>(t.tv_sec) + static_cast<double>(t.tv_usec) / 1e6; };
|
|
const double cpu_time = seconds(usage_end.ru_utime) - seconds(usage_start.ru_utime)
|
|
+ seconds(usage_end.ru_stime) - seconds(usage_start.ru_stime);
|
|
|
|
int64_t spots = 0, spot_images = 0;
|
|
for (const auto &e: output.scan_result.images)
|
|
if (e.spot_count) {
|
|
spots += e.spot_count.value();
|
|
spot_images++;
|
|
}
|
|
|
|
// From the first image to the last one into the receiver
|
|
const double delivery_s = live.last_image_s.value_or(0);
|
|
const double delivered_hz = (delivery_s > 0) ? static_cast<double>(output.status.images_collected - 1) / delivery_s : 0;
|
|
|
|
logger.Info("Images expected {} collected {} sent {} efficiency {:.4f}",
|
|
x.GetImageNum(), output.status.images_collected, output.status.images_sent, output.efficiency);
|
|
logger.Info("Delivered {:.1f} Hz (first to last image {:.2f} s)", delivered_hz, delivery_s);
|
|
logger.Info("Sustained {:.1f} Hz (images / wall time {:.2f} s, start to analysis done) CPU {:.1f} s = {:.1f} cores"
|
|
" max resident memory {:.1f} GiB",
|
|
static_cast<double>(output.status.images_collected) / wall_time, wall_time, cpu_time,
|
|
cpu_time / wall_time, static_cast<double>(usage_end.ru_maxrss) / (1024.0 * 1024.0));
|
|
// The card's own count of the cycles (200 MHz) it waited for a host buffer, i.e. was held by the host: the
|
|
// source blocked
|
|
for (int i = 0; i < x.GetDataStreamsNum(); i++) {
|
|
const auto status = aq_devices[i].GetDataCollectionStatus();
|
|
logger.Info("Card {}: waited for host buffers {:.2f} s ({:.1f}% of the delivery), stalls before HBM {} cycles",
|
|
i, status.pipeline_stalls_host / 200e6,
|
|
(delivery_s > 0) ? 100.0 * status.pipeline_stalls_host / 200e6 / delivery_s : 0.0,
|
|
status.pipeline_stalls_hbm);
|
|
}
|
|
logger.Info("Indexing rate {:.3f} spots per image {:.1f}", output.status.indexing_rate.value_or(0),
|
|
static_cast<double>(spots) / std::max<int64_t>(1, spot_images));
|
|
logger.Info("Per-image time (mean; microseconds): preprocess {:.0f} spot finding {:.0f} indexing {:.0f} "
|
|
"refinement {:.0f} integration {:.0f} total {:.0f}",
|
|
output.processing_time.preprocessing * 1e6, output.processing_time.spot_finding * 1e6,
|
|
output.processing_time.indexing * 1e6, output.processing_time.refinement * 1e6,
|
|
output.processing_time.integration * 1e6, output.processing_time.processing * 1e6);
|
|
if (live.stills) {
|
|
const auto &st = *live.stills;
|
|
logger.Info("Pre-pass {:.2f} s: beam {:.2f} {:.2f} px (file {:.2f} {:.2f}), distance {:.2f} mm (file {:.2f})",
|
|
st.prepass_s.value_or(0), st.beam_x_pxl.value_or(NAN), st.beam_y_pxl.value_or(NAN),
|
|
st.file_beam_x_pxl, st.file_beam_y_pxl, st.distance_mm.value_or(NAN), st.file_distance_mm);
|
|
logger.Info("Analysed {} ({:.3f} of the images) indexed {} analysis rate after the pre-pass {:.1f} Hz",
|
|
st.images_analysed, static_cast<double>(st.images_analysed) / x.GetImageNum(),
|
|
st.images_indexed, st.analysis_rate_hz.value_or(0));
|
|
}
|
|
logger.Info("Rugnux: {} {} last image at {:.2f} s, done {:.2f} s after it", live.verdict, live.message,
|
|
live.last_image_s.value_or(NAN), live.last_image_to_written_s.value_or(NAN));
|
|
for (const auto &step: live.steps)
|
|
logger.Info(" step {:.2f} s + {:.2f} s {}", step.started_s, step.duration_s.value_or(NAN), step.title);
|
|
|
|
return (output.efficiency > 0) && (live.state == RugnuxLiveState::Done);
|
|
}
|
|
|
|
int main(int argc, char **argv) {
|
|
print_license("jfjoch_fpga_stills_test");
|
|
|
|
Logger logger("jfjoch_fpga_stills_test");
|
|
logger.Verbose(true);
|
|
|
|
uint16_t nstreams = 1;
|
|
uint16_t nthreads = 64;
|
|
size_t send_buffer_size_MiB = 16384;
|
|
std::optional<size_t> nimages;
|
|
std::optional<UnitCell> cell;
|
|
IndexingAlgorithmEnum indexing = IndexingAlgorithmEnum::Auto;
|
|
uint16_t indexing_threads = 8; // as offline rugnux's stills (Rugnux::StillsIndexerThreads)
|
|
std::optional<uint32_t> mock_card_MiB;
|
|
bool verbose = false;
|
|
int64_t downsample = 1;
|
|
int64_t prepass_images = STILLS_PREPASS_IMAGES;
|
|
int64_t summation = 1;
|
|
std::optional<gemmi::SpaceGroup> space_group;
|
|
|
|
int opt;
|
|
while ((opt = getopt(argc, argv, "vi:s:N:B:C:S:X:t:k:P:m:K::")) != -1) {
|
|
switch (opt) {
|
|
case 'v':
|
|
verbose = true;
|
|
break;
|
|
case 'i':
|
|
nimages = atol(optarg);
|
|
break;
|
|
case 's':
|
|
nstreams = atol(optarg);
|
|
break;
|
|
case 'N':
|
|
nthreads = atol(optarg);
|
|
break;
|
|
case 'B':
|
|
send_buffer_size_MiB = atol(optarg);
|
|
break;
|
|
case 'C': {
|
|
UnitCell c{};
|
|
if (sscanf(optarg, "%f,%f,%f,%f,%f,%f", &c.a, &c.b, &c.c, &c.alpha, &c.beta, &c.gamma) != 6) {
|
|
print_usage(logger);
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
cell = c;
|
|
break;
|
|
}
|
|
case 'X':
|
|
if (std::string(optarg) == "fft" || std::string(optarg) == "FFT")
|
|
indexing = IndexingAlgorithmEnum::FFT;
|
|
else if (std::string(optarg) == "ffbidx" || std::string(optarg) == "FFBIDX")
|
|
indexing = IndexingAlgorithmEnum::FFBIDX;
|
|
else if (std::string(optarg) == "fftw" || std::string(optarg) == "FFTW")
|
|
indexing = IndexingAlgorithmEnum::FFTW;
|
|
else
|
|
indexing = IndexingAlgorithmEnum::Auto;
|
|
break;
|
|
case 't':
|
|
indexing_threads = atol(optarg);
|
|
break;
|
|
case 'k':
|
|
downsample = atol(optarg);
|
|
break;
|
|
case 'P':
|
|
prepass_images = atol(optarg);
|
|
break;
|
|
case 'm':
|
|
summation = atol(optarg);
|
|
break;
|
|
case 'S': {
|
|
const gemmi::SpaceGroup *sg = gemmi::find_spacegroup_by_name(optarg);
|
|
if (sg == nullptr) {
|
|
print_usage(logger);
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
space_group = *sg;
|
|
break;
|
|
}
|
|
case 'K':
|
|
mock_card_MiB = (optarg != nullptr) ? atol(optarg) : 64;
|
|
break;
|
|
default:
|
|
print_usage(logger);
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
}
|
|
|
|
if (optind != argc - 1) {
|
|
print_usage(logger);
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
// -v gives the progress lines only: the debug log has a line for every module frame
|
|
logger.Verbose(false);
|
|
|
|
AcquisitionDeviceGroup aq_devices;
|
|
for (int i = 0; i < nstreams; i++) {
|
|
std::unique_ptr<AcquisitionDevice> device;
|
|
if (mock_card_MiB)
|
|
device = std::make_unique<MockAcquisitionDevice>(i, 128, mock_card_MiB.value() * 1024 * 1024);
|
|
else
|
|
device = std::make_unique<PCIExpressDevice>(i, "/dev/jfjoch" + std::to_string(i));
|
|
device->EnableLogging(&logger);
|
|
device->SetIPv4Address((i << 24) + 0x010a0a0a);
|
|
aq_devices.Add(std::move(device));
|
|
}
|
|
|
|
IndexingSettings i_settings;
|
|
i_settings.Algorithm(indexing);
|
|
i_settings.IndexingThreads(indexing_threads);
|
|
|
|
bool ret = false;
|
|
try {
|
|
ret = RunDataset(logger, aq_devices, argv[optind], nimages, nstreams, nthreads, send_buffer_size_MiB,
|
|
i_settings, cell, verbose, downsample, prepass_images, space_group,
|
|
summation);
|
|
} catch (std::exception &e) {
|
|
logger.Error(e.what());
|
|
}
|
|
exit(ret ? EXIT_SUCCESS : EXIT_FAILURE);
|
|
}
|