File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 27
27
__author__ = "Jérôme Kieffer"
28
28
__license__ = "MIT"
29
29
__copyright__ = "2020, ESRF"
30
- __date__ = "15/01/2021 "
30
+ __date__ = "05/12/2024 "
31
31
32
32
import io
33
33
import os
@@ -89,7 +89,10 @@ def extract_averaged(filename):
89
89
with Nexus (filename , "r" ) as nxsr :
90
90
entry_grp = nxsr .get_entries ()[0 ]
91
91
results ["h5path" ] = entry_grp .name
92
- nxdata_grp = nxsr .h5 [entry_grp .attrs ["default" ]]
92
+ default = entry_grp .attrs ["default" ]
93
+ if posixpath .split (default )[- 1 ] == "hplc" :
94
+ default = posixpath .join (posixpath .split (default )[0 ],"result" )
95
+ nxdata_grp = nxsr .h5 [default ]
93
96
signal = nxdata_grp .attrs ["signal" ]
94
97
axis = nxdata_grp .attrs ["axes" ]
95
98
results ["I" ] = nxdata_grp [signal ][()]
@@ -119,9 +122,7 @@ def extract_averaged(filename):
119
122
results ["exposure temperature" ] = sample_grp ["temperature" ][()]
120
123
results ["concentration" ] = sample_grp ["concentration" ][()]
121
124
if "2_correlation_mapping" in entry_grp :
122
- results ["to_merge" ] = entry_grp [
123
- "2_correlation_mapping/results/to_merge"
124
- ][()]
125
+ results ["to_merge" ] = entry_grp ["2_correlation_mapping/results/to_merge" ][()]
125
126
return results
126
127
127
128
You can’t perform that action at this time.
0 commit comments