Replace the dead PartialityModel with a force_still_processing flag

With ScaleOnTheFly now fixed-only and rotation routed through RotationScaleMerge, the
PartialityModel enum carried no information (it was always Rotation for rotation processing,
Fixed otherwise, and mirrored combine_3d). Drop it:

- ScalingSettings: `partiality_mode` (PartialityModel) -> `force_still_processing` (bool);
  SetPartialityModel/GetPartialityModel -> ForceStillProcessing/GetForceStillProcessing.
  Remove the enum.
- DiffractionExperiment: drop GetPartialityModel(); the rotation-vs-stills decision is now
  just GetCombine3D() (set by the tool = rotation && !force_still). The wedge getters no longer
  key off the model (dead since wedge refinement was removed).
- jfjoch_process: `-P/--partiality fixed|rot3d` -> `--force-still-processing` (a rotation
  dataset scaled as independent stills). Auto-detect sets combine_3d for rotation data unless
  the flag is given.
- jfjoch_scale: `-P fixed|rot3d` now toggles combine_3d directly (no PartialityModel).
- jfjoch_viewer: the "process as stills" toggle sets ForceStillProcessing(!rotation_mode) -
  UI unchanged, just wired to the new field.

PartialityModel was never in the OpenAPI, so no generated clients change. Rotation path
behaviour is unchanged (lyso 16.4/99.6%/87.3%); --force-still-processing correctly routes to
ScaleOnTheFly. CUDA + non-CUDA + viewer all build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-03 11:58:34 +02:00
co-authored by Claude Opus 4.8
parent 9f45935fd3
commit b4d3d40cd8
9 changed files with 35 additions and 73 deletions
+2 -22
View File
@@ -1696,30 +1696,10 @@ DiffractionExperiment &DiffractionExperiment::RunNumber(uint64_t input) {
return *this;
}
PartialityModel DiffractionExperiment::GetPartialityModel() const {
if (const auto model = scaling_settings.GetPartialityModel())
return model.value();
if (GetGoniometer().has_value())
return PartialityModel::Rotation;
return PartialityModel::Unity;
}
std::optional<double> DiffractionExperiment::GetRotationWedgeForScaling() const {
// Only makes sense for rotation partiality model
// If ScalingSettings set one, it is takes priority
// otherwise if this is really rotation scan, than actual rotation wedge is given
// otherwise return std::nullopt
if (GetPartialityModel() != PartialityModel::Rotation)
return std::nullopt;
if (scaling_settings.GetRotationWedgeForScaling().has_value())
return scaling_settings.GetRotationWedgeForScaling();
if (GetGoniometer().has_value())
return GetGoniometer()->GetWedge_deg();
return std::nullopt;
return scaling_settings.GetRotationWedgeForScaling();
}
bool DiffractionExperiment::GetRefineRotationWedgeInScaling() const {
if (GetRotationWedgeForScaling().has_value())
return scaling_settings.GetRefineWedge();
return false;
return scaling_settings.GetRotationWedgeForScaling().has_value() && scaling_settings.GetRefineWedge();
}