diff options
author | com-sixs <com-sixs@synchrotron-soleil.fr> | 2017-10-11 13:18:34 +0200 |
---|---|---|
committer | com-sixs <com-sixs@synchrotron-soleil.fr> | 2017-10-11 17:34:41 +0200 |
commit | bad8e7cf8146f147365aa073c3da9049a0cebda8 (patch) | |
tree | aadf2193da5aab1dd788f86eb00baa7bb3304624 | |
parent | fac7088030967a07a90e85f889d93b464f460062 (diff) |
read only the nxs or hdf5 files
-rw-r--r-- | binoculars/backends/sixs.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/binoculars/backends/sixs.py b/binoculars/backends/sixs.py index 38b495f..6350129 100644 --- a/binoculars/backends/sixs.py +++ b/binoculars/backends/sixs.py @@ -433,7 +433,10 @@ class SIXS(backend.InputBase): filename = None if self.config.nexusdir: dirname = self.config.nexusdir - files = [f for f in os.listdir(dirname) if str(scanno).zfill(5) in f] + files = [f for f in os.listdir(dirname) + if ((str(scanno).zfill(5) in f) + and (os.path.splitext(f)[1] in ['.hdf5', '.nxs'])) + ] if files is not []: filename = os.path.join(dirname, files[0]) else: |