Browse Source

Fix bug in coordinate calculation and add tests

Julia Sprenger 4 years ago
parent
commit
ff1977a737
2 changed files with 2 additions and 2 deletions
  1. 1 1
      code/reachgraspio/reachgraspio.py
  2. 1 1
      code/reachgraspio/test_reachgraspio.py

+ 1 - 1
code/reachgraspio/reachgraspio.py

@@ -947,7 +947,7 @@ class ReachGraspIO(BlackrockIO):
                 continue
             ca_ids[i] = self.connector_aligned_map[channel_id]
             coordinates_x[i] = np.mod(ca_ids[i] - 1, 10) * 0.4 * pq.mm
-            coordinates_y[i] = ((ca_ids[i] - 1) / 10) * 0.4 * pq.mm
+            coordinates_y[i] = int((ca_ids[i] - 1) / 10) * 0.4 * pq.mm
 
         return ca_ids, coordinates_x, coordinates_y
 

+ 1 - 1
code/reachgraspio/test_reachgraspio.py

@@ -1 +1 @@
-/annex/objects/MD5-s4243--3d125aa81929a7eaf1aaf6f301722729
+/annex/objects/MD5-s4667--8ddabe85652197c60acc4900e7dfbb10