|
1 | | -import pytest |
2 | | -import numpy as np |
3 | 1 | from os import path |
4 | 2 |
|
5 | | -from astropy.io import fits |
| 3 | +import astropy.units as u |
| 4 | +import numpy as np |
| 5 | +import pytest |
6 | 6 | from astropy import wcs |
7 | 7 | from astropy.coordinates import SkyCoord |
| 8 | +from astropy.io import fits |
8 | 9 | from astropy.time import Time |
9 | | -import astropy.units as u |
10 | 10 |
|
11 | | -from .utils_for_test import create_test_ffis |
12 | | -from ..make_cube import CubeFactory, TicaCubeFactory |
13 | 11 | from ..cube_cut import CutoutFactory |
14 | | -from ..exceptions import InvalidQueryError, InputWarning |
| 12 | +from ..exceptions import InputWarning, InvalidQueryError |
| 13 | +from ..make_cube import CubeFactory, TicaCubeFactory |
| 14 | +from .utils_for_test import create_test_ffis |
15 | 15 |
|
16 | 16 |
|
17 | 17 | def checkcutout(product, cutfile, pixcrd, world, csize, ecube, eps=1.e-7): |
@@ -343,12 +343,12 @@ def test_exceptions(tmpdir, ffi_type): |
343 | 343 | cube_table = hdu[2].data |
344 | 344 |
|
345 | 345 | # Testing when none of the FFIs have good wcs info |
346 | | - wcsaxes = 'WCSAXES' if ffi_type == 'SPOC' else 'WCAX3' |
347 | | - cube_table[wcsaxes] = 0 |
| 346 | + wcsaxes = 'CTYPE2' |
| 347 | + cube_table[wcsaxes] = 'N/A' |
348 | 348 | with pytest.raises(Exception, match='No FFI rows contain valid WCS keywords.') as e: |
349 | 349 | cutout_maker._parse_table_info(product=ffi_type, table_data=cube_table) |
350 | 350 | assert e.type is wcs.NoWcsKeywordsFoundError |
351 | | - cube_table[wcsaxes] = 2 |
| 351 | + cube_table[wcsaxes] = 'DEC--TAN-SIP' |
352 | 352 |
|
353 | 353 | # Testing when nans are present |
354 | 354 | cutout_maker._parse_table_info(product=ffi_type, table_data=cube_table) |
|
0 commit comments