20065f034f2fac532da85257132a46dc576f5a33,starry/Map/utils.py,,RAxisAngle,#Any#Any#,10
Before Change
R = np.zeros((3, 3))
cost = np.cos(theta * np.pi / 180.)
sint = np.sin(theta * np.pi / 180.)
R[0, 0] = cost + axis[0] * axis[0] * (1 - cost)
R[0, 1] = axis[0] * axis[1] * (1 - cost) - axis[2] * sint
R[0, 2] = axis[0] * axis[2] * (1 - cost) + axis[1] * sint
R[1, 0] = axis[1] * axis[0] * (1 - cost) + axis[2] * sint
R[1, 1] = cost + axis[1] * axis[1] * (1 - cost)
After Change
else:
// Rotate by the inclination
R = RAxisAngle([1, 0, 0], 90 - inc)
v = np.vstack((x.reshape(1, -1),
y.reshape(1, -1),
z.reshape(1, -1)))
x, y1, _ = np.dot(R, v)
v[2] *= -1
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: rodluger/starry
Commit Name: 20065f034f2fac532da85257132a46dc576f5a33
Time: 2019-05-20
Author: rodluger@gmail.com
File Name: starry/Map/utils.py
Class Name:
Method Name: RAxisAngle
Project Name: pantsbuild/pants
Commit Name: b29d65416481efe627ee832e9f7e6646edcd81a6
Time: 2014-06-16
Author: john.sirois@gmail.com
File Name: src/python/pants/backend/jvm/tasks/check_published_deps.py
Class Name: CheckPublishedDeps
Method Name: __init__
Project Name: pantsbuild/pants
Commit Name: b29d65416481efe627ee832e9f7e6646edcd81a6
Time: 2014-06-16
Author: john.sirois@gmail.com
File Name: src/python/pants/backend/core/tasks/filemap.py
Class Name: Filemap
Method Name: _find_targets