File suffix to handle up to 1e5 projections
Currently, output files are written with a file suffix of four digits ("%04d"
).
This is true for volume files (partial HDF5) and single-frame files (EDF, Tiff, JP2) using start_index
That said, we increasingly have to cope with datasets with more than 10k projections. Perhaps a workaround could be to patch tomoscan class in the beginning:
from tomoscan.esrf.volume import TIFFVolume, ...
TIFFVolume.DEFAULT_DATA_DATA_PATH_PATTERN = '{volume_basename}_{index_zfill5}.{data_extension}'
For the record, nabu can normally handle more than 1e4 projections when still using the %04d
suffix:
def variable_idxlen_sort(fname):
return int(fname.split("_")[-1].split(".")[0])
[...]
if files is None:
files = list(self.results.values())
try:
files.sort(key=variable_idxlen_sort)
except:
self.logger.error(
"Lexical ordering failed, falling back to default sort - it will fail for more than 10k projections"
)
files.sort()
Edited by Pierre Paleo