File writer and spot finding improvements
This commit is contained in:
@@ -46,8 +46,6 @@ DiffractionExperiment::DiffractionExperiment(const DetectorSetup& det_setup)
|
||||
q_spacing = 0.05;
|
||||
|
||||
ipv4_base_addr = 0x0132010a;
|
||||
git_sha1 = jfjoch_git_sha1();
|
||||
git_date = jfjoch_git_date();
|
||||
|
||||
storage_cells = 1;
|
||||
storage_cell_start = 15;
|
||||
@@ -168,10 +166,6 @@ DiffractionExperiment &DiffractionExperiment::FilePrefix(std::string input) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::DataFileCount(int64_t input) {
|
||||
dataset.DataFileCount(input);
|
||||
return *this;
|
||||
}
|
||||
DiffractionExperiment &DiffractionExperiment::UseInternalPacketGenerator(bool input) {
|
||||
internal_fpga_packet_generator = input;
|
||||
return *this;
|
||||
@@ -433,11 +427,11 @@ std::string DiffractionExperiment::GetFilePrefix() const {
|
||||
return dataset.GetFilePrefix();
|
||||
}
|
||||
|
||||
int64_t DiffractionExperiment::GetDataFileCount() const {
|
||||
if (GetStorageCellNumber() > 1)
|
||||
return GetStorageCellNumber();
|
||||
int64_t DiffractionExperiment::GetTimePointNumber() const {
|
||||
if ((GetNumTriggers() < 5) || (GetImageNumPerTrigger() > 250)) // these are heuristic parameters
|
||||
return 1;
|
||||
else
|
||||
return dataset.GetDataFileCount();
|
||||
return GetImageNumPerTrigger();
|
||||
}
|
||||
|
||||
CompressionAlgorithm DiffractionExperiment::GetCompressionAlgorithm() const {
|
||||
@@ -586,19 +580,6 @@ uint32_t DiffractionExperiment::GetSrcIPv4Address(uint32_t data_stream, uint32_t
|
||||
return ipv4_base_addr + (host << 24);
|
||||
}
|
||||
|
||||
bool DiffractionExperiment::CheckGitSha1Consistent() const {
|
||||
return (git_sha1 == jfjoch_git_sha1());
|
||||
}
|
||||
|
||||
std::string DiffractionExperiment::CheckGitSha1Msg() const {
|
||||
if (git_sha1 == jfjoch_git_sha1())
|
||||
return "";
|
||||
else {
|
||||
return "Local component git repo is rev. " + jfjoch_git_sha1().substr(0,6) + " (" + jfjoch_git_date() +") remote component repo is rev. "
|
||||
+ git_sha1.substr(0,6) + " (" + git_date + ")";
|
||||
}
|
||||
}
|
||||
|
||||
bool DiffractionExperiment::GetMaskModuleEdges() const {
|
||||
return mask_module_edges;
|
||||
}
|
||||
@@ -695,7 +676,7 @@ SpotFindingSettings DiffractionExperiment::DefaultDataProcessingSettings() {
|
||||
}
|
||||
|
||||
void DiffractionExperiment::FillMessage(StartMessage &message) const {
|
||||
message.data_file_count = GetDataFileCount();
|
||||
message.images_per_file = GetImagesPerFile();
|
||||
message.beam_center_x = GetBeamX_pxl();
|
||||
message.beam_center_y = GetBeamY_pxl();
|
||||
message.detector_distance = GetDetectorDistance_mm() * 1e-3f;
|
||||
@@ -1176,3 +1157,17 @@ void DiffractionExperiment::ExportROIMask(uint16_t *dest, size_t module_number)
|
||||
dest[i] = UINT16_MAX;
|
||||
}
|
||||
}
|
||||
|
||||
DiffractionExperiment &DiffractionExperiment::ImagesPerFile(int64_t input) {
|
||||
dataset.ImagesPerFile(input);
|
||||
return *this;
|
||||
}
|
||||
|
||||
int64_t DiffractionExperiment::GetImagesPerFile() const {
|
||||
auto tmp = dataset.GetImagesPerFile();
|
||||
|
||||
if (tmp == 0)
|
||||
return GetImageNum();
|
||||
else
|
||||
return tmp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user