Viewer: a run's results shown leave "Known unit cell" unticked too
When a finished job's _process.h5 becomes the active run (or the user switches runs), the settings panel shows the run's cell and space group but no longer ticks "Known unit cell", so the next run determines the crystal from the data as a bare rugnux does, unless the user ticks it. Before, the run's crystal - P1 for a run that ended there - was used by every later run until cleared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PXc1zD1yxHqaR1DGdCTHL4
This commit is contained in:
1 parent
5e8525a0ff
commit
c72e4e97c7
5 files changed
+12
-10
No files matched your search
@@ -46,7 +46,7 @@ void ApplyRugnuxExperimentDefaults(DiffractionExperiment &experiment);
|
|||||||
// it to that lattice, and a stored space group skips the search outright. The CLI calls this and then
|
// it to that lattice, and a stored space group skips the search outright. The CLI calls this and then
|
||||||
// applies -C / -S (or a reference MTZ) on top; the viewer instead takes the crystal straight from its
|
// applies -C / -S (or a reference MTZ) on top; the viewer instead takes the crystal straight from its
|
||||||
// settings panel, which clears both fields when "Unit cell known" is unticked - as it is when a file is
|
// settings panel, which clears both fields when "Unit cell known" is unticked - as it is when a file is
|
||||||
// opened.
|
// opened or a run's results are shown.
|
||||||
void ClearStoredCrystal(DiffractionExperiment &experiment);
|
void ClearStoredCrystal(DiffractionExperiment &experiment);
|
||||||
|
|
||||||
// Scaling/merging defaults for the workflow. Several differ between rotation and stills because the
|
// Scaling/merging defaults for the workflow. Several differ between rotation and stills because the
|
||||||
|
|||||||
@@ -627,8 +627,11 @@ JFJochViewerWindow::JFJochViewerWindow(QWidget *parent, bool dbus, const QString
|
|||||||
reading_worker, &JFJochImageReadingWorker::FindCenter);
|
reading_worker, &JFJochImageReadingWorker::FindCenter);
|
||||||
connect(this, &JFJochViewerWindow::datasetReady,
|
connect(this, &JFJochViewerWindow::datasetReady,
|
||||||
settingsPanel, &JFJochViewerSettingsDock::datasetLoaded);
|
settingsPanel, &JFJochViewerSettingsDock::datasetLoaded);
|
||||||
|
// Both arrive after the datasetLoaded that fills the panel from the new file / run.
|
||||||
connect(reading_worker, &JFJochImageReadingWorker::fileOpened,
|
connect(reading_worker, &JFJochImageReadingWorker::fileOpened,
|
||||||
settingsPanel, &JFJochViewerSettingsDock::fileOpened);
|
settingsPanel, &JFJochViewerSettingsDock::forgetStoredCrystal);
|
||||||
|
connect(reading_worker, &JFJochImageReadingWorker::snapshotsChanged,
|
||||||
|
settingsPanel, &JFJochViewerSettingsDock::forgetStoredCrystal);
|
||||||
connect(this, &JFJochViewerWindow::imageReady,
|
connect(this, &JFJochViewerWindow::imageReady,
|
||||||
settingsPanel, &JFJochViewerSettingsDock::loadImage);
|
settingsPanel, &JFJochViewerSettingsDock::loadImage);
|
||||||
connect(settingsPanel, &JFJochViewerSettingsDock::ringsFromCalibration,
|
connect(settingsPanel, &JFJochViewerSettingsDock::ringsFromCalibration,
|
||||||
|
|||||||
@@ -1022,7 +1022,7 @@ void JFJochViewerSettingsDock::datasetLoaded(std::shared_ptr<const JFJochReaderD
|
|||||||
ApplyProcessingMode(); // the mode just read back decides rotation vs stills
|
ApplyProcessingMode(); // the mode just read back decides rotation vs stills
|
||||||
}
|
}
|
||||||
|
|
||||||
void JFJochViewerSettingsDock::fileOpened() {
|
void JFJochViewerSettingsDock::forgetStoredCrystal() {
|
||||||
cellKnown_->setChecked(false); // a change emits the experiment without the crystal
|
cellKnown_->setChecked(false); // a change emits the experiment without the crystal
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ public:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void datasetLoaded(std::shared_ptr<const JFJochReaderDataset> dataset);
|
void datasetLoaded(std::shared_ptr<const JFJochReaderDataset> dataset);
|
||||||
// A new file: the crystal it stores is shown but not used until "Known unit cell" is ticked, as a
|
// A new file, or a run's results shown: the crystal they store is shown but not used until "Known
|
||||||
// bare `rugnux` forgets it (ClearStoredCrystal).
|
// unit cell" is ticked, as a bare `rugnux` forgets it (ClearStoredCrystal).
|
||||||
void fileOpened();
|
void forgetStoredCrystal();
|
||||||
void loadImage(std::shared_ptr<const JFJochReaderImage> image);
|
void loadImage(std::shared_ptr<const JFJochReaderImage> image);
|
||||||
void referenceLoaded(ReferenceMtzInfo info); // worker reports a (un)loaded reference MTZ
|
void referenceLoaded(ReferenceMtzInfo info); // worker reports a (un)loaded reference MTZ
|
||||||
// Dataset re-processing reads a stored HDF5 file, so it is unavailable on a live HTTP stream:
|
// Dataset re-processing reads a stored HDF5 file, so it is unavailable on a live HTTP stream:
|
||||||
|
|||||||
@@ -432,10 +432,9 @@ void JFJochProcessingJobsWindow::newJob(ProcessMode mode, CalibrationSelection c
|
|||||||
//
|
//
|
||||||
// The cell and space group come from the settings panel and nowhere else: with "Unit cell known"
|
// The cell and space group come from the settings panel and nowhere else: with "Unit cell known"
|
||||||
// ticked they are indexed and merged with, unticked the panel clears both and the run determines
|
// ticked they are indexed and merged with, unticked the panel clears both and the run determines
|
||||||
// them from the data (-C / -S versus bare `rugnux`). A newly opened file starts unticked - its stored
|
// them from the data (-C / -S versus bare `rugnux`). A newly opened file, and a run's results when
|
||||||
// crystal is shown but not used, as `rugnux` forgets it - so what a run uses is always the crystal
|
// they are shown, start unticked - the crystal they store is shown but not used, as `rugnux` forgets
|
||||||
// shown on screen. A finished job's _process.h5 becoming the active snapshot does tick it with the
|
// it - so what a run uses is always the crystal ticked on screen.
|
||||||
// run's crystal (a run that ended in P1 shows P1), which can be cleared before the next run.
|
|
||||||
DiffractionExperiment experiment = inputs.experiment;
|
DiffractionExperiment experiment = inputs.experiment;
|
||||||
const auto polarization = experiment.GetPolarizationFactor();
|
const auto polarization = experiment.GetPolarizationFactor();
|
||||||
ApplyRugnuxExperimentDefaults(experiment);
|
ApplyRugnuxExperimentDefaults(experiment);
|
||||||
|
|||||||
Reference in new issue
Block a user