v1.0.0-rc.139 (#49)
Build Packages / Unit tests (push) Successful in 1h17m4s
Build Packages / Generate python client (push) Successful in 1m24s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m34s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 12m37s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 11m11s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 12m4s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 11m59s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 13m4s
Build Packages / build:rpm (rocky8) (push) Successful in 13m12s
Build Packages / XDS test (durin plugin) (push) Successful in 9m57s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m52s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m30s
Build Packages / build:rpm (rocky9) (push) Successful in 13m59s
Build Packages / Build documentation (push) Successful in 1m7s
Build Packages / XDS test (neggia plugin) (push) Successful in 9m24s
Build Packages / Create release (push) Has been skipped
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m54s
Build Packages / DIALS test (push) Successful in 13m14s
Build Packages / Unit tests (push) Successful in 1h17m4s
Build Packages / Generate python client (push) Successful in 1m24s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m34s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 12m37s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 11m11s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 12m4s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 11m59s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 13m4s
Build Packages / build:rpm (rocky8) (push) Successful in 13m12s
Build Packages / XDS test (durin plugin) (push) Successful in 9m57s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m52s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m30s
Build Packages / build:rpm (rocky9) (push) Successful in 13m59s
Build Packages / Build documentation (push) Successful in 1m7s
Build Packages / XDS test (neggia plugin) (push) Successful in 9m24s
Build Packages / Create release (push) Has been skipped
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m54s
Build Packages / DIALS test (push) Successful in 13m14s
This is an UNSTABLE release. The release has significant modifications and bug fixes, if things go wrong, it is better to revert to 1.0.0-rc.132. * jfjoch_broker: Further reduce startup time for DECTRIS detectors by selectively modifying SIMPLON parameters on `/start` * jfjoch_broker: Further reduce startup time for DECTRIS detectors by not setting beam center and detector distance via SIMPLON API on '/start' * jfjoch_broker: Add an extra message to ZeroMQ puller ready to monitor Lite worklow preparation time * jfjoch_broker: Image buffer configuration is postponed for Lite receiver flow till start message is received * jfjoch_broker: Use nanoseconds internally for frame/image/readout time * jfjoch_broker: Extra messages added for receiver operation (to be removed after debugging finished) * jfojch_broker: Improve profiling of different data analysis steps * jfjoch_broker: Record integration reflection count * jfjoch_broker: Fix bug where ZeroMQ preview frequency was confusing time units (micro vs. milliseconds) * jfjoch_broker: Fix bug where '/wait_till_done' got deadlocked * jfjoch_writer: Fix confusion between NaN and zero in floating-point datasets **Breaking changes**: detector definition is now using nanoseconds to define minimum frame time, minimum count time and readout time. Reviewed-on: #49
This commit was merged in pull request #49.
This commit is contained in:
@@ -91,6 +91,12 @@ void DectrisSimplonClient::SetConfigIfDifferent(SimplonModule element, const std
|
||||
SetConfig(element, key, value);
|
||||
}
|
||||
|
||||
void DectrisSimplonClient::SetConfigIfDifferent(SimplonModule element, const std::string &key, int64_t value) {
|
||||
auto curr_val = GetConfig(element, key).val.get<int64_t>();
|
||||
if (curr_val != value)
|
||||
SetConfig(element, key, value);
|
||||
}
|
||||
|
||||
std::string DectrisSimplonClient::GenAddr(SimplonModule element, SimplonTask task, const std::string& key) {
|
||||
std::string addr;
|
||||
switch (element) {
|
||||
@@ -169,6 +175,11 @@ nlohmann::json DectrisSimplonClient::GetStatus(SimplonModule element, const std:
|
||||
return GetConfig(element, SimplonTask::Status, key).val;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
T float2time(float time_in_seconds) {
|
||||
return std::chrono::duration_cast<T>(std::chrono::duration<float>(time_in_seconds));
|
||||
}
|
||||
|
||||
void DectrisSimplonClient::ReadDetectorConfig(DetectorSetup &setup) {
|
||||
// Need to initialize to read configuration information
|
||||
|
||||
@@ -185,9 +196,10 @@ void DectrisSimplonClient::ReadDetectorConfig(DetectorSetup &setup) {
|
||||
|
||||
setup.BitDepthReadout(GetDetCfg("bit_depth_readout").val.get<int64_t>());
|
||||
setup.BitDepthImage(GetDetCfg("bit_depth_image").val.get<int64_t>());
|
||||
setup.MinFrameTime(std::chrono::microseconds(std::lround(GetDetCfg("frame_time").min.get<float>() * 1e6f)));
|
||||
setup.MinCountTime(std::chrono::microseconds(std::lround(GetDetCfg("count_time").min.get<float>() * 1e6f)));
|
||||
setup.ReadOutTime(std::chrono::microseconds(std::lround(GetDetCfg("detector_readout_time").val.get<float>() * 1e6f)));
|
||||
setup.MinFrameTime(float2time<std::chrono::nanoseconds>(GetDetCfg("frame_time").min.get<float>()));
|
||||
setup.MinCountTime(float2time<std::chrono::nanoseconds>(GetDetCfg("count_time").min.get<float>()));
|
||||
setup.ReadOutTime(float2time<std::chrono::nanoseconds>(GetDetCfg("detector_readout_time").val.get<float>()));
|
||||
|
||||
nlohmann::json min_threshold_energy = GetDetCfg("threshold_energy").min;
|
||||
if (min_threshold_energy.is_number())
|
||||
setup.MinThreshold_keV(min_threshold_energy.get<float>() / 1000.0f);
|
||||
@@ -231,19 +243,10 @@ void DectrisSimplonClient::EndAcquisitionFinished() {
|
||||
}
|
||||
|
||||
void DectrisSimplonClient::StartAcquisition(const DiffractionExperiment& experiment) {
|
||||
// For DECTRIS detectors we assume frame_time == count_time
|
||||
if (experiment.GetFrameCountTimeAuto())
|
||||
SetConfig(SimplonModule::Detector, "count_time", experiment.GetFrameTime().count() / 1e6f);
|
||||
else
|
||||
SetConfig(SimplonModule::Detector, "count_time", experiment.GetFrameCountTime().count() / 1e6f);
|
||||
|
||||
SetConfig(SimplonModule::Detector, "frame_time", experiment.GetFrameTime().count() / 1e6f);
|
||||
SetConfig(SimplonModule::Detector, "nimages", experiment.GetFrameNumPerTrigger());
|
||||
SetConfig(SimplonModule::Detector, "ntrigger", experiment.GetNumTriggers());
|
||||
|
||||
SetConfig(SimplonModule::Detector, "beam_center_x", experiment.GetBeamX_pxl());
|
||||
SetConfig(SimplonModule::Detector, "beam_center_y", experiment.GetBeamY_pxl());
|
||||
SetConfig(SimplonModule::Detector, "detector_distance", experiment.GetDetectorDistance_mm() / 1e3f);
|
||||
SetConfigIfDifferent(SimplonModule::Detector, "count_time", std::chrono::duration<float>(experiment.GetFrameCountTime()).count(), 1e-9);
|
||||
SetConfigIfDifferent(SimplonModule::Detector, "frame_time", std::chrono::duration<float>(experiment.GetFrameTime()).count(), 1e-9);
|
||||
SetConfigIfDifferent(SimplonModule::Detector, "nimages", experiment.GetFrameNumPerTrigger());
|
||||
SetConfigIfDifferent(SimplonModule::Detector, "ntrigger", experiment.GetNumTriggers());
|
||||
|
||||
SendDetectorCommand(SimplonDetectorCommand::Arm);
|
||||
}
|
||||
@@ -274,7 +277,7 @@ void DectrisSimplonClient::ConfigureDetector(const DiffractionExperiment &experi
|
||||
"Burst mode not supported with DECTRIS sytems");
|
||||
}
|
||||
|
||||
SetConfig(SimplonModule::Detector, "trigger_start_delay", experiment.GetDetectorDelay().count() / 1e9);
|
||||
SetConfig(SimplonModule::Detector, "trigger_start_delay", std::chrono::duration<float>(experiment.GetDetectorDelay()).count());
|
||||
}
|
||||
|
||||
SimplonState DectrisSimplonClient::GetState() {
|
||||
|
||||
Reference in New Issue
Block a user