@@ -535,16 +535,15 @@ def _calc_pixels_size(self, length, module_size, pixel_size):
535
535
536
536
def _passage (self , corners , rot ):
537
537
shape = corners .shape
538
- origine = corners [ 0 ][ 0 ][ 0 , :]
538
+ deltaX , deltaY = 0.0 , 0.0
539
539
nmd = self ._rotation (corners , rot )
540
- u = corners [shape [0 ] - 1 ][0 ][1 , :] - corners [0 ][0 ][0 , :]
541
- u = u / numpy .linalg .norm (u )
542
- s = self ._rotation (u , rot )
543
- s = s / numpy .linalg .norm (s )
544
- v = numpy .array ([- u [1 ], u [0 ], u [2 ]])
545
- r = origine - nmd [0 ][0 ][0 , :]
546
- w = (0.1e-3 + 0.24e-3 + 75.14e-3 ) * u + (0.8e-3 ) * v + (0.55e-3 ) * s + r
547
- return self ._translation (nmd , w )
540
+ # Size in mm of the chip in the Y direction (including 10px gap)
541
+ size_Y = ((560.0 + 3 * 6 + 20 )* 0.13 / 1000 )
542
+ for i in range (1 , int (round (numpy .abs (rot [2 ])/ 6.74 ))):
543
+ deltaX = deltaX + numpy .sin (numpy .deg2rad (- rot [2 ] - 6.74 * (i )))
544
+ for i in range (int (round (numpy .abs (rot [2 ])/ 6.74 ))):
545
+ deltaY = deltaY + numpy .cos (numpy .deg2rad (- rot [2 ] - 6.74 * (i + 1 )))
546
+ return self ._translation (nmd , [size_Y * deltaX ,size_Y * deltaY , 0 ])
548
547
549
548
def _get_pixel_corners (self ):
550
549
pixel_size1 = self ._calc_pixels_size (self .MEDIUM_MODULE_SIZE [0 ],
0 commit comments