-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #113 from leejjoon/fix-cube2
add a test case for radio cubes
- Loading branch information
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
SIMPLE = T / | ||
BITPIX = -32 / | ||
NAXIS = 3 / | ||
NAXIS1 = 256 / | ||
NAXIS2 = 256 / | ||
NAXIS3 = 63 / | ||
EQUINOX = 2.000000000E+03 /Epoch of RA DEC | ||
CTYPE1 = 'RA---SIN' / | ||
CRVAL1 = 1.81046666667E+02 / | ||
CDELT1 = -1.388888923E-03 / | ||
CRPIX1 = 1.280000000E+02 / | ||
CROTA1 = 0.000000000E+00 / | ||
CTYPE2 = 'DEC--SIN' / | ||
CRVAL2 = 1.84433333333E+01 / | ||
CDELT2 = 1.388888923E-03 / | ||
CRPIX2 = 1.290000000E+02 / | ||
CROTA2 = 0.000000000E+00 / | ||
CTYPE3 = 'FREQ ' / | ||
CRVAL3 = 1.41604138193E+09 / | ||
CDELT3 = 4.882812500E+04 / | ||
CRPIX3 = 3.200000000E+01 / | ||
CROTA3 = 0.000000000E+00 / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import os | ||
from os.path import join | ||
from astropy.io.fits import Header | ||
from .. import parse | ||
from numpy.testing import assert_allclose | ||
|
||
rootdir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data') | ||
|
||
|
||
def demo_header(): | ||
return Header.fromtextfile(join(rootdir, "sample_fits04.header")) | ||
|
||
|
||
def test_cube(): | ||
|
||
header = demo_header() | ||
|
||
region_string = 'circle(12:04:15.065,+18:26:51.00,173.029")' | ||
r = parse(region_string).as_imagecoord(header) | ||
|
||
assert_allclose(r[0].coord_list, [117, 132, 34.6], atol=0.01) |