Skip to content
Snippets Groups Projects
Commit 6f4b561b authored by Thomas Kluyver's avatar Thomas Kluyver
Browse files

Use posixpath to construct HDF5 paths

parent 24126e86
No related branches found
No related tags found
1 merge request!527HDF5 copy except function
import traceback import traceback
import zlib import zlib
from multiprocessing.pool import ThreadPool from multiprocessing.pool import ThreadPool
import posixpath
from pathlib import Path from pathlib import Path
from typing import Any, Dict, Optional, Tuple from typing import Any, Dict, Optional, Tuple
...@@ -966,11 +967,11 @@ class AgipdCorrections: ...@@ -966,11 +967,11 @@ class AgipdCorrections:
# these are touched in the correct function, do not copy them here # these are touched in the correct function, do not copy them here
dont_copy = ["data", "cellId", "trainId", "pulseId", "status", dont_copy = ["data", "cellId", "trainId", "pulseId", "status",
"length"] "length"]
dont_copy = [agipd_base.rstrip('/') + f"/image/{ds}" dont_copy = [posixpath.join(agipd_base, "image", ds)
for ds in dont_copy] for ds in dont_copy]
# don't copy index as we may need to adjust if we filter trains # don't copy index as we may need to adjust if we filter trains
dont_copy.append(idx_base.rstrip('/') + "image") dont_copy.append(posixpath.join(idx_base, "image"))
h5_copy_except_paths(infile, outfile, dont_copy) h5_copy_except_paths(infile, outfile, dont_copy)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment