Skip to content

Commit 241748f

Browse files
committed
label creation for data1d
1 parent 5d8fa26 commit 241748f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pyxs/utils.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,17 @@
22
import matplotlib.colors as mc
33
from functools import reduce
44

5+
def strip_name(s):
6+
strs = ["_SAXS","_WAXS1","_WAXS2",".cbf",".tif"]
7+
for ts in strs:
8+
if ts in s:
9+
ss = s.split(ts)
10+
s = "".join(ss)
11+
return s
12+
513
def common_name(s1, s2):
14+
s1 = strip_name(s1)
15+
s2 = strip_name(s2)
616
l = len(s1)
717
if len(s2) < l:
818
l = len(s2)

0 commit comments

Comments
 (0)