DiffractionExperiment: Remove indexing period (indexing works at the same pace as spot finding)
This commit is contained in:
@@ -224,7 +224,6 @@ void ParseFacilityConfiguration(const nlohmann::json &input, const std::string&
|
||||
|
||||
experiment.FrameTime(GET_TIME(j, "frame_time_us"), GET_TIME(j, "count_time_us"));
|
||||
|
||||
experiment.IndexingPeriod(GET_TIME(j, "indexing_period_us"));
|
||||
experiment.SpotFindingPeriod(GET_TIME(j, "spot_finding_period_us"));
|
||||
experiment.PreviewPeriod(GET_TIME(j, "preview_period_us"));
|
||||
|
||||
|
||||
@@ -62,7 +62,6 @@ DiffractionExperiment::DiffractionExperiment(const DetectorSetup& det_setup) {
|
||||
|
||||
internal.set_preview_period_us(1000*1000); // 1s / 1 Hz
|
||||
internal.set_spot_finding_period_us(5*1000); // 5 ms / 200 Hz
|
||||
internal.set_indexing_period_us(50*1000); // 50 ms / 20 Hz
|
||||
|
||||
internal.set_low_q(0.1);
|
||||
internal.set_high_q(5.0);
|
||||
@@ -360,12 +359,6 @@ DiffractionExperiment &DiffractionExperiment::SpotFindingPeriod(std::chrono::mic
|
||||
return *this;
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::IndexingPeriod(std::chrono::microseconds input) {
|
||||
check_min("Indexing period", input.count(), 0);
|
||||
internal.set_indexing_period_us(input.count());
|
||||
return *this;
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::SpaceGroupNumber(int64_t input) {
|
||||
check_min("Space group number", input, 0);
|
||||
check_max("Space group number", input, 230);
|
||||
@@ -703,10 +696,6 @@ std::chrono::microseconds DiffractionExperiment::GetSpotFindingPeriod() const {
|
||||
return std::chrono::microseconds(internal.spot_finding_period_us());
|
||||
}
|
||||
|
||||
std::chrono::microseconds DiffractionExperiment::GetIndexingPeriod() const {
|
||||
return std::chrono::microseconds(internal.indexing_period_us());
|
||||
}
|
||||
|
||||
int64_t DiffractionExperiment::GetPreviewStride() const {
|
||||
return GetPreviewStride(GetPreviewPeriod());
|
||||
}
|
||||
@@ -720,10 +709,6 @@ int64_t DiffractionExperiment::GetSpotFindingStride() const {
|
||||
}
|
||||
}
|
||||
|
||||
int64_t DiffractionExperiment::GetIndexingStride() const {
|
||||
return GetPreviewStride(GetIndexingPeriod());
|
||||
}
|
||||
|
||||
int64_t DiffractionExperiment::GetSpotFindingBin() const {
|
||||
if (GetSpotFindingPeriod().count() <= 0)
|
||||
return 100;
|
||||
|
||||
@@ -67,7 +67,6 @@ public:
|
||||
DiffractionExperiment& Compression(JFJochProtoBuf::Compression input);
|
||||
DiffractionExperiment& PreviewPeriod(std::chrono::microseconds input);
|
||||
DiffractionExperiment& SpotFindingPeriod(std::chrono::microseconds input);
|
||||
DiffractionExperiment& IndexingPeriod(std::chrono::microseconds input);
|
||||
|
||||
DiffractionExperiment& UseInternalPacketGenerator(bool input);
|
||||
DiffractionExperiment& IPv4Subnet(std::string input); // requires 255.255.255.0 subnet
|
||||
@@ -171,8 +170,6 @@ public:
|
||||
int64_t GetPreviewStride() const;
|
||||
std::chrono::microseconds GetSpotFindingPeriod() const;
|
||||
int64_t GetSpotFindingStride() const;
|
||||
std::chrono::microseconds GetIndexingPeriod() const;
|
||||
int64_t GetIndexingStride() const;
|
||||
|
||||
int64_t GetSpotFindingBin() const;
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
"pedestal_g2_frames": 300,
|
||||
"frame_time_us": "1000 us",
|
||||
"count_time_us": "980 us",
|
||||
"indexing_period_us": "5 ms",
|
||||
"spot_finding_period_us": "5 ms",
|
||||
"preview_period_us": "1 s",
|
||||
"ipv4_subnet": "10.10.85.0"
|
||||
|
||||
@@ -158,7 +158,6 @@ message InternalSettings {
|
||||
|
||||
int64 preview_period_us = 15;
|
||||
int64 spot_finding_period_us = 16;
|
||||
int64 indexing_period_us = 17;
|
||||
|
||||
DetectorMode mode = 19;
|
||||
bool mask_module_edges = 20;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -63,10 +63,9 @@ JFJochReceiver::JFJochReceiver(const JFJochProtoBuf::ReceiverInput &settings,
|
||||
|
||||
preview_stride = experiment.GetPreviewStride();
|
||||
spotfinder_stride = experiment.GetSpotFindingStride();
|
||||
indexing_stride = experiment.GetIndexingStride();
|
||||
|
||||
logger.Info("Image stride for data analysis: preview {}, spot finding/radial integration {}, indexing {}",
|
||||
preview_stride, spotfinder_stride, indexing_stride);
|
||||
logger.Info("Image stride for data analysis: preview {}, spot finding/radial integration {}",
|
||||
preview_stride, spotfinder_stride);
|
||||
if (experiment.GetDetectorMode() == DetectorMode::Conversion) {
|
||||
if (preview_publisher != nullptr)
|
||||
preview_publisher->Start(experiment, calib.value());
|
||||
@@ -313,11 +312,8 @@ int64_t JFJochReceiver::FrameTransformationThread() {
|
||||
calculate_spots = true;
|
||||
if (rad_int_mapping)
|
||||
send_bkg_estimate = true;
|
||||
}
|
||||
|
||||
if (indexer && (indexing_stride > 0) && (image_number % indexing_stride == 0)) {
|
||||
calculate_spots = true;
|
||||
index = true;
|
||||
if (indexer)
|
||||
index = true;
|
||||
}
|
||||
|
||||
for (int j = 0; j < experiment.GetSummation(); j++) {
|
||||
|
||||
@@ -85,7 +85,6 @@ class JFJochReceiver {
|
||||
|
||||
int64_t preview_stride;
|
||||
int64_t spotfinder_stride;
|
||||
int64_t indexing_stride;
|
||||
|
||||
int64_t max_image_number_sent = 0;
|
||||
std::mutex max_image_number_sent_mutex;
|
||||
|
||||
@@ -681,15 +681,6 @@ TEST_CASE("DiffractionExperiment_RadialIntegration_QSpacing","[DiffractionExperi
|
||||
REQUIRE(y.GetQSpacingForRadialInt_recipA() == Approx(0.456));
|
||||
}
|
||||
|
||||
TEST_CASE("DiffractionExperiment_IndexingPeriod","[DiffractionExperiment]") {
|
||||
DiffractionExperiment x(DetectorGeometry(8, 2, 8, 36));
|
||||
x.DetectorDistance_mm(75).PhotonEnergy_keV(WVL_1A_IN_KEV);
|
||||
x.FrameTime(1ms).Summation(3);
|
||||
x.IndexingPeriod(9ms);
|
||||
REQUIRE(x.GetIndexingPeriod() == std::chrono::milliseconds(9));
|
||||
REQUIRE(x.GetIndexingStride() == 3);
|
||||
}
|
||||
|
||||
TEST_CASE("DiffractionExperiment_StorageCells","[DiffractionExperiment]") {
|
||||
const int64_t num_triggers = 20;
|
||||
DiffractionExperiment x;
|
||||
|
||||
@@ -110,7 +110,6 @@ TEST_CASE("JFJochBrokerParser_ParseFacilityConfiguration") {
|
||||
"pedestal_g2_frames": 333,
|
||||
"frame_time_us": 0.0012,
|
||||
"count_time_us": "950 us",
|
||||
"indexing_period_us": "5 ms",
|
||||
"spot_finding_period_us": " 2 ms",
|
||||
"preview_period_us": "1 s",
|
||||
"ipv4_subnet": "10.10.25.0"
|
||||
@@ -131,7 +130,6 @@ TEST_CASE("JFJochBrokerParser_ParseFacilityConfiguration") {
|
||||
REQUIRE(x.GetFrameTime().count() == 1200);
|
||||
|
||||
REQUIRE(x.GetImageCountTime().count() == 950);
|
||||
REQUIRE(x.GetIndexingPeriod().count() == 5000);
|
||||
REQUIRE(x.GetSpotFindingPeriod().count() == 2000);
|
||||
REQUIRE(x.GetPreviewPeriod().count() == 1000*1000);
|
||||
}
|
||||
@@ -960,7 +960,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index", "[JFJochReceiver]
|
||||
|
||||
state_machine.NotThreadSafe_Experiment().DataStreams(ndatastream);
|
||||
state_machine.NotThreadSafe_Experiment().PedestalG0Frames(0).PedestalG1Frames(0).PedestalG2Frames(0)
|
||||
.SpotFindingPeriod(10ms).IndexingPeriod(10ms);
|
||||
.SpotFindingPeriod(10ms);
|
||||
services.Writer("unix:writer_test", "inproc://#1").Receiver("unix:fpga_receiver_test");
|
||||
|
||||
logger.Verbose(true);
|
||||
@@ -1081,7 +1081,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_sum", "[JFJochRecei
|
||||
|
||||
state_machine.NotThreadSafe_Experiment().DataStreams(ndatastream);
|
||||
state_machine.NotThreadSafe_Experiment().PedestalG0Frames(0).PedestalG1Frames(0).PedestalG2Frames(0)
|
||||
.SpotFindingPeriod(10ms).IndexingPeriod(10ms);
|
||||
.SpotFindingPeriod(10ms);
|
||||
services.Writer("unix:writer_test", "inproc://#1").Receiver("unix:fpga_receiver_test");
|
||||
|
||||
logger.Verbose(true);
|
||||
|
||||
Reference in New Issue
Block a user