gRPC: Changed behavior, so mask application during conversion is now default behavior

This commit is contained in:
2023-06-30 13:34:45 +02:00
parent f9deb58d20
commit a66ac66d0b
4 changed files with 6 additions and 6 deletions

View File

@@ -921,7 +921,7 @@ void DiffractionExperiment::LoadDatasetSettings(const JFJochProtoBuf::DatasetSet
if (settings.has_scattering_vector())
ScatteringVector({0,0,1});
Compression(settings.compression());
ApplyPixelMaskInFPGA(settings.apply_pixel_mask());
ApplyPixelMaskInFPGA(!settings.debug_pixel_mask());
Binning2x2(settings.binning2x2());
} catch (...) {
dataset = tmp;
@@ -1083,13 +1083,13 @@ void DiffractionExperiment::FillMessage(StartMessage &message) const {
}
DiffractionExperiment &DiffractionExperiment::ApplyPixelMaskInFPGA(bool input) {
dataset.set_apply_pixel_mask(input);
dataset.set_debug_pixel_mask(!input);
return *this;
}
bool DiffractionExperiment::GetApplyPixelMaskInFPGA() const {
if (GetDetectorMode() == DetectorMode::Conversion)
return dataset.apply_pixel_mask();
return !dataset.debug_pixel_mask();
else
return false;
}

View File

@@ -104,7 +104,7 @@ message DatasetSettings {
optional Vector scattering_vector = 15;
bool apply_pixel_mask = 16;
bool debug_pixel_mask = 16;
bool binning2x2 = 17;

File diff suppressed because one or more lines are too long

View File

@@ -736,7 +736,7 @@ TEST_CASE("DiffractionExperiment_LoadDatasetSettings", "[DiffractionExperiment]"
settings.set_data_file_count(5);
settings.set_space_group_number(45);
settings.set_sample_name("lyso1");
settings.set_apply_pixel_mask(true);
settings.set_debug_pixel_mask(false);
settings.set_binning2x2(true);
REQUIRE_NOTHROW(x.LoadDatasetSettings(settings));