mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-08 19:10:42 +02:00
works for both g25 and normal
This commit is contained in:
parent
ca0aa7144c
commit
afbc414afe
@ -104,8 +104,10 @@ void HDF5VirtualFile::CreateVirtualFile(
|
|||||||
? maxFramesPerFile
|
? maxFramesPerFile
|
||||||
: (numImagesCaught - framesSaved);
|
: (numImagesCaught - framesSaved);
|
||||||
|
|
||||||
|
// starting location
|
||||||
|
hsize_t start[3] = {framesSaved, 0, 0};
|
||||||
// number of elements separating each block
|
// number of elements separating each block
|
||||||
hsize_t stride[3] = {1, 1, 2};
|
hsize_t stride[3] = {1, 1, 1};
|
||||||
// number of blocks
|
// number of blocks
|
||||||
hsize_t count[3] = {nDimx, nDimy, nDimz};
|
hsize_t count[3] = {nDimx, nDimy, nDimz};
|
||||||
// block size
|
// block size
|
||||||
@ -120,11 +122,18 @@ void HDF5VirtualFile::CreateVirtualFile(
|
|||||||
// block size
|
// block size
|
||||||
hsize_t blockPara[3] = {nDimx, 1};
|
hsize_t blockPara[3] = {nDimx, 1};
|
||||||
|
|
||||||
|
// interleaving for g2
|
||||||
|
if (gotthard25um) {
|
||||||
|
stride[2] = 2;
|
||||||
|
}
|
||||||
|
|
||||||
// loop through readouts (image)
|
// loop through readouts (image)
|
||||||
for (unsigned int i = 0; i < numModY * numModZ; ++i) {
|
for (unsigned int i = 0; i < numModY * numModZ; ++i) {
|
||||||
|
|
||||||
// starting location
|
// interleaving for g2
|
||||||
hsize_t start[3] = {framesSaved, 0, i};
|
if (gotthard25um) {
|
||||||
|
start[2] = i;
|
||||||
|
}
|
||||||
|
|
||||||
// setect data hyperslabs
|
// setect data hyperslabs
|
||||||
vdsDataSpace.selectHyperslab(H5S_SELECT_SET, count, start,
|
vdsDataSpace.selectHyperslab(H5S_SELECT_SET, count, start,
|
||||||
@ -183,10 +192,13 @@ void HDF5VirtualFile::CreateVirtualFile(
|
|||||||
|
|
||||||
// H5Sclose(srcDataspace);
|
// H5Sclose(srcDataspace);
|
||||||
// H5Sclose(srcDataspace_para);
|
// H5Sclose(srcDataspace_para);
|
||||||
start[2] += nDimz;
|
|
||||||
if (start[2] >= (numModZ * nDimz)) {
|
if (!gotthard25um) {
|
||||||
start[2] = 0;
|
start[2] += nDimz;
|
||||||
start[1] += nDimy;
|
if (start[2] >= (numModZ * nDimz)) {
|
||||||
|
start[2] = 0;
|
||||||
|
start[1] += nDimy;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
startPara[1]++;
|
startPara[1]++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user