|
3 | 3 | import numpy as np |
4 | 4 |
|
5 | 5 | from sas.sascalc.shape2sas.HelperFunctions import Qsampling, euler_rotation_matrix |
6 | | -from sas.sascalc.shape2sas.models import \ |
7 | | - Cube, Cuboid, Cylinder, CylinderRing, Disc, DiscRing, Ellipsoid, \ |
8 | | - EllipticalCylinder, HollowCube, HollowSphere, Sphere, SuperEllipsoid |
9 | | -from sas.sascalc.shape2sas.Typing import Vectors, Vector3D, Vector4D |
| 6 | +from sas.sascalc.shape2sas.models import ( |
| 7 | + Cube, |
| 8 | + Cuboid, |
| 9 | + Cylinder, |
| 10 | + CylinderRing, |
| 11 | + Disc, |
| 12 | + DiscRing, |
| 13 | + Ellipsoid, |
| 14 | + EllipticalCylinder, |
| 15 | + HollowCube, |
| 16 | + HollowSphere, |
| 17 | + Sphere, |
| 18 | + SuperEllipsoid, |
| 19 | +) |
| 20 | +from sas.sascalc.shape2sas.Typing import Vector3D, Vector4D, Vectors |
10 | 21 |
|
11 | 22 |
|
12 | 23 | @dataclass |
@@ -72,7 +83,7 @@ def __init__(self, matrix: np.ndarray, center_mass: np.ndarray): |
72 | 83 |
|
73 | 84 | def transform(coords: np.ndarray[Vector3D], translate: Translation = np.array([0, 0, 0]), rotate: Rotation = Rotation(np.eye(3), np.array([0, 0, 0]))): |
74 | 85 | """Transform a set of coordinates by a rotation R and translation T""" |
75 | | - if isinstance(rotate, np.ndarray): |
| 86 | + if isinstance(rotate, np.ndarray): |
76 | 87 | rotate = Rotation(rotate, np.array([0, 0, 0])) |
77 | 88 | assert coords.shape[0] == 3 |
78 | 89 | assert translate.shape == (3,) |
|
0 commit comments