Ejemplo n.º 1
0
 def add_match(self, name, abbreviation, peaks):
     matches = score_minerals(self.marker_peaks, [(name, abbreviation, peaks)])
     if len(matches):
         name, abbreviation, peaks, matches, score = matches[0]
     else:
         matches, score = [], 0.0
     self.matches.append([name, abbreviation, peaks, matches, score])
     sorted(self._matches, key=lambda match: match[-1], reverse=True)
     self.matches_changed.emit()
Ejemplo n.º 2
0
 def add_match(self, name, abbreviation, peaks):
     matches = score_minerals(self.marker_peaks,
                              [(name, abbreviation, peaks)])
     if len(matches):
         name, abbreviation, peaks, matches, score = matches[0]
     else:
         matches, score = [], 0.
     self.matches.append([name, abbreviation, peaks, matches, score])
     sorted(self._matches, key=lambda match: match[-1], reverse=True)
     self.matches_changed.emit()
Ejemplo n.º 3
0
 def auto_match(self):
     self._matches = score_minerals(self.marker_peaks, self.minerals)
     self.matches_changed.emit()
Ejemplo n.º 4
0
 def auto_match(self):
     self._matches = score_minerals(self.marker_peaks, self.minerals)
     self.matches_changed.emit()