gRPC: Mask application during conversion is part of internal settings and is not part of easy accessible settings (to ensure it is always applied)
This commit is contained in:
@@ -54,6 +54,8 @@ DiffractionExperiment::DiffractionExperiment(const DetectorSetup& det_setup) {
|
||||
dataset.set_rad_int_solid_angle_corr(false);
|
||||
dataset.set_save_calibration(false);
|
||||
|
||||
internal.set_debug_pixel_mask(false);
|
||||
|
||||
internal.set_ndatastreams(1);
|
||||
|
||||
internal.set_frame_time_us(MIN_FRAME_TIME_HALF_SPEED_IN_US);
|
||||
@@ -921,7 +923,6 @@ void DiffractionExperiment::LoadDatasetSettings(const JFJochProtoBuf::DatasetSet
|
||||
if (settings.has_scattering_vector())
|
||||
ScatteringVector({0,0,1});
|
||||
Compression(settings.compression());
|
||||
ApplyPixelMaskInFPGA(!settings.debug_pixel_mask());
|
||||
Binning2x2(settings.binning2x2());
|
||||
} catch (...) {
|
||||
dataset = tmp;
|
||||
@@ -1083,13 +1084,13 @@ void DiffractionExperiment::FillMessage(StartMessage &message) const {
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::ApplyPixelMaskInFPGA(bool input) {
|
||||
dataset.set_debug_pixel_mask(!input);
|
||||
internal.set_debug_pixel_mask(!input);
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool DiffractionExperiment::GetApplyPixelMaskInFPGA() const {
|
||||
if (GetDetectorMode() == DetectorMode::Conversion)
|
||||
return !dataset.debug_pixel_mask();
|
||||
return !internal.debug_pixel_mask();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -104,8 +104,6 @@ message DatasetSettings {
|
||||
|
||||
optional Vector scattering_vector = 15;
|
||||
|
||||
bool debug_pixel_mask = 16;
|
||||
|
||||
bool binning2x2 = 17;
|
||||
|
||||
bool rad_int_solid_angle_corr = 18;
|
||||
@@ -113,6 +111,8 @@ message DatasetSettings {
|
||||
float rad_int_polarization_factor = 20;
|
||||
|
||||
bool save_calibration = 21;
|
||||
|
||||
repeated ROIRectangle user_mask = 22;
|
||||
}
|
||||
|
||||
message DetectorSettings {
|
||||
@@ -194,6 +194,8 @@ message InternalSettings {
|
||||
|
||||
repeated ROIRectangle roi_rectangle = 36;
|
||||
bool roi_apply = 37;
|
||||
|
||||
bool debug_pixel_mask = 38;
|
||||
}
|
||||
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -736,7 +736,6 @@ TEST_CASE("DiffractionExperiment_LoadDatasetSettings", "[DiffractionExperiment]"
|
||||
settings.set_data_file_count(5);
|
||||
settings.set_space_group_number(45);
|
||||
settings.set_sample_name("lyso1");
|
||||
settings.set_debug_pixel_mask(false);
|
||||
settings.set_binning2x2(true);
|
||||
|
||||
REQUIRE_NOTHROW(x.LoadDatasetSettings(settings));
|
||||
@@ -750,7 +749,6 @@ TEST_CASE("DiffractionExperiment_LoadDatasetSettings", "[DiffractionExperiment]"
|
||||
REQUIRE(x.GetSampleName() == "lyso1");
|
||||
REQUIRE(x.GetDataFileCount() == 5);
|
||||
REQUIRE(x.GetDetectorDistance_mm() == Approx(57.6));
|
||||
REQUIRE(x.GetApplyPixelMaskInFPGA());
|
||||
REQUIRE(x.GetBinning2x2());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user