v1.0.0-rc.72
This commit is contained in:
@@ -168,7 +168,7 @@ DiffractionExperiment &DiffractionExperiment::ZMQPreviewPeriod(const std::option
|
||||
return *this;
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::SpaceGroupNumber(int64_t input) {
|
||||
DiffractionExperiment &DiffractionExperiment::SpaceGroupNumber(std::optional<int64_t> input) {
|
||||
dataset.SpaceGroupNumber(input);
|
||||
return *this;
|
||||
}
|
||||
@@ -518,7 +518,7 @@ std::string DiffractionExperiment::GetUnitCellString() const {
|
||||
return "-";
|
||||
}
|
||||
|
||||
int64_t DiffractionExperiment::GetSpaceGroupNumber() const {
|
||||
std::optional<int64_t> DiffractionExperiment::GetSpaceGroupNumber() const {
|
||||
return dataset.GetSpaceGroupNumber();
|
||||
}
|
||||
|
||||
@@ -787,8 +787,9 @@ DiffractionExperiment::GetDetectorModuleConfig(const std::vector<AcquisitionDevi
|
||||
for (int d = 0; d < GetDataStreamsNum(); d++) {
|
||||
for (int m = 0; m < GetModulesNum(d); m++) {
|
||||
DetectorModuleConfig mod_cfg;
|
||||
mod_cfg.udp_dest_port_1 = net_config[d].udp_port;
|
||||
mod_cfg.udp_dest_port_2 = net_config[d].udp_port;
|
||||
mod_cfg.data_stream = d;
|
||||
mod_cfg.udp_dest_port_1 = 1024 + m;
|
||||
mod_cfg.udp_dest_port_2 = 1024 + m;
|
||||
if (detector.GetUDPInterfaceCount() == 2) {
|
||||
mod_cfg.ipv4_src_addr_1 = IPv4AddressToStr(GetSrcIPv4Address(d, 2 * m));
|
||||
mod_cfg.ipv4_src_addr_2 = IPv4AddressToStr(GetSrcIPv4Address(d, 2 * m + 1));
|
||||
@@ -1510,3 +1511,35 @@ DiffractionExperiment &DiffractionExperiment::GeomRefinementAlgorithm(GeomRefine
|
||||
indexing.GeomRefinementAlgorithm(input);
|
||||
return *this;
|
||||
}
|
||||
|
||||
gemmi::CrystalSystem DiffractionExperiment::GetCrystalSystem() const {
|
||||
auto sg = GetGemmiSpaceGroup();
|
||||
if (!sg)
|
||||
return gemmi::CrystalSystem::Monoclinic;
|
||||
|
||||
return sg->crystal_system();
|
||||
}
|
||||
|
||||
std::string DiffractionExperiment::GetSpaceGroupName() const {
|
||||
auto sg = GetGemmiSpaceGroup();
|
||||
if (!sg)
|
||||
return "";
|
||||
return sg->short_name();
|
||||
}
|
||||
|
||||
std::optional<gemmi::SpaceGroup> DiffractionExperiment::GetGemmiSpaceGroup() const {
|
||||
auto sg = GetSpaceGroupNumber();
|
||||
if (!sg)
|
||||
return std::nullopt;
|
||||
const gemmi::SpaceGroup *g = gemmi::find_spacegroup_by_number(sg.value());
|
||||
if (g == nullptr)
|
||||
return std::nullopt;
|
||||
return *g;
|
||||
}
|
||||
|
||||
char DiffractionExperiment::GetCentering() const {
|
||||
auto sg = GetGemmiSpaceGroup();
|
||||
if (!sg)
|
||||
return 'P';
|
||||
return sg->centring_type();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user