hscmap.vec3 module¶
- class hscmap.vec3.SkyCoord(ra, dec)[source]¶
Bases:
object
This class represents a position on the celestial sphere. The position is represented by right ascension and declination.
- class hscmap.vec3.Vec3(x, y, z)[source]¶
Bases:
object
This class represents a 3D vector. Operator overloading is implemented for addition, subtraction, multiplication, division, negation, and absolute value.
a = Vec3(1, 2, 3) b = Vec3(4, 5, 6) c = a + b # c = Vec3(5, 7, 9) d = a - b # d = Vec3(-3, -3, -3) e = a * 2 # e = Vec3(2, 4, 6) f = 2 * a # f = Vec3(2, 4, 6) g = a / 2 # g = Vec3(0.5, 1, 1.5) h = -a # h = Vec3(-1, -2, -3) i = abs(a) # i = 3.7416573867739413
- Parameters:
x (float) –
y (float) –
z (float) –
- x: float¶
- y: float¶
- z: float¶
- dot(other)[source]¶
Return the dot product of this vector and other.
- Parameters:
other (Vec3) –
- Return type:
float