DiffractionExperiment: Rename GetFPGAOutputDepth -> GetPixelDepth and GetFPGASummation -> GetSummation
This commit is contained in:
@@ -41,7 +41,7 @@ DiffractionExperiment::DiffractionExperiment(const DetectorSetup& det_setup) {
|
||||
|
||||
dataset.set_ntrigger(1);
|
||||
dataset.set_images_per_trigger(1);
|
||||
dataset.set_fpga_summation(1);
|
||||
dataset.set_summation(1);
|
||||
dataset.set_fpga_pixel_output(JFJochProtoBuf::AUTO);
|
||||
dataset.set_space_group_number(0); // not set
|
||||
|
||||
@@ -396,7 +396,7 @@ std::chrono::microseconds DiffractionExperiment::GetImageTime() const {
|
||||
return std::chrono::microseconds(internal.frame_time_pedestalg1g2_us());
|
||||
case DetectorMode::Conversion:
|
||||
case DetectorMode::Raw:
|
||||
return GetFrameTime() * GetFPGASummation();
|
||||
return GetFrameTime() * GetSummation();
|
||||
case DetectorMode::PedestalG0:
|
||||
default:
|
||||
return GetFrameTime();
|
||||
@@ -422,7 +422,7 @@ int64_t DiffractionExperiment::GetImageNumPerTrigger() const {
|
||||
case DetectorMode::Raw:
|
||||
if (GetStorageCellNumber() > 1)
|
||||
return GetStorageCellNumber();
|
||||
return GetFrameNumPerTrigger() / GetFPGASummation();
|
||||
return GetFrameNumPerTrigger() / GetSummation();
|
||||
case DetectorMode::PedestalG0:
|
||||
case DetectorMode::PedestalG1:
|
||||
case DetectorMode::PedestalG2:
|
||||
@@ -442,7 +442,7 @@ int64_t DiffractionExperiment::GetFrameNumPerTrigger() const {
|
||||
if (GetStorageCellNumber() > 1)
|
||||
return GetStorageCellNumber();
|
||||
else
|
||||
return dataset.images_per_trigger() * GetFPGASummation();
|
||||
return dataset.images_per_trigger() * GetSummation();
|
||||
case DetectorMode::PedestalG0:
|
||||
if (GetPedestalWithExternalTrigger())
|
||||
return GetStorageCellNumber();
|
||||
@@ -465,7 +465,7 @@ std::chrono::microseconds DiffractionExperiment::GetFrameCountTime() const {
|
||||
}
|
||||
|
||||
std::chrono::microseconds DiffractionExperiment::GetImageCountTime() const {
|
||||
return GetFrameCountTime() * GetFPGASummation();
|
||||
return GetFrameCountTime() * GetSummation();
|
||||
}
|
||||
|
||||
int64_t DiffractionExperiment::GetPedestalG0Frames() const {
|
||||
@@ -536,11 +536,34 @@ CompressionAlgorithm DiffractionExperiment::GetCompressionAlgorithmEnum() const
|
||||
}
|
||||
|
||||
int64_t DiffractionExperiment::GetPixelDepth() const {
|
||||
return GetFPGAOutputDepth();
|
||||
switch (GetFPGAOutputMode()) {
|
||||
case JFJochProtoBuf::INT16:
|
||||
case JFJochProtoBuf::UINT16:
|
||||
return 2;
|
||||
case JFJochProtoBuf::AUTO:
|
||||
if (GetSummation() > 2)
|
||||
return 4;
|
||||
else
|
||||
return 2;
|
||||
default:
|
||||
case JFJochProtoBuf::INT32:
|
||||
case JFJochProtoBuf::UINT32:
|
||||
return 4;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool DiffractionExperiment::IsPixelSigned() const {
|
||||
return GetFPGAOutputSigned();
|
||||
switch (GetFPGAOutputMode()) {
|
||||
case JFJochProtoBuf::INT16:
|
||||
case JFJochProtoBuf::INT32:
|
||||
case JFJochProtoBuf::AUTO:
|
||||
return true;
|
||||
default:
|
||||
case JFJochProtoBuf::UINT16:
|
||||
case JFJochProtoBuf::UINT32:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
int64_t DiffractionExperiment::GetDataStreamsNum() const {
|
||||
@@ -726,10 +749,6 @@ float DiffractionExperiment::GetQSpacingForRadialInt_recipA() const {
|
||||
return internal.q_spacing();
|
||||
}
|
||||
|
||||
JFJochProtoBuf::DetectorType DiffractionExperiment::GetDetectorType() const {
|
||||
return internal.detector().type();
|
||||
}
|
||||
|
||||
int64_t DiffractionExperiment::GetMaxSpotCount() const {
|
||||
return max_spot_count;
|
||||
}
|
||||
@@ -829,10 +848,10 @@ void DiffractionExperiment::LoadDatasetSettings(const JFJochProtoBuf::DatasetSet
|
||||
SampleName(settings.sample_name());
|
||||
Compression(settings.compression());
|
||||
SaveCalibration(settings.save_calibration());
|
||||
if (settings.fpga_summation() == 0)
|
||||
FPGASummation(1);
|
||||
if (settings.summation() == 0)
|
||||
Summation(1);
|
||||
else
|
||||
FPGASummation(settings.fpga_summation());
|
||||
Summation(settings.summation());
|
||||
FPGAOutputMode(settings.fpga_pixel_output());
|
||||
} catch (...) {
|
||||
dataset = tmp;
|
||||
@@ -973,7 +992,7 @@ void DiffractionExperiment::FillMessage(StartMessage &message) const {
|
||||
|
||||
message.instrument_name = GetInstrumentName();
|
||||
message.instrument_name_short = GetInstrumentNameShort();
|
||||
message.summation = GetFPGASummation();
|
||||
message.summation = GetSummation();
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::ApplyPixelMaskInFPGA(bool input) {
|
||||
@@ -1101,14 +1120,14 @@ std::chrono::nanoseconds DiffractionExperiment::GetStorageCellDelay() const {
|
||||
return std::chrono::nanoseconds(internal.storage_cell_delay_ns());
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::FPGASummation(int64_t input) {
|
||||
DiffractionExperiment &DiffractionExperiment::Summation(int64_t input) {
|
||||
check_min("Summation", input, 1);
|
||||
check_max("Summation", input, MAX_FPGA_SUMMATION);
|
||||
dataset.set_fpga_summation(input);
|
||||
dataset.set_summation(input);
|
||||
return *this;
|
||||
}
|
||||
|
||||
int64_t DiffractionExperiment::GetFPGASummation() const {
|
||||
int64_t DiffractionExperiment::GetSummation() const {
|
||||
switch (GetDetectorMode()) {
|
||||
case DetectorMode::PedestalG0:
|
||||
case DetectorMode::PedestalG1:
|
||||
@@ -1118,7 +1137,7 @@ int64_t DiffractionExperiment::GetFPGASummation() const {
|
||||
case DetectorMode::Conversion:
|
||||
case DetectorMode::Raw:
|
||||
// FPGA summation for raw data makes zero sense - but it is still available as a means for debug, etc.
|
||||
return dataset.fpga_summation();
|
||||
return dataset.summation();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1128,36 +1147,6 @@ DiffractionExperiment &DiffractionExperiment::FPGAOutputMode(const JFJochProtoBu
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool DiffractionExperiment::GetFPGAOutputSigned() const {
|
||||
switch (GetFPGAOutputMode()) {
|
||||
case JFJochProtoBuf::INT16:
|
||||
case JFJochProtoBuf::INT32:
|
||||
case JFJochProtoBuf::AUTO:
|
||||
return true;
|
||||
default:
|
||||
case JFJochProtoBuf::UINT16:
|
||||
case JFJochProtoBuf::UINT32:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
int64_t DiffractionExperiment::GetFPGAOutputDepth() const {
|
||||
switch (GetFPGAOutputMode()) {
|
||||
case JFJochProtoBuf::INT16:
|
||||
case JFJochProtoBuf::UINT16:
|
||||
return 2;
|
||||
case JFJochProtoBuf::AUTO:
|
||||
if (GetFPGASummation() > 2)
|
||||
return 4;
|
||||
else
|
||||
return 2;
|
||||
default:
|
||||
case JFJochProtoBuf::INT32:
|
||||
case JFJochProtoBuf::UINT32:
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
|
||||
JFJochProtoBuf::FPGAPixelOutput DiffractionExperiment::GetFPGAOutputMode() const {
|
||||
return dataset.fpga_pixel_output();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user