v1.0.0-rc.85
This commit is contained in:
@@ -75,12 +75,23 @@ void JFJochHDF5Reader::ReadFile(const std::string& filename) {
|
||||
dataset->efficiency = master_file->ReadVector<float>(
|
||||
"/entry/instrument/detector/detectorSpecific/data_collection_efficiency_image");
|
||||
|
||||
dataset->spot_count = master_file->ReadOptVector<float>("/entry/MX/nPeaks");
|
||||
dataset->indexing_result = master_file->ReadOptVector<float>("/entry/MX/imageIndexed");
|
||||
dataset->bkg_estimate = master_file->ReadOptVector<float>("/entry/MX/bkgEstimate");
|
||||
dataset->resolution_estimate = master_file->ReadOptVector<float>("/entry/MX/resolutionEstimate");
|
||||
dataset->profile_radius = master_file->ReadOptVector<float>("/entry/MX/profileRadius");
|
||||
dataset->b_factor = master_file->ReadOptVector<float>("/entry/MX/bFactor");
|
||||
|
||||
if (master_file->Exists("/entry/MX")) {
|
||||
if (master_file->Exists("/entry/MX/peakCountUnfiltered"))
|
||||
dataset->spot_count = master_file->ReadOptVector<float>("/entry/MX/peakCountUnfiltered");
|
||||
else
|
||||
dataset->spot_count = master_file->ReadOptVector<float>("/entry/MX/nPeaks");
|
||||
|
||||
dataset->spot_count_low_res = master_file->ReadOptVector<float>("/entry/MX/peakCountLowRes");
|
||||
dataset->spot_count_indexed = master_file->ReadOptVector<float>("/entry/MX/peakCountIndexed");
|
||||
dataset->spot_count_ice_rings = master_file->ReadOptVector<float>("/entry/MX/peakCountIceRing");
|
||||
|
||||
dataset->indexing_result = master_file->ReadOptVector<float>("/entry/MX/imageIndexed");
|
||||
dataset->bkg_estimate = master_file->ReadOptVector<float>("/entry/MX/bkgEstimate");
|
||||
dataset->resolution_estimate = master_file->ReadOptVector<float>("/entry/MX/resolutionEstimate");
|
||||
dataset->profile_radius = master_file->ReadOptVector<float>("/entry/MX/profileRadius");
|
||||
dataset->b_factor = master_file->ReadOptVector<float>("/entry/MX/bFactor");
|
||||
}
|
||||
if (master_file->Exists("/entry/image"))
|
||||
dataset->max_value = master_file->ReadOptVector<int64_t>("/entry/image/max_value");
|
||||
} else if (master_file->Exists("/entry/data/data_000001")) {
|
||||
@@ -123,11 +134,28 @@ void JFJochHDF5Reader::ReadFile(const std::string& filename) {
|
||||
data_file, "/entry/detector/data_collection_efficiency_image",
|
||||
number_of_images, fimages);
|
||||
}
|
||||
|
||||
|
||||
if (data_file.Exists("/entry/MX")) {
|
||||
ReadVector(dataset->spot_count,
|
||||
data_file, "/entry/MX/nPeaks",
|
||||
number_of_images, fimages);
|
||||
if (data_file.Exists("/entry/MX/peakCountUnfiltered"))
|
||||
ReadVector(dataset->spot_count,
|
||||
data_file, "/entry/MX/peakCountUnfiltered",
|
||||
number_of_images, fimages);
|
||||
else
|
||||
ReadVector(dataset->spot_count,
|
||||
data_file, "/entry/MX/nPeaks",
|
||||
number_of_images, fimages);
|
||||
|
||||
ReadVector(dataset->spot_count_ice_rings,
|
||||
data_file, "/entry/MX/peakCountIceRingRes",
|
||||
number_of_images, fimages);
|
||||
|
||||
ReadVector(dataset->spot_count_low_res,
|
||||
data_file, "/entry/MX/peakCountLowRes",
|
||||
number_of_images, fimages);
|
||||
|
||||
ReadVector(dataset->spot_count_indexed,
|
||||
data_file, "/entry/MX/peakCountIndexed",
|
||||
number_of_images, fimages);
|
||||
|
||||
ReadVector(dataset->indexing_result,
|
||||
data_file, "/entry/MX/imageIndexed",
|
||||
@@ -370,9 +398,11 @@ bool JFJochHDF5Reader::LoadImage_i(std::shared_ptr<JFJochReaderDataset> &dataset
|
||||
message.image = LoadImageDataset(buffer, *source_file, image_id);
|
||||
message.number = image_number;
|
||||
|
||||
if ((dataset->spot_count.size() > image_number)
|
||||
&& (dataset->spot_count[image_number] > 0)) {
|
||||
size_t spot_count = std::lround(dataset->spot_count[image_number]);
|
||||
auto spot_count_opt = source_file->ReadElement<uint32_t>("/entry/MX/nPeaks", image_id);
|
||||
|
||||
if (spot_count_opt.has_value() && spot_count_opt.value() > 0) {
|
||||
size_t spot_count = spot_count_opt.value();
|
||||
|
||||
auto spot_x = source_file->ReadVector<float>(
|
||||
"/entry/MX/peakXPosRaw",
|
||||
{(hsize_t) image_id, 0},
|
||||
|
||||
@@ -99,6 +99,10 @@ std::shared_ptr<JFJochReaderDataset> JFJochHttpReader::UpdateDataset_i() {
|
||||
|
||||
dataset->bkg_estimate = GetPlot_i("bkg_estimate");
|
||||
dataset->spot_count = GetPlot_i("spot_count");
|
||||
dataset->spot_count_ice_rings = GetPlot_i("spot_count_ice");
|
||||
dataset->spot_count_low_res = GetPlot_i("spot_count_low_res");
|
||||
dataset->spot_count_indexed = GetPlot_i("spot_count_indexed");
|
||||
|
||||
dataset->indexing_result = GetPlot_i("indexing_rate");
|
||||
dataset->profile_radius = GetPlot_i("profile_radius");
|
||||
dataset->b_factor = GetPlot_i("b_factor");
|
||||
|
||||
@@ -27,6 +27,10 @@ struct JFJochReaderDataset {
|
||||
size_t q_bins = 0;
|
||||
|
||||
std::vector<float> spot_count;
|
||||
std::vector<float> spot_count_indexed;
|
||||
std::vector<float> spot_count_low_res;
|
||||
std::vector<float> spot_count_ice_rings;
|
||||
|
||||
std::vector<float> indexing_result;
|
||||
std::vector<float> bkg_estimate;
|
||||
std::vector<float> resolution_estimate;
|
||||
|
||||
Reference in New Issue
Block a user