|
@@ 303-319 (lines=17) @@
|
| 300 |
|
del dtime, soy, mlt_args_1, mlt_args_2, mlt_args_3, mlon_1, mlon_2 |
| 301 |
|
del mlon_3 |
| 302 |
|
|
| 303 |
|
def test_mlt_convert(self): |
| 304 |
|
"""Test MLT calculation""" |
| 305 |
|
mlt_args = list(self.long_date) |
| 306 |
|
mlt_args.extend([270.0, aacgmv2.AACGM_V2_DAT_PREFIX, |
| 307 |
|
aacgmv2.IGRF_12_COEFFS]) |
| 308 |
|
self.mlt = aacgmv2._aacgmv2.mlt_convert(*mlt_args) |
| 309 |
|
np.testing.assert_almost_equal(self.mlt, 16.2395, decimal=4) |
| 310 |
|
|
| 311 |
|
mlt_args[-3] = 80.0 |
| 312 |
|
self.mlt = aacgmv2._aacgmv2.mlt_convert(*mlt_args) |
| 313 |
|
np.testing.assert_almost_equal(self.mlt, 3.5729, decimal=4) |
| 314 |
|
|
| 315 |
|
mlt_args[-3] = -90.0 |
| 316 |
|
self.mlt = aacgmv2._aacgmv2.mlt_convert(*mlt_args) |
| 317 |
|
np.testing.assert_almost_equal(self.mlt, 16.2395, decimal=4) |
| 318 |
|
|
| 319 |
|
del mlt_args |
| 320 |
|
|
| 321 |
|
def test_mlt_convert_yrsec(self): |
| 322 |
|
"""Test MLT calculation using year and seconds of year""" |
|
@@ 260-276 (lines=17) @@
|
| 257 |
|
mloc = aacgmv2._aacgmv2.convert(7, 0, 0, aacgmv2._aacgmv2.G2A, |
| 258 |
|
aacgmv2.IGRF_12_COEFFS) |
| 259 |
|
|
| 260 |
|
def test_inv_mlt_convert(self): |
| 261 |
|
"""Test MLT inversion""" |
| 262 |
|
mlt_args = list(self.long_date) |
| 263 |
|
mlt_args.extend([12.0, aacgmv2.AACGM_V2_DAT_PREFIX, |
| 264 |
|
aacgmv2.IGRF_12_COEFFS]) |
| 265 |
|
self.mlon = aacgmv2._aacgmv2.inv_mlt_convert(*mlt_args) |
| 266 |
|
np.testing.assert_almost_equal(self.mlon, -153.5931, decimal=4) |
| 267 |
|
|
| 268 |
|
mlt_args[-3] = 25.0 |
| 269 |
|
self.mlon = aacgmv2._aacgmv2.inv_mlt_convert(*mlt_args) |
| 270 |
|
np.testing.assert_almost_equal(self.mlon, 41.4069, decimal=4) |
| 271 |
|
|
| 272 |
|
mlt_args[-3] = -1.0 |
| 273 |
|
self.mlon = aacgmv2._aacgmv2.inv_mlt_convert(*mlt_args) |
| 274 |
|
np.testing.assert_almost_equal(self.mlon, 11.4069, decimal=4) |
| 275 |
|
|
| 276 |
|
del mlt_args |
| 277 |
|
|
| 278 |
|
def test_inv_mlt_convert_yrsec(self): |
| 279 |
|
"""Test MLT inversion with year and seconds of year""" |