Convert detector string representation (OID) to serialnumber

def get_det_id(self, det_oid):
        """Convert detector string representation (OID) to serialnumber"""
        try:
            return self.detectors[self.detectors.OID == det_oid
                                  ].SERIALNUMBER.iloc[0]
        except IndexError:
            log.critical("No det ID found for OID '{}'".format(det_oid))
            return None