Detector read-out time can be in nanoseconds (this is work in progress, need to adapt count time and frame time to serious units)
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m23s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 12m29s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m49s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 16m52s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 17m55s
Build Packages / build:rpm (rocky8) (push) Successful in 17m57s
Build Packages / build:rpm (rocky9) (push) Successful in 18m44s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 18m58s
Build Packages / Generate python client (push) Successful in 1m28s
Build Packages / Build documentation (push) Successful in 1m56s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (ubuntu2404) (push) Successful in 9m0s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 10m1s
Build Packages / XDS test (neggia plugin) (push) Successful in 8m53s
Build Packages / XDS test (durin plugin) (push) Successful in 10m13s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m28s
Build Packages / DIALS test (push) Successful in 12m28s
Build Packages / Unit tests (push) Failing after 3h0m17s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m23s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 12m29s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m49s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 16m52s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 17m55s
Build Packages / build:rpm (rocky8) (push) Successful in 17m57s
Build Packages / build:rpm (rocky9) (push) Successful in 18m44s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 18m58s
Build Packages / Generate python client (push) Successful in 1m28s
Build Packages / Build documentation (push) Successful in 1m56s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (ubuntu2404) (push) Successful in 9m0s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 10m1s
Build Packages / XDS test (neggia plugin) (push) Successful in 8m53s
Build Packages / XDS test (durin plugin) (push) Successful in 10m13s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m28s
Build Packages / DIALS test (push) Successful in 12m28s
Build Packages / Unit tests (push) Failing after 3h0m17s
This commit is contained in:
@@ -175,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
|
||||
|
||||
@@ -191,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::microseconds>(GetDetCfg("frame_time").min.get<float>()));
|
||||
setup.MinCountTime(float2time<std::chrono::microseconds>(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);
|
||||
@@ -237,14 +243,8 @@ void DectrisSimplonClient::EndAcquisitionFinished() {
|
||||
}
|
||||
|
||||
void DectrisSimplonClient::StartAcquisition(const DiffractionExperiment& experiment) {
|
||||
// For DECTRIS detectors we assume frame_time == count_time
|
||||
// but give it 100 ns resolution
|
||||
if (experiment.GetFrameCountTimeAuto())
|
||||
SetConfigIfDifferent(SimplonModule::Detector, "count_time", experiment.GetFrameTime().count() / 1e6f, 1e-7);
|
||||
else
|
||||
SetConfigIfDifferent(SimplonModule::Detector, "count_time", experiment.GetFrameCountTime().count() / 1e6f, 1e-9);
|
||||
|
||||
SetConfigIfDifferent(SimplonModule::Detector, "frame_time", experiment.GetFrameTime().count() / 1e6f, 1e-9);
|
||||
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());
|
||||
|
||||
@@ -277,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