rugnux: an LCLS XTC stream is read without a .expt when --pixel-size, --detector-distance and --wavelength are given
Brings the stills-geom-auto-lcls merge resolution (b10a8ce00) onto the rc178-based stills branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3643b890b0
commit
63595c0513
3 files changed
+36
-11
No files matched your search
@@ -123,15 +123,29 @@ void JFJochXTCReader::ReadFiles(const std::string &path) {
|
||||
f.file + ": the images are not all the same size");
|
||||
|
||||
const std::string expt = FindExpt(frames_.front().file);
|
||||
if (expt.empty())
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
|
||||
"XTC carries no detector geometry: put the DIALS experiment list (.expt) of "
|
||||
"the run beside the XTC files, or in the directory above them");
|
||||
Logger("XTCReader").Info("{} images in XTC, geometry from {}", frames_.size(), expt);
|
||||
|
||||
dataset_ = std::make_shared<JFJochReaderDataset>();
|
||||
dataset_->experiment = default_experiment;
|
||||
ReadGeometry(expt);
|
||||
has_geometry_ = !expt.empty();
|
||||
if (has_geometry_) {
|
||||
Logger("XTCReader").Info("{} images in XTC, geometry from {}", frames_.size(), expt);
|
||||
ReadGeometry(expt);
|
||||
} else {
|
||||
// XTC states no geometry. One flat panel, square-on, with its middle on the beam - the run
|
||||
// measures the centre - and the pixel size, distance and wavelength to be given by the caller.
|
||||
Logger("XTCReader").Info("{} images in XTC, no .expt beside them: one flat panel centred on the beam",
|
||||
frames_.size());
|
||||
const auto &f0 = frames_.front();
|
||||
DetectorSetup detector = DetDECTRIS(f0.width, f0.height, "XTC camera", {});
|
||||
detector.SensorThickness_um(0);
|
||||
detector.SaturationLimit(65535);
|
||||
detector.BitDepthImage(32);
|
||||
detector.MinFrameTime(std::chrono::microseconds(0));
|
||||
detector.MinCountTime(std::chrono::microseconds(0));
|
||||
detector.ReadOutTime(std::chrono::nanoseconds(0));
|
||||
dataset_->experiment.Detector(detector);
|
||||
dataset_->experiment.BeamX_pxl(0.5f * static_cast<float>(f0.width));
|
||||
dataset_->experiment.BeamY_pxl(0.5f * static_cast<float>(f0.height));
|
||||
}
|
||||
dataset_->error_value = -1;
|
||||
dataset_->experiment.ImagesPerTrigger(static_cast<int64_t>(frames_.size()));
|
||||
dataset_->pixel_mask = std::make_shared<const PixelMask>(frames_.front().width, frames_.front().height);
|
||||
|
||||
Reference in new issue
Block a user