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:
@@ -124,8 +124,8 @@ DetectorSetup ParseDetectorSetup(const org::openapitools::server::model::Detecto
|
||||
.SerialNumber(d.getSerialNumber())
|
||||
.ModuleSync(d.isModuleSync());
|
||||
|
||||
if (d.readoutTimeUsIsSet())
|
||||
setup.ReadOutTime(std::chrono::microseconds(d.getReadoutTimeUs()));
|
||||
if (d.readoutTimeNsIsSet())
|
||||
setup.ReadOutTime(std::chrono::nanoseconds(d.getReadoutTimeNs()));
|
||||
|
||||
if (d.baseDataIpv4AddressIsSet())
|
||||
setup.BaseIPv4Addr(d.getBaseDataIpv4Address());
|
||||
|
||||
@@ -25,7 +25,7 @@ struct DetectorListElement {
|
||||
int64_t nmodules;
|
||||
int64_t width;
|
||||
int64_t height;
|
||||
std::chrono::microseconds readout_time;
|
||||
std::chrono::nanoseconds readout_time;
|
||||
std::chrono::microseconds min_frame_time;
|
||||
std::chrono::microseconds min_count_time;
|
||||
DetectorType detector_type;
|
||||
|
||||
@@ -372,7 +372,7 @@ org::openapitools::server::model::Detector_list Convert(const DetectorList &inpu
|
||||
d.setUdpInterfaceCount(input.detector[i].udp_interface_count);
|
||||
d.setMinFrameTimeUs(input.detector[i].min_frame_time.count());
|
||||
d.setMinCountTimeUs(input.detector[i].min_count_time.count());
|
||||
d.setReadoutTimeUs(input.detector[i].readout_time.count());
|
||||
d.setReadoutTimeNs(input.detector[i].readout_time.count());
|
||||
d.setPixelSizeMm(input.detector[i].pixel_size_mm);
|
||||
d.setType(Convert(input.detector[i].detector_type));
|
||||
dets.emplace_back(std::move(d));
|
||||
|
||||
@@ -33,8 +33,8 @@ Detector::Detector()
|
||||
m_Module_syncIsSet = false;
|
||||
m_Sensor_thickness_um = 320.0f;
|
||||
m_Sensor_thickness_umIsSet = false;
|
||||
m_Readout_time_us = 0L;
|
||||
m_Readout_time_usIsSet = false;
|
||||
m_Readout_time_ns = 0L;
|
||||
m_Readout_time_nsIsSet = false;
|
||||
m_Minimum_count_time_us = 0L;
|
||||
m_Minimum_count_time_usIsSet = false;
|
||||
m_Minimum_frame_time_us = 0L;
|
||||
@@ -158,10 +158,10 @@ bool Detector::validate(std::stringstream& msg, const std::string& pathPrefix) c
|
||||
|
||||
}
|
||||
|
||||
if (readoutTimeUsIsSet())
|
||||
if (readoutTimeNsIsSet())
|
||||
{
|
||||
const int64_t& value = m_Readout_time_us;
|
||||
const std::string currentValuePath = _pathPrefix + ".readoutTimeUs";
|
||||
const int64_t& value = m_Readout_time_ns;
|
||||
const std::string currentValuePath = _pathPrefix + ".readoutTimeNs";
|
||||
|
||||
|
||||
if (value < 1ll)
|
||||
@@ -333,7 +333,7 @@ bool Detector::operator==(const Detector& rhs) const
|
||||
((!sensorThicknessUmIsSet() && !rhs.sensorThicknessUmIsSet()) || (sensorThicknessUmIsSet() && rhs.sensorThicknessUmIsSet() && getSensorThicknessUm() == rhs.getSensorThicknessUm())) &&
|
||||
|
||||
|
||||
((!readoutTimeUsIsSet() && !rhs.readoutTimeUsIsSet()) || (readoutTimeUsIsSet() && rhs.readoutTimeUsIsSet() && getReadoutTimeUs() == rhs.getReadoutTimeUs())) &&
|
||||
((!readoutTimeNsIsSet() && !rhs.readoutTimeNsIsSet()) || (readoutTimeNsIsSet() && rhs.readoutTimeNsIsSet() && getReadoutTimeNs() == rhs.getReadoutTimeNs())) &&
|
||||
|
||||
|
||||
((!minimumCountTimeUsIsSet() && !rhs.minimumCountTimeUsIsSet()) || (minimumCountTimeUsIsSet() && rhs.minimumCountTimeUsIsSet() && getMinimumCountTimeUs() == rhs.getMinimumCountTimeUs())) &&
|
||||
@@ -398,8 +398,8 @@ void to_json(nlohmann::json& j, const Detector& o)
|
||||
j["module_sync"] = o.m_Module_sync;
|
||||
if(o.sensorThicknessUmIsSet())
|
||||
j["sensor_thickness_um"] = o.m_Sensor_thickness_um;
|
||||
if(o.readoutTimeUsIsSet())
|
||||
j["readout_time_us"] = o.m_Readout_time_us;
|
||||
if(o.readoutTimeNsIsSet())
|
||||
j["readout_time_ns"] = o.m_Readout_time_ns;
|
||||
if(o.minimumCountTimeUsIsSet())
|
||||
j["minimum_count_time_us"] = o.m_Minimum_count_time_us;
|
||||
if(o.minimumFrameTimeUsIsSet())
|
||||
@@ -462,10 +462,10 @@ void from_json(const nlohmann::json& j, Detector& o)
|
||||
j.at("sensor_thickness_um").get_to(o.m_Sensor_thickness_um);
|
||||
o.m_Sensor_thickness_umIsSet = true;
|
||||
}
|
||||
if(j.find("readout_time_us") != j.end())
|
||||
if(j.find("readout_time_ns") != j.end())
|
||||
{
|
||||
j.at("readout_time_us").get_to(o.m_Readout_time_us);
|
||||
o.m_Readout_time_usIsSet = true;
|
||||
j.at("readout_time_ns").get_to(o.m_Readout_time_ns);
|
||||
o.m_Readout_time_nsIsSet = true;
|
||||
}
|
||||
if(j.find("minimum_count_time_us") != j.end())
|
||||
{
|
||||
@@ -645,22 +645,22 @@ void Detector::unsetSensor_thickness_um()
|
||||
{
|
||||
m_Sensor_thickness_umIsSet = false;
|
||||
}
|
||||
int64_t Detector::getReadoutTimeUs() const
|
||||
int64_t Detector::getReadoutTimeNs() const
|
||||
{
|
||||
return m_Readout_time_us;
|
||||
return m_Readout_time_ns;
|
||||
}
|
||||
void Detector::setReadoutTimeUs(int64_t const value)
|
||||
void Detector::setReadoutTimeNs(int64_t const value)
|
||||
{
|
||||
m_Readout_time_us = value;
|
||||
m_Readout_time_usIsSet = true;
|
||||
m_Readout_time_ns = value;
|
||||
m_Readout_time_nsIsSet = true;
|
||||
}
|
||||
bool Detector::readoutTimeUsIsSet() const
|
||||
bool Detector::readoutTimeNsIsSet() const
|
||||
{
|
||||
return m_Readout_time_usIsSet;
|
||||
return m_Readout_time_nsIsSet;
|
||||
}
|
||||
void Detector::unsetReadout_time_us()
|
||||
void Detector::unsetReadout_time_ns()
|
||||
{
|
||||
m_Readout_time_usIsSet = false;
|
||||
m_Readout_time_nsIsSet = false;
|
||||
}
|
||||
int64_t Detector::getMinimumCountTimeUs() const
|
||||
{
|
||||
|
||||
@@ -111,12 +111,12 @@ public:
|
||||
bool sensorThicknessUmIsSet() const;
|
||||
void unsetSensor_thickness_um();
|
||||
/// <summary>
|
||||
/// Minimum difference between frame time and count time in microseconds Defaults are 3 us for EIGER and 20 us for JUNGFRAU
|
||||
/// Minimum difference between frame time and count time in microseconds Defaults are 3'000 ns for EIGER and 20'000 ns for JUNGFRAU
|
||||
/// </summary>
|
||||
int64_t getReadoutTimeUs() const;
|
||||
void setReadoutTimeUs(int64_t const value);
|
||||
bool readoutTimeUsIsSet() const;
|
||||
void unsetReadout_time_us();
|
||||
int64_t getReadoutTimeNs() const;
|
||||
void setReadoutTimeNs(int64_t const value);
|
||||
bool readoutTimeNsIsSet() const;
|
||||
void unsetReadout_time_ns();
|
||||
/// <summary>
|
||||
/// Minimum count time available for the detector.
|
||||
/// </summary>
|
||||
@@ -226,8 +226,8 @@ protected:
|
||||
bool m_Module_syncIsSet;
|
||||
float m_Sensor_thickness_um;
|
||||
bool m_Sensor_thickness_umIsSet;
|
||||
int64_t m_Readout_time_us;
|
||||
bool m_Readout_time_usIsSet;
|
||||
int64_t m_Readout_time_ns;
|
||||
bool m_Readout_time_nsIsSet;
|
||||
int64_t m_Minimum_count_time_us;
|
||||
bool m_Minimum_count_time_usIsSet;
|
||||
int64_t m_Minimum_frame_time_us;
|
||||
|
||||
@@ -31,7 +31,7 @@ Detector_list_element::Detector_list_element()
|
||||
m_Height = 0L;
|
||||
m_Pixel_size_mm = 0.0f;
|
||||
m_Pixel_size_mmIsSet = false;
|
||||
m_Readout_time_us = 0L;
|
||||
m_Readout_time_ns = 0L;
|
||||
m_Min_frame_time_us = 0L;
|
||||
m_Min_count_time_us = 0L;
|
||||
m_TypeIsSet = false;
|
||||
@@ -107,7 +107,7 @@ bool Detector_list_element::operator==(const Detector_list_element& rhs) const
|
||||
|
||||
((!pixelSizeMmIsSet() && !rhs.pixelSizeMmIsSet()) || (pixelSizeMmIsSet() && rhs.pixelSizeMmIsSet() && getPixelSizeMm() == rhs.getPixelSizeMm())) &&
|
||||
|
||||
(getReadoutTimeUs() == rhs.getReadoutTimeUs())
|
||||
(getReadoutTimeNs() == rhs.getReadoutTimeNs())
|
||||
&&
|
||||
|
||||
(getMinFrameTimeUs() == rhs.getMinFrameTimeUs())
|
||||
@@ -140,7 +140,7 @@ void to_json(nlohmann::json& j, const Detector_list_element& o)
|
||||
j["height"] = o.m_Height;
|
||||
if(o.pixelSizeMmIsSet())
|
||||
j["pixel_size_mm"] = o.m_Pixel_size_mm;
|
||||
j["readout_time_us"] = o.m_Readout_time_us;
|
||||
j["readout_time_ns"] = o.m_Readout_time_ns;
|
||||
j["min_frame_time_us"] = o.m_Min_frame_time_us;
|
||||
j["min_count_time_us"] = o.m_Min_count_time_us;
|
||||
if(o.typeIsSet())
|
||||
@@ -163,7 +163,7 @@ void from_json(const nlohmann::json& j, Detector_list_element& o)
|
||||
j.at("pixel_size_mm").get_to(o.m_Pixel_size_mm);
|
||||
o.m_Pixel_size_mmIsSet = true;
|
||||
}
|
||||
j.at("readout_time_us").get_to(o.m_Readout_time_us);
|
||||
j.at("readout_time_ns").get_to(o.m_Readout_time_ns);
|
||||
j.at("min_frame_time_us").get_to(o.m_Min_frame_time_us);
|
||||
j.at("min_count_time_us").get_to(o.m_Min_count_time_us);
|
||||
if(j.find("type") != j.end())
|
||||
@@ -255,13 +255,13 @@ void Detector_list_element::unsetPixel_size_mm()
|
||||
{
|
||||
m_Pixel_size_mmIsSet = false;
|
||||
}
|
||||
int64_t Detector_list_element::getReadoutTimeUs() const
|
||||
int64_t Detector_list_element::getReadoutTimeNs() const
|
||||
{
|
||||
return m_Readout_time_us;
|
||||
return m_Readout_time_ns;
|
||||
}
|
||||
void Detector_list_element::setReadoutTimeUs(int64_t const value)
|
||||
void Detector_list_element::setReadoutTimeNs(int64_t const value)
|
||||
{
|
||||
m_Readout_time_us = value;
|
||||
m_Readout_time_ns = value;
|
||||
}
|
||||
int64_t Detector_list_element::getMinFrameTimeUs() const
|
||||
{
|
||||
|
||||
@@ -109,8 +109,8 @@ public:
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
int64_t getReadoutTimeUs() const;
|
||||
void setReadoutTimeUs(int64_t const value);
|
||||
int64_t getReadoutTimeNs() const;
|
||||
void setReadoutTimeNs(int64_t const value);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -150,7 +150,7 @@ protected:
|
||||
|
||||
float m_Pixel_size_mm;
|
||||
bool m_Pixel_size_mmIsSet;
|
||||
int64_t m_Readout_time_us;
|
||||
int64_t m_Readout_time_ns;
|
||||
|
||||
int64_t m_Min_frame_time_us;
|
||||
|
||||
|
||||
@@ -1083,7 +1083,7 @@ components:
|
||||
- serial_number
|
||||
- base_ipv4_addr
|
||||
- udp_interface_count
|
||||
- readout_time_us
|
||||
- readout_time_ns
|
||||
- min_frame_time_us
|
||||
- min_count_time_us
|
||||
properties:
|
||||
@@ -1121,7 +1121,7 @@ components:
|
||||
type: number
|
||||
format: float
|
||||
example: 0.075
|
||||
readout_time_us:
|
||||
readout_time_ns:
|
||||
type: integer
|
||||
format: int64
|
||||
min_frame_time_us:
|
||||
@@ -2060,13 +2060,13 @@ components:
|
||||
format: float
|
||||
minimum: 0
|
||||
default: 320
|
||||
readout_time_us:
|
||||
readout_time_ns:
|
||||
type: integer
|
||||
format: int64
|
||||
minimum: 1
|
||||
description: |
|
||||
Minimum difference between frame time and count time in microseconds
|
||||
Defaults are 3 us for EIGER and 20 us for JUNGFRAU
|
||||
Defaults are 3'000 ns for EIGER and 20'000 ns for JUNGFRAU
|
||||
minimum_count_time_us:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -264,7 +264,7 @@ DetectorSetup &DetectorSetup::ModuleSync(bool input) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
DetectorSetup & DetectorSetup::ReadOutTime(std::chrono::microseconds input) {
|
||||
DetectorSetup & DetectorSetup::ReadOutTime(std::chrono::nanoseconds input) {
|
||||
if (input.count() < 0)
|
||||
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
|
||||
"Read out time has to be non-negative");
|
||||
@@ -272,7 +272,7 @@ DetectorSetup & DetectorSetup::ReadOutTime(std::chrono::microseconds input) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::chrono::microseconds DetectorSetup::GetReadOutTime() const {
|
||||
std::chrono::nanoseconds DetectorSetup::GetReadOutTime() const {
|
||||
return read_out_time;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ class DetectorSetup {
|
||||
int32_t high_voltage = 120.0;
|
||||
uint32_t ipv4_base_addr = 0x010a0a0a;
|
||||
bool module_sync = true;
|
||||
std::chrono::microseconds read_out_time;
|
||||
std::chrono::nanoseconds read_out_time;
|
||||
std::chrono::microseconds min_count_time;
|
||||
std::chrono::microseconds min_frame_time;
|
||||
float min_energy_threshold_keV = 2.7f;
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
DetectorSetup& SerialNumber(const std::string &input);
|
||||
DetectorSetup& BaseIPv4Addr(const std::string &input);
|
||||
DetectorSetup& ModuleSync(bool input);
|
||||
DetectorSetup& ReadOutTime(std::chrono::microseconds input);
|
||||
DetectorSetup& ReadOutTime(std::chrono::nanoseconds input);
|
||||
DetectorSetup& Geometry(const DetectorGeometryFixed& input);
|
||||
DetectorSetup& BitDepthReadout(int64_t input);
|
||||
DetectorSetup& BitDepthImage(int64_t input);
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
[[nodiscard]] uint32_t GetSrcIPv4Addr(uint32_t half_module) const;
|
||||
[[nodiscard]] std::string GetBaseIPv4Addr() const;
|
||||
[[nodiscard]] bool IsModuleSync() const;
|
||||
[[nodiscard]] std::chrono::microseconds GetReadOutTime() const;
|
||||
[[nodiscard]] std::chrono::nanoseconds GetReadOutTime() const;
|
||||
[[nodiscard]] std::chrono::microseconds GetMinFrameTime() const;
|
||||
[[nodiscard]] std::chrono::microseconds GetMinCountTime() const;
|
||||
[[nodiscard]] std::optional<int64_t> GetBitDepthReadout() const;
|
||||
|
||||
@@ -300,21 +300,25 @@ int64_t DiffractionExperiment::GetFrameNumPerTrigger() const {
|
||||
}
|
||||
}
|
||||
|
||||
std::chrono::microseconds DiffractionExperiment::GetFrameCountTime() const {
|
||||
std::chrono::nanoseconds DiffractionExperiment::GetFrameCountTime() const {
|
||||
if ((GetDetectorType() != DetectorType::JUNGFRAU)
|
||||
&& dataset.GetImageTime().has_value()
|
||||
&& !detector_settings.GetCountTime().has_value())
|
||||
return dataset.GetImageTime().value() - detector.GetReadOutTime();
|
||||
return std::chrono::duration_cast<std::chrono::nanoseconds>(dataset.GetImageTime().value())
|
||||
- detector.GetReadOutTime();
|
||||
|
||||
return detector_settings.GetCountTime()
|
||||
.value_or(detector_settings.GetFrameTime() - detector.GetReadOutTime());
|
||||
if (detector_settings.GetCountTime().has_value())
|
||||
return detector_settings.GetCountTime().value();
|
||||
|
||||
return std::chrono::duration_cast<std::chrono::nanoseconds>(detector_settings.GetFrameTime())
|
||||
- detector.GetReadOutTime();
|
||||
}
|
||||
|
||||
bool DiffractionExperiment::GetFrameCountTimeAuto() const {
|
||||
return !detector_settings.GetCountTime().has_value();
|
||||
}
|
||||
|
||||
std::chrono::microseconds DiffractionExperiment::GetImageCountTime() const {
|
||||
std::chrono::nanoseconds DiffractionExperiment::GetImageCountTime() const {
|
||||
return GetFrameCountTime() * GetSummation();
|
||||
}
|
||||
|
||||
@@ -1252,7 +1256,7 @@ DiffractionExperiment &DiffractionExperiment::ImportDetectorSettings(const Detec
|
||||
if (!input.GetCountTime().has_value()) {
|
||||
// implicit count time
|
||||
check_max("Frame time [us]", input.GetFrameTime().count(),
|
||||
MAX_COUNT_TIME_JUNGFRAU_IN_US + detector.GetReadOutTime().count());
|
||||
MAX_COUNT_TIME_JUNGFRAU_IN_US + std::chrono::duration_cast<std::chrono::microseconds>(detector.GetReadOutTime()).count());
|
||||
} else {
|
||||
// explicit count time
|
||||
check_max("Count time [us]", input.GetCountTime().value().count(),
|
||||
|
||||
@@ -210,8 +210,8 @@ public:
|
||||
std::chrono::microseconds GetDetectorPeriod() const;
|
||||
std::chrono::microseconds GetImageTime() const;
|
||||
|
||||
std::chrono::microseconds GetImageCountTime() const;
|
||||
std::chrono::microseconds GetFrameCountTime() const;
|
||||
std::chrono::nanoseconds GetImageCountTime() const;
|
||||
std::chrono::nanoseconds GetFrameCountTime() const;
|
||||
bool GetFrameCountTimeAuto() const;
|
||||
|
||||
DiffractionExperiment& StorageCellDelay(std::chrono::nanoseconds input);
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -148,7 +148,7 @@ void SLSDetectorWrapper::Start(const DiffractionExperiment& experiment) {
|
||||
// For EIGER exposure time needs to be updated for every measurements
|
||||
det.setDynamicRange(experiment.GetEigerBitDepth());
|
||||
det.setPeriod(experiment.GetDetectorPeriod());
|
||||
det.setExptime(std::chrono::microseconds(experiment.GetFrameCountTime()));
|
||||
det.setExptime(experiment.GetFrameCountTime());
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -410,7 +410,7 @@ void SLSDetectorWrapper::Configure(const DiffractionExperiment &experiment) {
|
||||
}
|
||||
|
||||
det.setPeriod(experiment.GetDetectorPeriod());
|
||||
det.setExptime(std::chrono::microseconds(experiment.GetFrameCountTime()));
|
||||
det.setExptime(experiment.GetFrameCountTime());
|
||||
}
|
||||
|
||||
void SLSDetectorWrapper::LoadPixelMask(PixelMask &mask) {
|
||||
|
||||
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
|
||||
**udp_interface_count** | **int** | | [optional] [default to 1]
|
||||
**module_sync** | **bool** | Use module 0 as master for timing. Only applies to JUNGFRAU detector (this cannot be turned off for EIGER). | [optional] [default to True]
|
||||
**sensor_thickness_um** | **float** | | [optional] [default to 320]
|
||||
**readout_time_us** | **int** | Minimum difference between frame time and count time in microseconds Defaults are 3 us for EIGER and 20 us for JUNGFRAU | [optional]
|
||||
**readout_time_ns** | **int** | Minimum difference between frame time and count time in microseconds Defaults are 3'000 ns for EIGER and 20'000 ns for JUNGFRAU | [optional]
|
||||
**minimum_count_time_us** | **int** | Minimum count time available for the detector. | [optional]
|
||||
**minimum_frame_time_us** | **int** | Minimum frame time available for the detector. | [optional]
|
||||
**calibration_file** | **List[str]** | Can be empty for all detectors - default calibration used. For JUNGFRAU: list of gain files, one entry per module. For EIGER: one directory (with detector settings) or list of trim bit files, one entry per half-module. | [optional]
|
||||
|
||||
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
|
||||
**width** | **int** | |
|
||||
**height** | **int** | |
|
||||
**pixel_size_mm** | **float** | | [optional]
|
||||
**readout_time_us** | **int** | |
|
||||
**readout_time_ns** | **int** | |
|
||||
**min_frame_time_us** | **int** | |
|
||||
**min_count_time_us** | **int** | |
|
||||
**type** | [**DetectorType**](DetectorType.md) | | [optional]
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "jungfraujoch-frontend",
|
||||
"version": "1.0.0-rc.138",
|
||||
"version": "1.0.0-rc.139",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "jungfraujoch-frontend",
|
||||
"version": "1.0.0-rc.138",
|
||||
"version": "1.0.0-rc.139",
|
||||
"license": "GPL-3.0",
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.10.4",
|
||||
|
||||
@@ -37,7 +37,7 @@ const default_detector_element: detector_list_element = {
|
||||
nmodules: 0,
|
||||
width: 0,
|
||||
height: 0,
|
||||
readout_time_us: 0,
|
||||
readout_time_ns: 0,
|
||||
min_frame_time_us: 0,
|
||||
min_count_time_us: 0
|
||||
}
|
||||
@@ -75,7 +75,7 @@ class DetectorSelection extends Component<MyProps, MyState> {
|
||||
{title: "UDP interfaces", val: `${x.udp_interface_count}`},
|
||||
{title: "Min. frame time", val: `${x.min_frame_time_us} µs`},
|
||||
{title: "Min. count time", val: `${x.min_count_time_us} µs`},
|
||||
{title: "Readout time", val: `${x.readout_time_us} µs`}
|
||||
{title: "Readout time", val: `${x.readout_time_ns} ns`}
|
||||
];
|
||||
|
||||
return <TableContainer
|
||||
|
||||
@@ -21,10 +21,10 @@ export type detector = {
|
||||
sensor_thickness_um?: number;
|
||||
/**
|
||||
* Minimum difference between frame time and count time in microseconds
|
||||
* Defaults are 3 us for EIGER and 20 us for JUNGFRAU
|
||||
* Defaults are 3'000 ns for EIGER and 20'000 ns for JUNGFRAU
|
||||
*
|
||||
*/
|
||||
readout_time_us?: number;
|
||||
readout_time_ns?: number;
|
||||
/**
|
||||
* Minimum count time available for the detector.
|
||||
*/
|
||||
|
||||
@@ -18,7 +18,7 @@ export type detector_list_element = {
|
||||
width: number;
|
||||
height: number;
|
||||
pixel_size_mm?: number;
|
||||
readout_time_us: number;
|
||||
readout_time_ns: number;
|
||||
min_frame_time_us: number;
|
||||
min_count_time_us: number;
|
||||
type?: detector_type;
|
||||
|
||||
@@ -421,12 +421,17 @@ void JFJochHDF5Reader::ReadFile(const std::string& filename) {
|
||||
detector.SaturationLimit(master_file->GetInt("/entry/instrument/detector/saturation_value"));
|
||||
detector.MinFrameTime(std::chrono::microseconds(0));
|
||||
detector.MinCountTime(std::chrono::microseconds(0));
|
||||
detector.ReadOutTime(std::chrono::microseconds (0));
|
||||
detector.ReadOutTime(std::chrono::nanoseconds (0));
|
||||
dataset->experiment.Detector(detector);
|
||||
|
||||
dataset->experiment.FrameTime(
|
||||
std::chrono::microseconds(std::lround(master_file->GetFloat("/entry/instrument/detector/frame_time") * 1e6)),
|
||||
std::chrono::microseconds(std::lround(master_file->GetFloat("/entry/instrument/detector/count_time") * 1e6)));
|
||||
std::chrono::duration_cast<std::chrono::microseconds>(
|
||||
std::chrono::duration<float>(
|
||||
master_file->GetFloat("/entry/instrument/detector/frame_time"))),
|
||||
std::chrono::duration_cast<std::chrono::microseconds>(
|
||||
std::chrono::duration<float>(
|
||||
master_file->GetFloat("/entry/instrument/detector/count_time")))
|
||||
);
|
||||
|
||||
if (master_file->Exists("/entry/instrument/detector/calibration")) {
|
||||
dataset->calibration_data = master_file->FindLeafs("/entry/instrument/detector/calibration");
|
||||
|
||||
@@ -141,8 +141,9 @@ QString TrimZeros(double number, int precision) {
|
||||
return s;
|
||||
}
|
||||
|
||||
QString FormatTime(std::chrono::microseconds time) {
|
||||
return TrimZeros(time.count()/1e6, 6);
|
||||
template <typename Duration>
|
||||
QString FormatTime(Duration time, int precision = 6) {
|
||||
return TrimZeros(std::chrono::duration<float>(time).count(), precision);
|
||||
}
|
||||
|
||||
void JFJochViewerImageStatistics::loadImage(std::shared_ptr<const JFJochReaderImage> image) {
|
||||
|
||||
Reference in New Issue
Block a user