Changeset 1975
- Timestamp:
- Sep 21, 2015 4:52:57 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIspc.py
r1958 r1975 1063 1063 :returns: XYZ - numpy array of new coordinates now 0 or greater and less than 1 1064 1064 ''' 1065 XYZ = ( xyz+10.)%1.1065 XYZ = (np.array(xyz)+10.)%1. 1066 1066 cell = np.asarray(np.rint(xyz-XYZ),dtype=np.int32) 1067 1067 return XYZ,cell … … 3077 3077 _ReportTest() 3078 3078 msg = "MoveToUnitCell failed" 3079 assert (MoveToUnitCell([1,2,3]) == [0,0,0]).all, msg3080 assert (MoveToUnitCell([2,-1,-2]) == [0,0,0]).all, msg3081 assert abs(MoveToUnitCell(np.array([-.1]))[0]-0.9) < 1e-6, msg3082 assert abs(MoveToUnitCell(np.array([.1]))[0]-0.1) < 1e-6, msg3079 assert (MoveToUnitCell([1,2,3])[0] == [0,0,0]).all, msg 3080 assert (MoveToUnitCell([2,-1,-2])[0] == [0,0,0]).all, msg 3081 assert abs(MoveToUnitCell(np.array([-.1]))[0]-0.9)[0] < 1e-6, msg 3082 assert abs(MoveToUnitCell(np.array([.1]))[0]-0.1)[0] < 1e-6, msg 3083 3083 selftestlist.append(test0) 3084 3084
Note: See TracChangeset
for help on using the changeset viewer.