|
@@ 318-332 (lines=15) @@
|
| 315 |
|
[1.04551548, 1.04546847, 1.04542272]], |
| 316 |
|
rtol=1e-4) |
| 317 |
|
|
| 318 |
|
def test_convert_latlon_arr_badidea_failure(self): |
| 319 |
|
"""Test array latlon conversion failure for BADIDEA""" |
| 320 |
|
code = "G2A | BADIDEA" |
| 321 |
|
(self.lat_out, self.lon_out, |
| 322 |
|
self.r_out) = aacgmv2.convert_latlon_arr([60], [0], [3000], |
| 323 |
|
self.dtime, code) |
| 324 |
|
|
| 325 |
|
assert isinstance(self.lat_out, np.ndarray) |
| 326 |
|
assert isinstance(self.lon_out, np.ndarray) |
| 327 |
|
assert isinstance(self.r_out, np.ndarray) |
| 328 |
|
assert (self.r_out.shape == self.lon_out.shape and |
| 329 |
|
self.lat_out.shape == self.r_out.shape and |
| 330 |
|
self.r_out.shape == (1,)) |
| 331 |
|
assert np.all([np.isnan(self.lat_out), np.isnan(self.lon_out), |
| 332 |
|
np.isnan(self.r_out)]) |
| 333 |
|
|
| 334 |
|
def test_convert_latlon_arr_location_failure(self): |
| 335 |
|
"""Test array latlon conversion with a bad location""" |
|
@@ 334-346 (lines=13) @@
|
| 331 |
|
assert np.all([np.isnan(self.lat_out), np.isnan(self.lon_out), |
| 332 |
|
np.isnan(self.r_out)]) |
| 333 |
|
|
| 334 |
|
def test_convert_latlon_arr_location_failure(self): |
| 335 |
|
"""Test array latlon conversion with a bad location""" |
| 336 |
|
(self.lat_out, self.lon_out, |
| 337 |
|
self.r_out) = aacgmv2.convert_latlon_arr([0], [0], [0], self.dtime) |
| 338 |
|
|
| 339 |
|
assert isinstance(self.lat_out, np.ndarray) |
| 340 |
|
assert isinstance(self.lon_out, np.ndarray) |
| 341 |
|
assert isinstance(self.r_out, np.ndarray) |
| 342 |
|
assert (self.r_out.shape == self.lon_out.shape and |
| 343 |
|
self.lat_out.shape == self.r_out.shape and |
| 344 |
|
self.r_out.shape == (1,)) |
| 345 |
|
assert np.all([np.isnan(self.lat_out), np.isnan(self.lon_out), |
| 346 |
|
np.isnan(self.r_out)]) |
| 347 |
|
|
| 348 |
|
def test_convert_latlon_arr_time_failure(self): |
| 349 |
|
"""Test array latlon conversion with a bad time""" |