diff --git a/docs/RUGNUX_CLI.md b/docs/RUGNUX_CLI.md index da955336f..21d1f1f65 100644 --- a/docs/RUGNUX_CLI.md +++ b/docs/RUGNUX_CLI.md @@ -99,7 +99,7 @@ indexing rate reported per master as well. Such masters must share the detector, distance and beam centre. Several inputs must be one format; any `--mode` other than `mx`, and following a broker, take one. -Several rotation sweeps are told apart from the files: one sweep per CBF/marCCD/SMV file-name +Several rotation sweeps are told apart from the files: one sweep per CBF/marCCD/SMV/SFRM file-name template (the name with its frame number taken out - any frame of a sweep names the whole sweep, so `rugnux a_*.cbf` is the one sweep `a`), one per rotation master. Only the inputs given are processed; other sweeps beside them are named in the log. A mix of rotation and stills masters is refused, and diff --git a/rugnux/RugnuxSweeps.h b/rugnux/RugnuxSweeps.h index eec15b1a7..4cb5598a4 100644 --- a/rugnux/RugnuxSweeps.h +++ b/rugnux/RugnuxSweeps.h @@ -8,7 +8,7 @@ #include // The rotation sweeps a rugnux command line names, decided from the files in the order given: -// - frame files (CBF, marCCD, SMV): one sweep per file-name template - the name with its last run of +// - frame files (CBF, marCCD, SMV, Bruker SFRM): one sweep per file-name template - the name with its last run of // digits, the frame number, taken out. Any frame of a sweep names the whole sweep, so several frames // of one template are one sweep; // - masters: one sweep per rotation master. Several stills masters stay one stills run, as before, and diff --git a/rugnux/rugnux_cli.cpp b/rugnux/rugnux_cli.cpp index d2c4424b3..32ccf04ae 100644 --- a/rugnux/rugnux_cli.cpp +++ b/rugnux/rugnux_cli.cpp @@ -3844,7 +3844,8 @@ int RugnuxCli::Run() { RugnuxInputDescription d; if (!crystfel_geometry.empty()) d.foreign = true; - else if (JFJochCBFReader::CanRead(f) || JFJochMarCCDReader::CanRead(f) || JFJochSMVReader::CanRead(f)) + else if (JFJochCBFReader::CanRead(f) || JFJochMarCCDReader::CanRead(f) || JFJochSMVReader::CanRead(f) + || JFJochSFRMReader::CanRead(f)) d.frame_template = RugnuxFrameTemplate(f); else d.foreign = JFJochXFELReader::CanReadPanelTable(f) || JFJochXFELReader::CanReadCXI(f) @@ -3868,6 +3869,11 @@ int RugnuxCli::Run() { r.ReadFiles(f); return r.GetDataset(); } + if (JFJochSFRMReader::CanRead(f)) { + JFJochSFRMReader r; + r.ReadFiles(f); + return r.GetDataset(); + } JFJochHDF5Reader r; r.ReadFile(f); return r.GetDataset(); @@ -3908,7 +3914,7 @@ int RugnuxCli::Run() { for (size_t k = 0; k < plan.sweeps.size(); k++) logger.Info("Sweep {}: {}", k + 1, plan.sweeps[k].label); - for (const auto &s: RugnuxSiblingSweeps(plan, {".cbf", ".img", ".mccd", ".osc"})) + for (const auto &s: RugnuxSiblingSweeps(plan, {".cbf", ".img", ".mccd", ".osc", ".sfrm"})) logger.Info("Also beside these inputs, not given and so not processed: {}", s); if (start_image != 0 || end_image >= 0) { logger.Error("-s / -e select images of one sweep; with several sweeps give each sweep's frames instead");