v1.0.0-rc.40
This commit is contained in:
@@ -584,8 +584,6 @@ void DiffractionExperiment::CheckDataProcessingSettings(const SpotFindingSetting
|
||||
check_max("Spot finding low resolution limit", settings.low_resolution_limit, 50.0);
|
||||
}
|
||||
check_min("min spot count for powder ring detection", settings.min_spot_count_powder_ring, 5);
|
||||
check_min("indexing tolerance", settings.indexing_tolerance, 0.0);
|
||||
check_max("indexing tolerance", settings.indexing_tolerance, 1.0);
|
||||
}
|
||||
|
||||
SpotFindingSettings DiffractionExperiment::DefaultDataProcessingSettings() {
|
||||
@@ -643,13 +641,8 @@ void DiffractionExperiment::FillMessage(StartMessage &message) const {
|
||||
message.countrate_correction_enabled = false;
|
||||
message.flatfield_enabled = false;
|
||||
|
||||
auto goniometer = dataset.GetGoniometer();
|
||||
if (goniometer) {
|
||||
message.goniometer = goniometer;
|
||||
message.rotation_axis[0] = GetRotationAxis().x;
|
||||
message.rotation_axis[1] = GetRotationAxis().y;
|
||||
message.rotation_axis[2] = GetRotationAxis().z;
|
||||
}
|
||||
message.goniometer = dataset.GetGoniometer();
|
||||
message.grid_scan = dataset.GetGridScan();
|
||||
|
||||
message.run_number = GetRunNumber();
|
||||
message.run_name = GetRunName();
|
||||
@@ -840,6 +833,10 @@ std::optional<GoniometerAxis> DiffractionExperiment::GetGoniometer() const {
|
||||
return dataset.GetGoniometer();
|
||||
}
|
||||
|
||||
std::optional<GridScanSettings> DiffractionExperiment::GetGridScan() const {
|
||||
return dataset.GetGridScan();
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::UsingGainHG0(bool input) {
|
||||
detector_settings.UseGainHG0(input);
|
||||
return *this;
|
||||
@@ -876,15 +873,6 @@ const nlohmann::json& DiffractionExperiment::GetImageAppendix() const {
|
||||
return dataset.GetImageAppendix();
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::RotationAxis(const Coord &c) {
|
||||
dataset.RotationAxis(c);
|
||||
return *this;
|
||||
}
|
||||
|
||||
Coord DiffractionExperiment::GetRotationAxis() const {
|
||||
return dataset.GetRotationAxis();
|
||||
}
|
||||
|
||||
uint64_t DiffractionExperiment::GetRunNumber() const {
|
||||
if (dataset.GetRunNumber())
|
||||
return dataset.GetRunNumber().value();
|
||||
@@ -1009,6 +997,9 @@ DiffractionExperiment &DiffractionExperiment::ImportDatasetSettings(const Datase
|
||||
} else
|
||||
summation = 1;
|
||||
|
||||
if (dataset.GridScan())
|
||||
dataset.GridScan()->ImageNum(GetImageNum());
|
||||
|
||||
if (GetFrameNum() >= MAX_FRAMES) {
|
||||
dataset = tmp;
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
|
||||
@@ -1385,4 +1376,53 @@ void DiffractionExperiment::CalcSpotFinderResolutionMap(float *data, size_t modu
|
||||
auto [x,y] = RawToConvertedCoordinate(*this, module_number, i);
|
||||
data[i] = geom.PxlToRes(static_cast<float>(x), static_cast<float>(y));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CompressedImageMode DiffractionExperiment::GetImageMode() const {
|
||||
switch (GetByteDepthImage()) {
|
||||
case 1:
|
||||
return (IsPixelSigned() ? CompressedImageMode::Int8 : CompressedImageMode::Uint8);
|
||||
case 2:
|
||||
return (IsPixelSigned() ? CompressedImageMode::Int16 : CompressedImageMode::Uint16);
|
||||
case 4:
|
||||
return (IsPixelSigned() ? CompressedImageMode::Int32 : CompressedImageMode::Uint32);
|
||||
default:
|
||||
throw (JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Bit depth not supported"));
|
||||
}
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::IndexingAlgorithm(IndexingAlgorithmEnum input) {
|
||||
indexing.Algorithm(input);
|
||||
return *this;
|
||||
}
|
||||
|
||||
IndexingAlgorithmEnum DiffractionExperiment::GetIndexingAlgorithm() const {
|
||||
if (!GetUnitCell() && indexing.GetAlgorithm() == IndexingAlgorithmEnum::FFBIDX)
|
||||
return IndexingAlgorithmEnum::None;
|
||||
|
||||
return indexing.GetAlgorithm();
|
||||
}
|
||||
|
||||
IndexingSettings DiffractionExperiment::GetIndexingSettings() const {
|
||||
return indexing;
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::ImportIndexingSettings(const IndexingSettings &input) {
|
||||
indexing = input;
|
||||
return *this;
|
||||
}
|
||||
|
||||
float DiffractionExperiment::GetIndexingTolerance() const {
|
||||
return indexing.GetTolerance();
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::IndexingTolerance(float input) {
|
||||
indexing.Tolerance(input);
|
||||
return *this;
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::GridScan(const std::optional<GridScanSettings> &input) {
|
||||
dataset.GridScan(input);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user