DiffractionExperiment: Rename GetFPGAOutputDepth -> GetPixelDepth and GetFPGASummation -> GetSummation
This commit is contained in:
1 parent
dec3eb15de
commit
591e724cf6
13 files changed
+173
-202
No files matched your search
@@ -31,10 +31,6 @@ std::string DetectorSetup::GetDescription() const {
|
||||
return description;
|
||||
}
|
||||
|
||||
JFJochProtoBuf::DetectorType DetectorSetup::GetDetectorType() const {
|
||||
return JFJochProtoBuf::DetectorType::JUNGFRAU;
|
||||
}
|
||||
|
||||
float DetectorSetup::GetPixelSize_mm() const {
|
||||
return PIXEL_SIZE_IN_MM;
|
||||
}
|
||||
@@ -69,6 +65,5 @@ DetectorSetup::operator JFJochProtoBuf::Detector() const {
|
||||
ret.add_module_hostname(iter);
|
||||
|
||||
*ret.mutable_geometry() = geometry;
|
||||
ret.set_type(JFJochProtoBuf::DetectorType::JUNGFRAU);
|
||||
return ret;
|
||||
}
|
||||
@@ -25,7 +25,6 @@ public:
|
||||
[[nodiscard]] const std::vector<std::string>& GetDetectorModuleHostname() const;
|
||||
[[nodiscard]] uint64_t GetModulesNum() const;
|
||||
[[nodiscard]] std::string GetDescription() const;
|
||||
[[nodiscard]] JFJochProtoBuf::DetectorType GetDetectorType() const;
|
||||
[[nodiscard]] float GetPixelSize_mm() const;
|
||||
[[nodiscard]] const std::vector<JFModuleGainCalibration> &GetGainCalibration() const;
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
@@ -179,7 +179,6 @@ public:
|
||||
int64_t GetStorageCellNumber() const;
|
||||
int64_t GetStorageCellStart() const;
|
||||
|
||||
JFJochProtoBuf::DetectorType GetDetectorType() const;
|
||||
int64_t GetMaxSpotCount() const;
|
||||
std::string GetSampleName() const;
|
||||
|
||||
@@ -204,12 +203,10 @@ public:
|
||||
DiffractionExperiment& SaveCalibration(bool input);
|
||||
bool GetSaveCalibration() const;
|
||||
|
||||
DiffractionExperiment& FPGASummation(int64_t input);
|
||||
int64_t GetFPGASummation() const;
|
||||
DiffractionExperiment& Summation(int64_t input);
|
||||
int64_t GetSummation() const;
|
||||
|
||||
DiffractionExperiment& FPGAOutputMode(const JFJochProtoBuf::FPGAPixelOutput& input);
|
||||
bool GetFPGAOutputSigned() const;
|
||||
int64_t GetFPGAOutputDepth() const;
|
||||
JFJochProtoBuf::FPGAPixelOutput GetFPGAOutputMode() const;
|
||||
};
|
||||
|
||||
|
||||
+1
-7
@@ -11,11 +11,6 @@ enum Compression {
|
||||
NO_COMPRESSION = 3;
|
||||
}
|
||||
|
||||
enum DetectorType {
|
||||
JUNGFRAU = 0;
|
||||
EIGER = 1;
|
||||
};
|
||||
|
||||
enum DetectorMode {
|
||||
CONVERSION = 0;
|
||||
RAW = 1;
|
||||
@@ -84,7 +79,7 @@ message DatasetSettings {
|
||||
int64 ntrigger = 2;
|
||||
|
||||
FPGAPixelOutput fpga_pixel_output = 3;
|
||||
int64 fpga_summation = 4;
|
||||
int64 summation = 4;
|
||||
|
||||
float beam_x_pxl = 5;
|
||||
float beam_y_pxl = 6;
|
||||
@@ -140,7 +135,6 @@ message Detector {
|
||||
float pixel_size_mm = 3;
|
||||
repeated string module_hostname = 4;
|
||||
DetectorGeometry geometry = 5;
|
||||
DetectorType type = 6;
|
||||
int64 udp_interface_count = 7;
|
||||
}
|
||||
|
||||
|
||||
+104
-106
@@ -13,27 +13,25 @@ _sym_db = _symbol_database.Default()
|
||||
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cjfjoch.proto\x12\x0eJFJochProtoBuf\"\x07\n\x05\x45mpty\"W\n\x08UnitCell\x12\t\n\x01\x61\x18\x01 \x01(\x02\x12\t\n\x01\x62\x18\x02 \x01(\x02\x12\t\n\x01\x63\x18\x03 \x01(\x02\x12\r\n\x05\x61lpha\x18\x04 \x01(\x02\x12\x0c\n\x04\x62\x65ta\x18\x05 \x01(\x02\x12\r\n\x05gamma\x18\x06 \x01(\x02\")\n\x06Vector\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\t\n\x01z\x18\x03 \x01(\x02\"|\n\x10RotationSettings\x12\x17\n\x0fstart_angle_deg\x18\x01 \x01(\x02\x12 \n\x18\x61ngle_incr_per_image_deg\x18\x02 \x01(\x02\x12-\n\rrotation_axis\x18\x03 \x01(\x0b\x32\x16.JFJochProtoBuf.Vector\"\x1c\n\x04Plot\x12\t\n\x01x\x18\x01 \x03(\x02\x12\t\n\x01y\x18\x02 \x03(\x02\"\xc9\x04\n\x0f\x44\x61tasetSettings\x12\x1a\n\x12images_per_trigger\x18\x01 \x01(\x03\x12\x10\n\x08ntrigger\x18\x02 \x01(\x03\x12:\n\x11\x66pga_pixel_output\x18\x03 \x01(\x0e\x32\x1f.JFJochProtoBuf.FPGAPixelOutput\x12\x16\n\x0e\x66pga_summation\x18\x04 \x01(\x03\x12\x12\n\nbeam_x_pxl\x18\x05 \x01(\x02\x12\x12\n\nbeam_y_pxl\x18\x06 \x01(\x02\x12\x1c\n\x14\x64\x65tector_distance_mm\x18\x07 \x01(\x02\x12\x19\n\x11photon_energy_keV\x18\x08 \x01(\x02\x12\x13\n\x0b\x66ile_prefix\x18\t \x01(\t\x12\x17\n\x0f\x64\x61ta_file_count\x18\n \x01(\x03\x12\x30\n\x0b\x63ompression\x18\x0b \x01(\x0e\x32\x1b.JFJochProtoBuf.Compression\x12\x13\n\x0bsample_name\x18\x0c \x01(\t\x12\x30\n\tunit_cell\x18\r \x01(\x0b\x32\x18.JFJochProtoBuf.UnitCellH\x00\x88\x01\x01\x12\x1a\n\x12space_group_number\x18\x0e \x01(\x03\x12 \n\x18rad_int_solid_angle_corr\x18\x12 \x01(\x08\x12!\n\x19rad_int_polarization_corr\x18\x13 \x01(\x08\x12#\n\x1brad_int_polarization_factor\x18\x14 \x01(\x02\x12\x18\n\x10save_calibration\x18\x15 \x01(\x08\x42\x0c\n\n_unit_cell\"\x9a\x03\n\x10\x44\x65tectorSettings\x12\x15\n\rframe_time_us\x18\x01 \x01(\x03\x12\x1a\n\rcount_time_us\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\x12storage_cell_count\x18\x03 \x01(\x03\x12%\n\x1duse_internal_packet_generator\x18\x04 \x01(\x08\x12\x18\n\x10\x63ollect_raw_data\x18\x05 \x01(\x08\x12\x1f\n\x12pedestal_g0_frames\x18\x06 \x01(\x03H\x01\x88\x01\x01\x12\x1f\n\x12pedestal_g1_frames\x18\x07 \x01(\x03H\x02\x88\x01\x01\x12\x1f\n\x12pedestal_g2_frames\x18\x08 \x01(\x03H\x03\x88\x01\x01\x12\"\n\x15storage_cell_delay_ns\x18\n \x01(\x03H\x04\x88\x01\x01\x42\x10\n\x0e_count_time_usB\x15\n\x13_pedestal_g0_framesB\x15\n\x13_pedestal_g1_framesB\x15\n\x13_pedestal_g2_framesB\x18\n\x16_storage_cell_delay_ns\"b\n\x16\x44\x65tectorModuleGeometry\x12\x0e\n\x06pixel0\x18\x01 \x01(\x03\x12\x1b\n\x13\x66\x61st_direction_step\x18\x02 \x01(\x03\x12\x1b\n\x13slow_direction_step\x18\x03 \x01(\x03\"z\n\x10\x44\x65tectorGeometry\x12\x11\n\twidth_pxl\x18\x01 \x01(\x03\x12\x12\n\nheight_pxl\x18\x02 \x01(\x03\x12?\n\x0fmodule_geometry\x18\x03 \x03(\x0b\x32&.JFJochProtoBuf.DetectorModuleGeometry\"\xde\x01\n\x08\x44\x65tector\x12\x10\n\x08nmodules\x18\x01 \x01(\x03\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rpixel_size_mm\x18\x03 \x01(\x02\x12\x17\n\x0fmodule_hostname\x18\x04 \x03(\t\x12\x32\n\x08geometry\x18\x05 \x01(\x0b\x32 .JFJochProtoBuf.DetectorGeometry\x12*\n\x04type\x18\x06 \x01(\x0e\x32\x1c.JFJochProtoBuf.DetectorType\x12\x1b\n\x13udp_interface_count\x18\x07 \x01(\x03\"\xdf\x05\n\x10InternalSettings\x12\"\n\x1a\x66rame_time_pedestalG1G2_us\x18\x01 \x01(\x03\x12\x15\n\rframe_time_us\x18\x03 \x01(\x03\x12\x15\n\rcount_time_us\x18\x04 \x01(\x03\x12*\n\x08\x64\x65tector\x18\x05 \x01(\x0b\x32\x18.JFJochProtoBuf.Detector\x12\x14\n\x0cndatastreams\x18\x06 \x01(\x03\x12&\n\x1einternal_fpga_packet_generator\x18\t \x01(\x08\x12\x15\n\rstorage_cells\x18\n \x01(\x03\x12\x1a\n\x12storage_cell_start\x18\x0b \x01(\x03\x12\x1d\n\x15storage_cell_delay_ns\x18\' \x01(\x03\x12\x1a\n\x12pedestal_g0_frames\x18\x0c \x01(\x03\x12\x1a\n\x12pedestal_g1_frames\x18\r \x01(\x03\x12\x1a\n\x12pedestal_g2_frames\x18\x0e \x01(\x03\x12\x19\n\x11preview_period_us\x18\x0f \x01(\x03\x12*\n\x04mode\x18\x13 \x01(\x0e\x32\x1c.JFJochProtoBuf.DetectorMode\x12\x19\n\x11mask_module_edges\x18\x14 \x01(\x08\x12\x17\n\x0fmask_chip_edges\x18\x15 \x01(\x08\x12\x16\n\x0eipv4_base_addr\x18\x16 \x01(\x03\x12\r\n\x05low_q\x18\x1a \x01(\x02\x12\x0e\n\x06high_q\x18\x1b \x01(\x02\x12\x11\n\tq_spacing\x18\x1c \x01(\x02\x12\x10\n\x08git_sha1\x18\x1d \x01(\t\x12\x10\n\x08git_date\x18\x1e \x01(\t\x12\x13\n\x0bsource_name\x18 \x01(\t\x12\x19\n\x11source_name_short\x18! \x01(\t\x12\x17\n\x0finstrument_name\x18\" \x01(\t\x12\x1d\n\x15instrument_name_short\x18# \x01(\t\x12\x18\n\x10\x64\x65\x62ug_pixel_mask\x18& \x01(\x08\"|\n\x14JungfraujochSettings\x12\x30\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x1f.JFJochProtoBuf.DatasetSettings\x12\x32\n\x08internal\x18\x02 \x01(\x0b\x32 .JFJochProtoBuf.InternalSettings\"\x1e\n\nJFPedestal\x12\x10\n\x08pedestal\x18\x01 \x01(\x0c\"-\n\x11JFGainCalibration\x12\x18\n\x10gain_calibration\x18\x01 \x01(\x0c\"\xb2\x01\n\rJFCalibration\x12\x10\n\x08nmodules\x18\x01 \x01(\x04\x12\x16\n\x0enstLine truncated
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cjfjoch.proto\x12\x0eJFJochProtoBuf\"\x07\n\x05\x45mpty\"W\n\x08UnitCell\x12\t\n\x01\x61\x18\x01 \x01(\x02\x12\t\n\x01\x62\x18\x02 \x01(\x02\x12\t\n\x01\x63\x18\x03 \x01(\x02\x12\r\n\x05\x61lpha\x18\x04 \x01(\x02\x12\x0c\n\x04\x62\x65ta\x18\x05 \x01(\x02\x12\r\n\x05gamma\x18\x06 \x01(\x02\")\n\x06Vector\x12\t\n\x01x\x18\x01 \x01(\x02\x12\t\n\x01y\x18\x02 \x01(\x02\x12\t\n\x01z\x18\x03 \x01(\x02\"|\n\x10RotationSettings\x12\x17\n\x0fstart_angle_deg\x18\x01 \x01(\x02\x12 \n\x18\x61ngle_incr_per_image_deg\x18\x02 \x01(\x02\x12-\n\rrotation_axis\x18\x03 \x01(\x0b\x32\x16.JFJochProtoBuf.Vector\"\x1c\n\x04Plot\x12\t\n\x01x\x18\x01 \x03(\x02\x12\t\n\x01y\x18\x02 \x03(\x02\"\xc4\x04\n\x0f\x44\x61tasetSettings\x12\x1a\n\x12images_per_trigger\x18\x01 \x01(\x03\x12\x10\n\x08ntrigger\x18\x02 \x01(\x03\x12:\n\x11\x66pga_pixel_output\x18\x03 \x01(\x0e\x32\x1f.JFJochProtoBuf.FPGAPixelOutput\x12\x11\n\tsummation\x18\x04 \x01(\x03\x12\x12\n\nbeam_x_pxl\x18\x05 \x01(\x02\x12\x12\n\nbeam_y_pxl\x18\x06 \x01(\x02\x12\x1c\n\x14\x64\x65tector_distance_mm\x18\x07 \x01(\x02\x12\x19\n\x11photon_energy_keV\x18\x08 \x01(\x02\x12\x13\n\x0b\x66ile_prefix\x18\t \x01(\t\x12\x17\n\x0f\x64\x61ta_file_count\x18\n \x01(\x03\x12\x30\n\x0b\x63ompression\x18\x0b \x01(\x0e\x32\x1b.JFJochProtoBuf.Compression\x12\x13\n\x0bsample_name\x18\x0c \x01(\t\x12\x30\n\tunit_cell\x18\r \x01(\x0b\x32\x18.JFJochProtoBuf.UnitCellH\x00\x88\x01\x01\x12\x1a\n\x12space_group_number\x18\x0e \x01(\x03\x12 \n\x18rad_int_solid_angle_corr\x18\x12 \x01(\x08\x12!\n\x19rad_int_polarization_corr\x18\x13 \x01(\x08\x12#\n\x1brad_int_polarization_factor\x18\x14 \x01(\x02\x12\x18\n\x10save_calibration\x18\x15 \x01(\x08\x42\x0c\n\n_unit_cell\"\x9a\x03\n\x10\x44\x65tectorSettings\x12\x15\n\rframe_time_us\x18\x01 \x01(\x03\x12\x1a\n\rcount_time_us\x18\x02 \x01(\x03H\x00\x88\x01\x01\x12\x1a\n\x12storage_cell_count\x18\x03 \x01(\x03\x12%\n\x1duse_internal_packet_generator\x18\x04 \x01(\x08\x12\x18\n\x10\x63ollect_raw_data\x18\x05 \x01(\x08\x12\x1f\n\x12pedestal_g0_frames\x18\x06 \x01(\x03H\x01\x88\x01\x01\x12\x1f\n\x12pedestal_g1_frames\x18\x07 \x01(\x03H\x02\x88\x01\x01\x12\x1f\n\x12pedestal_g2_frames\x18\x08 \x01(\x03H\x03\x88\x01\x01\x12\"\n\x15storage_cell_delay_ns\x18\n \x01(\x03H\x04\x88\x01\x01\x42\x10\n\x0e_count_time_usB\x15\n\x13_pedestal_g0_framesB\x15\n\x13_pedestal_g1_framesB\x15\n\x13_pedestal_g2_framesB\x18\n\x16_storage_cell_delay_ns\"b\n\x16\x44\x65tectorModuleGeometry\x12\x0e\n\x06pixel0\x18\x01 \x01(\x03\x12\x1b\n\x13\x66\x61st_direction_step\x18\x02 \x01(\x03\x12\x1b\n\x13slow_direction_step\x18\x03 \x01(\x03\"z\n\x10\x44\x65tectorGeometry\x12\x11\n\twidth_pxl\x18\x01 \x01(\x03\x12\x12\n\nheight_pxl\x18\x02 \x01(\x03\x12?\n\x0fmodule_geometry\x18\x03 \x03(\x0b\x32&.JFJochProtoBuf.DetectorModuleGeometry\"\xb2\x01\n\x08\x44\x65tector\x12\x10\n\x08nmodules\x18\x01 \x01(\x03\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x15\n\rpixel_size_mm\x18\x03 \x01(\x02\x12\x17\n\x0fmodule_hostname\x18\x04 \x03(\t\x12\x32\n\x08geometry\x18\x05 \x01(\x0b\x32 .JFJochProtoBuf.DetectorGeometry\x12\x1b\n\x13udp_interface_count\x18\x07 \x01(\x03\"\xdf\x05\n\x10InternalSettings\x12\"\n\x1a\x66rame_time_pedestalG1G2_us\x18\x01 \x01(\x03\x12\x15\n\rframe_time_us\x18\x03 \x01(\x03\x12\x15\n\rcount_time_us\x18\x04 \x01(\x03\x12*\n\x08\x64\x65tector\x18\x05 \x01(\x0b\x32\x18.JFJochProtoBuf.Detector\x12\x14\n\x0cndatastreams\x18\x06 \x01(\x03\x12&\n\x1einternal_fpga_packet_generator\x18\t \x01(\x08\x12\x15\n\rstorage_cells\x18\n \x01(\x03\x12\x1a\n\x12storage_cell_start\x18\x0b \x01(\x03\x12\x1d\n\x15storage_cell_delay_ns\x18\' \x01(\x03\x12\x1a\n\x12pedestal_g0_frames\x18\x0c \x01(\x03\x12\x1a\n\x12pedestal_g1_frames\x18\r \x01(\x03\x12\x1a\n\x12pedestal_g2_frames\x18\x0e \x01(\x03\x12\x19\n\x11preview_period_us\x18\x0f \x01(\x03\x12*\n\x04mode\x18\x13 \x01(\x0e\x32\x1c.JFJochProtoBuf.DetectorMode\x12\x19\n\x11mask_module_edges\x18\x14 \x01(\x08\x12\x17\n\x0fmask_chip_edges\x18\x15 \x01(\x08\x12\x16\n\x0eipv4_base_addr\x18\x16 \x01(\x03\x12\r\n\x05low_q\x18\x1a \x01(\x02\x12\x0e\n\x06high_q\x18\x1b \x01(\x02\x12\x11\n\tq_spacing\x18\x1c \x01(\x02\x12\x10\n\x08git_sha1\x18\x1d \x01(\t\x12\x10\n\x08git_date\x18\x1e \x01(\t\x12\x13\n\x0bsource_name\x18 \x01(\t\x12\x19\n\x11source_name_short\x18! \x01(\t\x12\x17\n\x0finstrument_name\x18\" \x01(\t\x12\x1d\n\x15instrument_name_short\x18# \x01(\t\x12\x18\n\x10\x64\x65\x62ug_pixel_mask\x18& \x01(\x08\"|\n\x14JungfraujochSettings\x12\x30\n\x07\x64\x61taset\x18\x01 \x01(\x0b\x32\x1f.JFJochProtoBuf.DatasetSettings\x12\x32\n\x08internal\x18\x02 \x01(\x0b\x32 .JFJochProtoBuf.InternalSettings\"\x1e\n\nJFPedestal\x12\x10\n\x08pedestal\x18\x01 \x01(\x0c\"-\n\x11JFGainCalibration\x12\x18\n\x10gain_calibration\x18\x01 \x01(\x0c\"\xb2\x01\n\rJFCalibration\x12\x10\n\x08nmodules\x18\x01 \x01(\x04\x12\x16\n\x0enstorage_cells\x18\x02 \x01(\x04\x12,\n\x08pedestal\x18\x03 \x03(\x0b\x32\x1a.JFJoLine truncated
|
||||
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'jfjoch_pb2', globals())
|
||||
if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
|
||||
DESCRIPTOR._options = None
|
||||
_COMPRESSION._serialized_start=8850
|
||||
_COMPRESSION._serialized_end=8934
|
||||
_DETECTORTYPE._serialized_start=8936
|
||||
_DETECTORTYPE._serialized_end=8975
|
||||
_DETECTORMODE._serialized_start=8977
|
||||
_DETECTORMODE._serialized_end=9067
|
||||
_FPGAFIFOSTATUSENUM._serialized_start=9069
|
||||
_FPGAFIFOSTATUSENUM._serialized_end=9123
|
||||
_STATE._serialized_start=9125
|
||||
_STATE._serialized_end=9219
|
||||
_FPGAPIXELOUTPUT._serialized_start=9221
|
||||
_FPGAPIXELOUTPUT._serialized_end=9294
|
||||
_PLOTTYPE._serialized_start=9296
|
||||
_PLOTTYPE._serialized_end=9419
|
||||
_COMPRESSION._serialized_start=8801
|
||||
_COMPRESSION._serialized_end=8885
|
||||
_DETECTORMODE._serialized_start=8887
|
||||
_DETECTORMODE._serialized_end=8977
|
||||
_FPGAFIFOSTATUSENUM._serialized_start=8979
|
||||
_FPGAFIFOSTATUSENUM._serialized_end=9033
|
||||
_STATE._serialized_start=9035
|
||||
_STATE._serialized_end=9129
|
||||
_FPGAPIXELOUTPUT._serialized_start=9131
|
||||
_FPGAPIXELOUTPUT._serialized_end=9204
|
||||
_PLOTTYPE._serialized_start=9206
|
||||
_PLOTTYPE._serialized_end=9329
|
||||
_EMPTY._serialized_start=32
|
||||
_EMPTY._serialized_end=39
|
||||
_UNITCELL._serialized_start=41
|
||||
@@ -45,95 +43,95 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
_PLOT._serialized_start=299
|
||||
_PLOT._serialized_end=327
|
||||
_DATASETSETTINGS._serialized_start=330
|
||||
_DATASETSETTINGS._serialized_end=915
|
||||
_DETECTORSETTINGS._serialized_start=918
|
||||
_DETECTORSETTINGS._serialized_end=1328
|
||||
_DETECTORMODULEGEOMETRY._serialized_start=1330
|
||||
_DETECTORMODULEGEOMETRY._serialized_end=1428
|
||||
_DETECTORGEOMETRY._serialized_start=1430
|
||||
_DETECTORGEOMETRY._serialized_end=1552
|
||||
_DETECTOR._serialized_start=1555
|
||||
_DETECTOR._serialized_end=1777
|
||||
_INTERNALSETTINGS._serialized_start=1780
|
||||
_INTERNALSETTINGS._serialized_end=2515
|
||||
_JUNGFRAUJOCHSETTINGS._serialized_start=2517
|
||||
_JUNGFRAUJOCHSETTINGS._serialized_end=2641
|
||||
_JFPEDESTAL._serialized_start=2643
|
||||
_JFPEDESTAL._serialized_end=2673
|
||||
_JFGAINCALIBRATION._serialized_start=2675
|
||||
_JFGAINCALIBRATION._serialized_end=2720
|
||||
_JFCALIBRATION._serialized_start=2723
|
||||
_JFCALIBRATION._serialized_end=2901
|
||||
_JFCALIBRATIONSTATISTICS._serialized_start=2903
|
||||
_JFCALIBRATIONSTATISTICS._serialized_end=2989
|
||||
_ACQUISITIONDEVICESTATISTICS._serialized_start=2992
|
||||
_ACQUISITIONDEVICESTATISTICS._serialized_end=3265
|
||||
_RECEIVERINPUT._serialized_start=3268
|
||||
_RECEIVERINPUT._serialized_end=3404
|
||||
_RECEIVEROUTPUT._serialized_start=3407
|
||||
_RECEIVEROUTPUT._serialized_end=3877
|
||||
_RECEIVERNETWORKCONFIGDEVICE._serialized_start=3879
|
||||
_RECEIVERNETWORKCONFIGDEVICE._serialized_end=3963
|
||||
_RECEIVERNETWORKCONFIG._serialized_start=3965
|
||||
_RECEIVERNETWORKCONFIG._serialized_end=4049
|
||||
_RECEIVERSTATUS._serialized_start=4052
|
||||
_RECEIVERSTATUS._serialized_end=4255
|
||||
_PLOTREQUEST._serialized_start=4257
|
||||
_PLOTREQUEST._serialized_end=4327
|
||||
_RADIALINTEGRATIONPROFILE._serialized_start=4329
|
||||
_RADIALINTEGRATIONPROFILE._serialized_end=4406
|
||||
_RADIALINTEGRATIONPROFILES._serialized_start=4408
|
||||
_RADIALINTEGRATIONPROFILES._serialized_end=4495
|
||||
_WRITERINPUT._serialized_start=4497
|
||||
_WRITERINPUT._serialized_end=4559
|
||||
_DATAFILESTATISTICS._serialized_start=4561
|
||||
_DATAFILESTATISTICS._serialized_end=4612
|
||||
_WRITEROUTPUT._serialized_start=4615
|
||||
_WRITEROUTPUT._serialized_end=4756
|
||||
_DETECTORMODULECONFIG._serialized_start=4759
|
||||
_DETECTORMODULECONFIG._serialized_end=5017
|
||||
_DETECTORCONFIG._serialized_start=5019
|
||||
_DETECTORCONFIG._serialized_end=5144
|
||||
_DETECTORINPUT._serialized_start=5147
|
||||
_DETECTORINPUT._serialized_end=5399
|
||||
_DETECTOROUTPUT._serialized_start=5401
|
||||
_DETECTOROUTPUT._serialized_end=5417
|
||||
_DETECTORSTATUS._serialized_start=5419
|
||||
_DETECTORSTATUS._serialized_end=5517
|
||||
_FPGAFIFOSTATUS._serialized_start=5519
|
||||
_FPGAFIFOSTATUS._serialized_end=5600
|
||||
_FPGASTATUS._serialized_start=5603
|
||||
_FPGASTATUS._serialized_end=6498
|
||||
_DATAPROCESSINGSETTINGS._serialized_start=6501
|
||||
_DATAPROCESSINGSETTINGS._serialized_end=6877
|
||||
_PREVIEWFRAMESPOT._serialized_start=6879
|
||||
_PREVIEWFRAMESPOT._serialized_end=6936
|
||||
_PREVIEWFRAME._serialized_start=6939
|
||||
_PREVIEWFRAME._serialized_end=7257
|
||||
_MODULESTATISTICS._serialized_start=7260
|
||||
_MODULESTATISTICS._serialized_end=7497
|
||||
_IMAGE._serialized_start=7499
|
||||
_IMAGE._serialized_end=7572
|
||||
_MASKTOLOAD._serialized_start=7574
|
||||
_MASKTOLOAD._serialized_end=7620
|
||||
_MEASUREMENTSTATISTICS._serialized_start=7623
|
||||
_MEASUREMENTSTATISTICS._serialized_end=8236
|
||||
_BROKERSTATUS._serialized_start=8239
|
||||
_BROKERSTATUS._serialized_end=8454
|
||||
_BROKERFULLSTATUS._serialized_start=8457
|
||||
_BROKERFULLSTATUS._serialized_end=8621
|
||||
_DETECTORLISTELEMENT._serialized_start=8623
|
||||
_DETECTORLISTELEMENT._serialized_end=8695
|
||||
_DETECTORLIST._serialized_start=8697
|
||||
_DETECTORLIST._serialized_end=8815
|
||||
_DETECTORSELECTION._serialized_start=8817
|
||||
_DETECTORSELECTION._serialized_end=8848
|
||||
_GRPC_JFJOCHRECEIVER._serialized_start=9422
|
||||
_GRPC_JFJOCHRECEIVER._serialized_end=10189
|
||||
_GRPC_JFJOCHWRITER._serialized_start=10192
|
||||
_GRPC_JFJOCHWRITER._serialized_end=10394
|
||||
_GRPC_JFJOCHDETECTOR._serialized_start=10397
|
||||
_GRPC_JFJOCHDETECTOR._serialized_end=10783
|
||||
_GRPC_JFJOCHBROKER._serialized_start=10786
|
||||
_GRPC_JFJOCHBROKER._serialized_end=12475
|
||||
_DATASETSETTINGS._serialized_end=910
|
||||
_DETECTORSETTINGS._serialized_start=913
|
||||
_DETECTORSETTINGS._serialized_end=1323
|
||||
_DETECTORMODULEGEOMETRY._serialized_start=1325
|
||||
_DETECTORMODULEGEOMETRY._serialized_end=1423
|
||||
_DETECTORGEOMETRY._serialized_start=1425
|
||||
_DETECTORGEOMETRY._serialized_end=1547
|
||||
_DETECTOR._serialized_start=1550
|
||||
_DETECTOR._serialized_end=1728
|
||||
_INTERNALSETTINGS._serialized_start=1731
|
||||
_INTERNALSETTINGS._serialized_end=2466
|
||||
_JUNGFRAUJOCHSETTINGS._serialized_start=2468
|
||||
_JUNGFRAUJOCHSETTINGS._serialized_end=2592
|
||||
_JFPEDESTAL._serialized_start=2594
|
||||
_JFPEDESTAL._serialized_end=2624
|
||||
_JFGAINCALIBRATION._serialized_start=2626
|
||||
_JFGAINCALIBRATION._serialized_end=2671
|
||||
_JFCALIBRATION._serialized_start=2674
|
||||
_JFCALIBRATION._serialized_end=2852
|
||||
_JFCALIBRATIONSTATISTICS._serialized_start=2854
|
||||
_JFCALIBRATIONSTATISTICS._serialized_end=2940
|
||||
_ACQUISITIONDEVICESTATISTICS._serialized_start=2943
|
||||
_ACQUISITIONDEVICESTATISTICS._serialized_end=3216
|
||||
_RECEIVERINPUT._serialized_start=3219
|
||||
_RECEIVERINPUT._serialized_end=3355
|
||||
_RECEIVEROUTPUT._serialized_start=3358
|
||||
_RECEIVEROUTPUT._serialized_end=3828
|
||||
_RECEIVERNETWORKCONFIGDEVICE._serialized_start=3830
|
||||
_RECEIVERNETWORKCONFIGDEVICE._serialized_end=3914
|
||||
_RECEIVERNETWORKCONFIG._serialized_start=3916
|
||||
_RECEIVERNETWORKCONFIG._serialized_end=4000
|
||||
_RECEIVERSTATUS._serialized_start=4003
|
||||
_RECEIVERSTATUS._serialized_end=4206
|
||||
_PLOTREQUEST._serialized_start=4208
|
||||
_PLOTREQUEST._serialized_end=4278
|
||||
_RADIALINTEGRATIONPROFILE._serialized_start=4280
|
||||
_RADIALINTEGRATIONPROFILE._serialized_end=4357
|
||||
_RADIALINTEGRATIONPROFILES._serialized_start=4359
|
||||
_RADIALINTEGRATIONPROFILES._serialized_end=4446
|
||||
_WRITERINPUT._serialized_start=4448
|
||||
_WRITERINPUT._serialized_end=4510
|
||||
_DATAFILESTATISTICS._serialized_start=4512
|
||||
_DATAFILESTATISTICS._serialized_end=4563
|
||||
_WRITEROUTPUT._serialized_start=4566
|
||||
_WRITEROUTPUT._serialized_end=4707
|
||||
_DETECTORMODULECONFIG._serialized_start=4710
|
||||
_DETECTORMODULECONFIG._serialized_end=4968
|
||||
_DETECTORCONFIG._serialized_start=4970
|
||||
_DETECTORCONFIG._serialized_end=5095
|
||||
_DETECTORINPUT._serialized_start=5098
|
||||
_DETECTORINPUT._serialized_end=5350
|
||||
_DETECTOROUTPUT._serialized_start=5352
|
||||
_DETECTOROUTPUT._serialized_end=5368
|
||||
_DETECTORSTATUS._serialized_start=5370
|
||||
_DETECTORSTATUS._serialized_end=5468
|
||||
_FPGAFIFOSTATUS._serialized_start=5470
|
||||
_FPGAFIFOSTATUS._serialized_end=5551
|
||||
_FPGASTATUS._serialized_start=5554
|
||||
_FPGASTATUS._serialized_end=6449
|
||||
_DATAPROCESSINGSETTINGS._serialized_start=6452
|
||||
_DATAPROCESSINGSETTINGS._serialized_end=6828
|
||||
_PREVIEWFRAMESPOT._serialized_start=6830
|
||||
_PREVIEWFRAMESPOT._serialized_end=6887
|
||||
_PREVIEWFRAME._serialized_start=6890
|
||||
_PREVIEWFRAME._serialized_end=7208
|
||||
_MODULESTATISTICS._serialized_start=7211
|
||||
_MODULESTATISTICS._serialized_end=7448
|
||||
_IMAGE._serialized_start=7450
|
||||
_IMAGE._serialized_end=7523
|
||||
_MASKTOLOAD._serialized_start=7525
|
||||
_MASKTOLOAD._serialized_end=7571
|
||||
_MEASUREMENTSTATISTICS._serialized_start=7574
|
||||
_MEASUREMENTSTATISTICS._serialized_end=8187
|
||||
_BROKERSTATUS._serialized_start=8190
|
||||
_BROKERSTATUS._serialized_end=8405
|
||||
_BROKERFULLSTATUS._serialized_start=8408
|
||||
_BROKERFULLSTATUS._serialized_end=8572
|
||||
_DETECTORLISTELEMENT._serialized_start=8574
|
||||
_DETECTORLISTELEMENT._serialized_end=8646
|
||||
_DETECTORLIST._serialized_start=8648
|
||||
_DETECTORLIST._serialized_end=8766
|
||||
_DETECTORSELECTION._serialized_start=8768
|
||||
_DETECTORSELECTION._serialized_end=8799
|
||||
_GRPC_JFJOCHRECEIVER._serialized_start=9332
|
||||
_GRPC_JFJOCHRECEIVER._serialized_end=10099
|
||||
_GRPC_JFJOCHWRITER._serialized_start=10102
|
||||
_GRPC_JFJOCHWRITER._serialized_end=10304
|
||||
_GRPC_JFJOCHDETECTOR._serialized_start=10307
|
||||
_GRPC_JFJOCHDETECTOR._serialized_end=10693
|
||||
_GRPC_JFJOCHBROKER._serialized_start=10696
|
||||
_GRPC_JFJOCHBROKER._serialized_end=12385
|
||||
# @@protoc_insertion_point(module_scope)
|
||||
@@ -34,7 +34,7 @@ void AcquisitionCounters::Reset(const DiffractionExperiment &experiment, uint16_
|
||||
saved_completions = std::vector<Completion>(expected_frames * nmodules);
|
||||
packets_per_module = std::vector<uint64_t>(nmodules);
|
||||
total_packets = 0;
|
||||
expected_packets_per_module = 128 * experiment.GetFPGASummation();
|
||||
expected_packets_per_module = 128 * experiment.GetSummation();
|
||||
}
|
||||
|
||||
void AcquisitionCounters::UpdateCounters(const Completion *c) {
|
||||
|
||||
@@ -61,7 +61,7 @@ void AcquisitionDevice::StartAction(const DiffractionExperiment &experiment, uin
|
||||
}
|
||||
|
||||
counters.Reset(experiment, data_stream);
|
||||
expected_frames = experiment.GetFrameNum() / experiment.GetFPGASummation();
|
||||
expected_frames = experiment.GetFrameNum() / experiment.GetSummation();
|
||||
|
||||
// Ensure internal WR queue is empty
|
||||
work_request_queue.Clear();
|
||||
|
||||
@@ -207,13 +207,13 @@ void FPGAAcquisitionDevice::FillActionRegister(const DiffractionExperiment& x, D
|
||||
job.one_over_energy = std::lround((1<<20)/ x.GetPhotonEnergy_keV());
|
||||
job.nstorage_cells = x.GetStorageCellNumber() - 1;
|
||||
job.mode = data_collection_id << 16;
|
||||
job.nsummation = x.GetFPGASummation() - 1;
|
||||
job.nsummation = x.GetSummation() - 1;
|
||||
|
||||
if (x.GetDetectorMode() == DetectorMode::Conversion)
|
||||
job.mode |= MODE_CONV;
|
||||
if (!x.GetFPGAOutputSigned())
|
||||
if (!x.IsPixelSigned())
|
||||
job.mode |= MODE_UNSIGNED;
|
||||
if (x.GetFPGAOutputDepth() == 4)
|
||||
if (x.GetPixelDepth() == 4)
|
||||
job.mode |= MODE_32BIT;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ TEST_CASE("AcquisitionCountersTest_OutOfBounds","[AcquisitionDeviceCounters]") {
|
||||
|
||||
TEST_CASE("AcquisitionCountersTest_PacketCount","[AcquisitionDeviceCounters]") {
|
||||
DiffractionExperiment x(DetectorGeometry(2));
|
||||
x.NumTriggers(1).ImagesPerTrigger(50).FPGASummation(2);
|
||||
x.NumTriggers(1).ImagesPerTrigger(50).Summation(2);
|
||||
|
||||
AcquisitionCounters counters;
|
||||
counters.Reset(x, 0);
|
||||
|
||||
@@ -12,7 +12,6 @@ TEST_CASE("DetectorSetup_MismatchInSize") {
|
||||
TEST_CASE("DetectorSetup_ProtoBuf") {
|
||||
DetectorSetup setup(DetectorGeometry(4), "JF", {"mx1","mx2","mx3","mx4"});
|
||||
JFJochProtoBuf::Detector detector = setup;
|
||||
REQUIRE(detector.type() == JFJochProtoBuf::JUNGFRAU);
|
||||
REQUIRE(detector.description() == "JF");
|
||||
REQUIRE(detector.module_hostname_size() == 4);
|
||||
REQUIRE(detector.module_hostname(3) == "mx4");
|
||||
|
||||
@@ -706,7 +706,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_fpga_summation(36);
|
||||
settings.set_summation(36);
|
||||
settings.set_fpga_pixel_output(JFJochProtoBuf::INT16);
|
||||
REQUIRE_NOTHROW(x.LoadDatasetSettings(settings));
|
||||
|
||||
@@ -718,7 +718,7 @@ TEST_CASE("DiffractionExperiment_LoadDatasetSettings", "[DiffractionExperiment]"
|
||||
REQUIRE(x.GetSampleName() == "lyso1");
|
||||
REQUIRE(x.GetDataFileCount() == 5);
|
||||
REQUIRE(x.GetDetectorDistance_mm() == Approx(57.6));
|
||||
REQUIRE(x.GetFPGASummation() == 36);
|
||||
REQUIRE(x.GetSummation() == 36);
|
||||
REQUIRE(x.GetFPGAOutputMode() == JFJochProtoBuf::INT16);
|
||||
}
|
||||
|
||||
@@ -836,36 +836,36 @@ TEST_CASE("DiffractionExperiment_DefaultDataProcessingSettings","[DiffractionExp
|
||||
TEST_CASE("DiffractionExperiment_FPGA_Summation_output","[DiffractionExperiment]") {
|
||||
DiffractionExperiment x;
|
||||
|
||||
REQUIRE_THROWS(x.FPGASummation(0));
|
||||
REQUIRE_THROWS(x.FPGASummation(-1));
|
||||
REQUIRE_THROWS(x.FPGASummation(MAX_FPGA_SUMMATION + 1));
|
||||
REQUIRE_THROWS(x.Summation(0));
|
||||
REQUIRE_THROWS(x.Summation(-1));
|
||||
REQUIRE_THROWS(x.Summation(MAX_FPGA_SUMMATION + 1));
|
||||
|
||||
x.FPGAOutputMode(JFJochProtoBuf::AUTO);
|
||||
REQUIRE_NOTHROW(x.FPGASummation(1));
|
||||
REQUIRE(x.GetFPGAOutputSigned());
|
||||
REQUIRE(x.GetFPGAOutputDepth() == 2);
|
||||
REQUIRE(x.GetFPGASummation() == 1);
|
||||
REQUIRE_NOTHROW(x.Summation(1));
|
||||
REQUIRE(x.IsPixelSigned());
|
||||
REQUIRE(x.GetPixelDepth() == 2);
|
||||
REQUIRE(x.GetSummation() == 1);
|
||||
|
||||
REQUIRE_NOTHROW(x.FPGASummation(3));
|
||||
REQUIRE(x.GetFPGAOutputSigned());
|
||||
REQUIRE(x.GetFPGAOutputDepth() == 4);
|
||||
REQUIRE(x.GetFPGASummation() == 3);
|
||||
REQUIRE_NOTHROW(x.Summation(3));
|
||||
REQUIRE(x.IsPixelSigned());
|
||||
REQUIRE(x.GetPixelDepth() == 4);
|
||||
REQUIRE(x.GetSummation() == 3);
|
||||
|
||||
x.FPGAOutputMode(JFJochProtoBuf::INT16);
|
||||
REQUIRE(x.GetFPGAOutputDepth() == 2);
|
||||
REQUIRE(x.GetFPGAOutputSigned());
|
||||
REQUIRE(x.GetPixelDepth() == 2);
|
||||
REQUIRE(x.IsPixelSigned());
|
||||
|
||||
x.FPGAOutputMode(JFJochProtoBuf::INT32);
|
||||
REQUIRE(x.GetFPGAOutputDepth() == 4);
|
||||
REQUIRE(x.GetFPGAOutputSigned());
|
||||
REQUIRE(x.GetPixelDepth() == 4);
|
||||
REQUIRE(x.IsPixelSigned());
|
||||
|
||||
x.FPGAOutputMode(JFJochProtoBuf::UINT16);
|
||||
REQUIRE(x.GetFPGAOutputDepth() == 2);
|
||||
REQUIRE(!x.GetFPGAOutputSigned());
|
||||
REQUIRE(x.GetPixelDepth() == 2);
|
||||
REQUIRE(!x.IsPixelSigned());
|
||||
|
||||
x.FPGAOutputMode(JFJochProtoBuf::UINT32);
|
||||
REQUIRE(x.GetFPGAOutputDepth() == 4);
|
||||
REQUIRE(!x.GetFPGAOutputSigned());
|
||||
REQUIRE(x.GetPixelDepth() == 4);
|
||||
REQUIRE(!x.IsPixelSigned());
|
||||
}
|
||||
|
||||
TEST_CASE("DiffractionExperiment_DetectorModuleHostname","[DiffractionExperiment]") {
|
||||
|
||||
@@ -1396,7 +1396,7 @@ TEST_CASE("HLS_C_Simulation_internal_packet_generator_summation", "[FPGA][Full]"
|
||||
i = dist(g1);
|
||||
|
||||
x.Mode(DetectorMode::Raw);
|
||||
x.UseInternalPacketGenerator(true).ImagesPerTrigger(nframes).PedestalG0Frames(0).FPGASummation(nsummation);
|
||||
x.UseInternalPacketGenerator(true).ImagesPerTrigger(nframes).PedestalG0Frames(0).Summation(nsummation);
|
||||
|
||||
HLSSimulatedDevice test(0, 64);
|
||||
test.SetInternalGeneratorFrame(test_frame);
|
||||
|
||||
Reference in new issue
Block a user