def match_detector_name(self, sname, strict=False):
        s  = sname.lower()
        sw = s.split()
        dnames  = [i.lower() for i in self.det_desc]

        # look for exact match
        for nam in dnames:
            if s == nam:  return dnames.index(nam)

        # look for inexact match 1: compare 1st words
        for nam in dnames:
            sx = nam.split()
            if sw[0] == sx[0]:
                return dnames.index(i)

        # check for 1st word in the det name
        if not strict:
            for dnam in dnames:
                j = dnam.find(sw[0])
                if (j >= 0):  return dnames.index(i)
        # found no matches
        return -1
return index in self.det_desc most closely matching supplied string
dataset/ETHPy150Open xraypy/xraylarch/plugins/io/gse_escan.py/EscanData.match_detector_name