pub fn run_benchmark_subset_case<A: ReconstructionAlgorithm>(
dataset_name: impl Into<String>,
algorithm_configuration: impl Into<String>,
algorithm: A,
subset: &DatasetSubset,
) -> Result<(BenchmarkRecord, Option<ReconstructionResult>)>Expand description
Runs a concrete algorithm on a resolved dataset subset and records its provenance.
Clones the subset into a validated problem and evaluates its optional cropped
truth and valid-object mask. Records the resolved original frame/illumination
identifiers and [row, column, height, width] detector crop even when the
algorithm fails. The deterministic case identity includes those selections.
Problem-construction errors are returned; reconstruction and metric failures
remain in record.error, as in run_benchmark_case.
use fpm_rs::{algorithms::AlternatingProjection, benchmark::run_benchmark_subset_case,
datasets::{DatasetLoader, FrameSelector}, Result};
let dataset = DatasetLoader::new("converted-fpm")?.load()?;
let subset = dataset.subset().frames(FrameSelector::EveryNth(2))
.crop_pixels(0, 0, 16, 16)?.build()?;
let (record, result) = run_benchmark_subset_case(
"converted-fpm", "iterations=10", AlternatingProjection::default().iterations(10),
&subset,
)?;
assert_eq!(record.spatial_crop, Some([0, 0, 16, 16]));