DiffractionExperiment: Remove 2x2 binning to simplify transformation code
This commit is contained in:
@@ -516,17 +516,11 @@ float DiffractionExperiment::GetWavelength_A() const {
|
||||
}
|
||||
|
||||
float DiffractionExperiment::GetBeamX_pxl() const {
|
||||
if (GetBinning2x2())
|
||||
return dataset.beam_x_pxl() / 2.0f;
|
||||
else
|
||||
return dataset.beam_x_pxl();
|
||||
return dataset.beam_x_pxl();
|
||||
}
|
||||
|
||||
float DiffractionExperiment::GetBeamY_pxl() const {
|
||||
if (GetBinning2x2())
|
||||
return dataset.beam_y_pxl() / 2.0f;
|
||||
else
|
||||
return dataset.beam_y_pxl();
|
||||
return dataset.beam_y_pxl();
|
||||
}
|
||||
|
||||
float DiffractionExperiment::GetDetectorDistance_mm() const {
|
||||
@@ -608,32 +602,14 @@ int64_t DiffractionExperiment::GetPixelsNum() const {
|
||||
return GetXPixelsNum() * GetYPixelsNum();
|
||||
}
|
||||
|
||||
int64_t DiffractionExperiment::GetPixelsNumFullImage() const {
|
||||
return GetXPixelsNumFullImage() * GetYPixelsNumFullImage();
|
||||
}
|
||||
|
||||
int64_t DiffractionExperiment::GetXPixelsNumFullImage() const {
|
||||
int64_t DiffractionExperiment::GetXPixelsNum() const {
|
||||
if (GetDetectorMode() != DetectorMode::Conversion)
|
||||
return RAW_MODULE_COLS;
|
||||
else
|
||||
return internal.detector().geometry().width_pxl();
|
||||
}
|
||||
|
||||
int64_t DiffractionExperiment::GetXPixelsNum() const {
|
||||
if (GetBinning2x2())
|
||||
return GetXPixelsNumFullImage() / 2;
|
||||
else
|
||||
return GetXPixelsNumFullImage();
|
||||
}
|
||||
|
||||
int64_t DiffractionExperiment::GetYPixelsNum() const {
|
||||
if (GetBinning2x2())
|
||||
return GetYPixelsNumFullImage() / 2;
|
||||
else
|
||||
return GetYPixelsNumFullImage();
|
||||
}
|
||||
|
||||
int64_t DiffractionExperiment::GetYPixelsNumFullImage() const {
|
||||
if (GetDetectorMode() != DetectorMode::Conversion)
|
||||
return RAW_MODULE_LINES * GetModulesNum();
|
||||
else
|
||||
@@ -884,7 +860,6 @@ void DiffractionExperiment::LoadDatasetSettings(const JFJochProtoBuf::DatasetSet
|
||||
SpaceGroupNumber(settings.space_group_number());
|
||||
SampleName(settings.sample_name());
|
||||
Compression(settings.compression());
|
||||
Binning2x2(settings.binning2x2());
|
||||
SaveCalibration(settings.save_calibration());
|
||||
if (settings.fpga_summation() == 0)
|
||||
FPGASummation(1);
|
||||
@@ -1046,22 +1021,7 @@ bool DiffractionExperiment::GetApplyPixelMaskInFPGA() const {
|
||||
}
|
||||
|
||||
float DiffractionExperiment::GetPixelSize_mm() const {
|
||||
if (GetBinning2x2())
|
||||
return internal.detector().pixel_size_mm() * 2;
|
||||
else
|
||||
return internal.detector().pixel_size_mm();
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::Binning2x2(bool input) {
|
||||
dataset.set_binning2x2(input);
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool DiffractionExperiment::GetBinning2x2() const {
|
||||
if (GetDetectorMode() == DetectorMode::Conversion)
|
||||
return dataset.binning2x2();
|
||||
else
|
||||
return false;
|
||||
return internal.detector().pixel_size_mm();
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::SourceName(std::string input) {
|
||||
|
||||
Reference in New Issue
Block a user