b735aec1c4
- The Indexing tab now shows what the selected algorithm resolves to on this
machine/dataset ("Effective on this system: ..."), mirroring
DiffractionExperiment::GetIndexingAlgorithm() so Auto is no longer ambiguous
(GPU present? unit cell known?). Cell-known state is forwarded from the loaded
dataset via JFJochSettingsWindow::datasetLoaded.
- FFBIDX and FFT (GPU) radio options are disabled on builds without CUDA, where
only the FFTW CPU indexer exists.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
73 lines
2.8 KiB
C++
73 lines
2.8 KiB
C++
// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#pragma once
|
|
|
|
#include <QMainWindow>
|
|
#include <QCheckBox>
|
|
#include <QLabel>
|
|
#include <QPushButton>
|
|
|
|
#include "JFJochHelperWindow.h"
|
|
#include "../common/IndexingSettings.h"
|
|
#include "../widgets/SliderPlusBox.h"
|
|
#include "../../image_analysis/spot_finding/SpotFindingSettings.h"
|
|
|
|
class QButtonGroup;
|
|
|
|
// Holds the spot finding and indexing controls. The two are exposed as separate pages
|
|
// (TakeSpotFindingPage / TakeIndexingPage) so the settings window can show them as two tabs.
|
|
class JFJochViewerProcessingWindow : public JFJochHelperWindow {
|
|
Q_OBJECT
|
|
|
|
QCheckBox *m_enableCheckBox;
|
|
|
|
SliderPlusBox *m_signalToNoise;
|
|
SliderPlusBox *m_photonCount;
|
|
SliderPlusBox *m_minPixPerSpot;
|
|
SliderPlusBox *m_maxPixPerSpot;
|
|
SliderPlusBox *m_highResolution;
|
|
SliderPlusBox *m_lowResolution;
|
|
SliderPlusBox *m_maxSpotCount; // New: Max spot count slider
|
|
QCheckBox *m_highResSpuriousFilterCheckBox;
|
|
SliderPlusBox *m_highResSpuriousGapOneOverD; // [0.01 .. 0.5], step 0.001
|
|
|
|
QCheckBox *m_indexingCheckBox;
|
|
QCheckBox *m_quickIntegrationCheckBox;
|
|
|
|
QButtonGroup *m_indexAlgGroup; // indexing algorithm (FFBIDX/FFT/FFTW/Auto/None)
|
|
QButtonGroup *m_geomRefGroup; // geometry refinement (None/Orientation/Beam/Pixel)
|
|
QLabel *m_resolvedAlgLabel; // what Auto/FFBIDX resolves to on this system
|
|
bool m_unitCellKnown = false; // drives FFBIDX vs FFT resolution of Auto
|
|
|
|
SliderPlusBox *m_idxTolerance; // [0.0 .. 0.5], step 0.001
|
|
SliderPlusBox *m_idxUnitCellDistTolerance; // [0.0001 .. 0.2001], step 0.0001
|
|
QCheckBox *m_idxIndexIceRings;
|
|
SliderPlusBox *m_idxViableCellMinSpots; // integer >= 6
|
|
|
|
SliderPlusBox *m_iceRingWidthQRecipA;
|
|
|
|
QWidget *m_spotFindingPage;
|
|
QWidget *m_indexingPage;
|
|
|
|
SpotFindingSettings m_settings;
|
|
IndexingSettings m_indexing;
|
|
|
|
void Update();
|
|
void UpdateResolvedAlgorithmLabel(); // refresh the "effective on this system" hint
|
|
public:
|
|
explicit JFJochViewerProcessingWindow(const SpotFindingSettings &settings, const IndexingSettings& indexing,
|
|
QWidget *parent = nullptr);
|
|
|
|
// The two pages, for lifting into tabs. Ownership passes to the caller (e.g. a QTabWidget).
|
|
QWidget *TakeSpotFindingPage() { return m_spotFindingPage; }
|
|
QWidget *TakeIndexingPage() { return m_indexingPage; }
|
|
|
|
public slots:
|
|
// Whether the current dataset has a known unit cell (affects how Auto/FFBIDX resolve).
|
|
void setUnitCellKnown(bool known);
|
|
|
|
signals:
|
|
void settingsChanged(const SpotFindingSettings &settings, const IndexingSettings &indexing, int64_t max_spots);
|
|
};
|