Exemplo n.º 1
0
 def _quality(self, wind):
     if self.path is None:
         return None
     
     beat_pc, beat_count = wind_angle_measure(self.path, wind, 0, self.BEAT_RANGE)
     run_pc, run_count = wind_angle_measure(self.path, wind, 180, self.RUN_RANGE)
     reach_pc, reach_count = 1.0 - beat_pc - run_pc, self.marks.count()-1 - beat_count - run_count
     
     vote = 0
     vote += min(beat_count, 2)
     vote += min(run_count, 2)
     vote += min(reach_count, 1)
     
     if vote < 5 and (beat_pc > 0.25 or run_pc > 0.25):
         vote += 1
     
     # print "\tWIND-ANGLES=", ", ".join([str(a) for a in self.wind_angles(wind)])
     # print "\tBEAT: ", beat_count, beat_pc
     # print "\tRUN: ", run_count, run_pc
     # print "\tREACH: ", reach_count, reach_pc
     # print "\tVOTE=", vote
     return vote
Exemplo n.º 2
0
 def run_percent(self, wind):
     return wind_angle_measure(self.path, wind, 180, self.RUN_RANGE)[0]
Exemplo n.º 3
0
 def beat_percent(self, wind):
     return wind_angle_measure(self.path, wind, 0, self.BEAT_RANGE)[0]