Skip to content

Commit

Permalink
Fixed loading in edf as int
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur Glowacki committed Jan 2, 2024
1 parent f66d42f commit 9e767ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/io/file/esrf/edf_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ namespace edf

logI << header << "\n";

float* val = (float*)(buffer + idx);
int* val = (int*)(buffer + idx);
for (int col = 0; col < spec_line->size(); col++)
{
for (int samp = 0; samp < 2048; samp++)
{
(*spec_line)[col][samp] = *val;
(*spec_line)[col][samp] = static_cast<T_real>(*val);
val++;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/io/file/hl_file_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ DLL_EXPORT bool load_spectra_volume(std::string dataset_directory,
fullpath = dataset_directory + DIR_END_CHAR + "edf" + DIR_END_CHAR + file_title + "_xia" + str_det_num + "_0001_0000_" + str_row + ".edf";
io::file::edf::load_spectra_line(fullpath, &(*spectra_volume)[r]);
}
//// io::file::HDF5_IO::inst()->start_save_seq(true);
io::file::HDF5_IO::inst()->start_save_seq(true);
//// io::file::HDF5_IO::inst()->save_scan_scalers_esrf<T_real>(dataset_directory + DIR_END_CHAR + dataset_file, detector_num);
return true;
}
Expand Down

0 comments on commit 9e767ac

Please sign in to comment.