tests.test_results
Tests relating to content of algebra.result
test_3frame_orthonormality()
Ensure that each frame of three vectors is orthonormal
Source code in src/analemma/tests/test_results.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | |
test_beta_pythagoras_identity()
Check that the expressions for \(\sin(\beta)\) and \(\cos(\beta)\) obey the Pythagorean identity
Source code in src/analemma/tests/test_results.py
264 265 266 267 268 269 270 271 272 273 274 275 276 277 | |
test_dialface_orientation()
Ensure that the dial face formed from rotated vectors matches the corresponding rotated surface bivector
The dial face \(G\) is formed as \(m_1\wedge m_2\) in analemma.algebra.frame.dialface. Check that this is consistent with \(R n_1 \wedge n_2 \tilde{R}\) where
\(R = \exp(-n_1\wedge n_2\frac{1}{2}d) \, \exp(-n_1\wedge n_3\frac{1}{2}i)\)
Source code in src/analemma/tests/test_results.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | |
test_gnomon_dialface_angle_pythagoras_identity()
analemma.algebra.result.gnomon_dialface_angle_sin gives \(\sin(A)\), the between the gnomon and the subgnomon (or, equivalently, the dial face). The subgnomon \(b\) has length \(\cos(A)\), and this test ensures that \(b^2 = 1 - \sin^2(A)\).
Source code in src/analemma/tests/test_results.py
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | |
test_gnomon_shadow_projection()
Check that \(1 + \lambda\cos(\Xi)\) is equal to the projection of \(w\) onto \(g\)
Source code in src/analemma/tests/test_results.py
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | |
test_hour_angle_pythagoras_identity()
Check that \(\sin^2(\Xi)\sin^2(\mu) + \sin^2(\Xi)\cos^2(\mu) = \sin^2(\Xi)\)
Source code in src/analemma/tests/test_results.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | |
test_noon_shadow_angle_pythagoras_identity()
Check that the expressions for \(\sin(\zeta)\) and \(\cos(\zeta)\) obey the Pythagorean identity
We have \(\sin^2(\zeta) + \cos^2(\zeta) = 1\) if the numerator of the left hand side is equal to the denominator, and we have an explicit expression for \(\cos(\Psi) = \sqrt{1 - \sin^2(\Psi)}\).
Source code in src/analemma/tests/test_results.py
210 211 212 213 214 215 216 217 218 219 220 221 222 223 | |
test_shadow_bivector_magnitude()
Checks related to the magnitude of \(S^2\).
Check that \(S^2 = (s\wedge g)^2 = (s\cdot g)^2 - s^2 g^2\) where \(s^2 = g^2 = 1\)
and ensure that
\(\sqrt{-S^2} = \sqrt{1 - (s\cdot g)^2} = \sqrt{1 - \cos^2(\Xi}) = \sin(\Xi)\)
Source code in src/analemma/tests/test_results.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | |
test_shadow_bivector_magnitude_angle_cos()
Compare two different ways of calculating \(\cos(\Xi)\)
Ensure that \(s\cdot g\) as computed via symbolic algebra is equal to an independent derivation
Source code in src/analemma/tests/test_results.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | |
test_shadow_plane_consistency()
Compare two forms of the shadow plane \(S\)
Ensure that the explicit form is equal to the form derived as \(s \wedge g\).
Source code in src/analemma/tests/test_results.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
test_shadow_triangle_solution()
Check that the shadow triangle solution \(\lambda\) solves the problem \(g + \lambda s = 0\)
Source code in src/analemma/tests/test_results.py
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | |
test_shadowplane_dialface_angle()
Compare two ways of calculating \(\cos(\Psi)\)
Ensure that
\(\frac{S\cdot G}{\sqrt{-S^2}\sqrt{-G^2}} = \frac{S\cdot G}{\sin(\Xi)}\)
Source code in src/analemma/tests/test_results.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | |
test_shadowplane_dialface_intersection_length()
A check on the length of \(u\), the vector formed as the intersection of shadow bivector and dial face
Ensure that \(u^2 = \sin^2(\Xi) - (S\cdot G)^2\)
Source code in src/analemma/tests/test_results.py
173 174 175 176 177 178 179 180 181 182 183 184 | |
test_sunray_shadow_projection()
Check that \(\lambda + \cos(\Xi)\) is equal to the projection of \(w\) onto \(s\)
Source code in src/analemma/tests/test_results.py
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 | |
test_unit_shadow_normalization()
Check the normalization of \(u\), the vector formed as the intersection of shadow bivector and dial face
Check that
\(\hat{w}^2 = \left(\frac{u}{\sin(\Xi)\sin(\Psi)}\right)^2 = 1\)
by showing that
\(\frac{u^2}{\sin^2(\Xi)} - \sin^2\Psi = 0\)
Source code in src/analemma/tests/test_results.py
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | |