Skip to content

Commit e5a1a04

Browse files
committed
minor fix
1 parent aebe7a2 commit e5a1a04

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

src/utils.jl

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,7 @@ function wcs_to_celestial_frame(wcs::WCSTransform)
1919
ycoord = wcs.ctype[2][1:4]
2020

2121
if radesys == ""
22-
if xcoord == "RA--" && ycoord == "DEC-"
23-
if equinox === nothing
24-
radesys = "ICRS"
25-
elseif equinox < 1984.0
26-
radesys = "FK4"
27-
else
28-
radesys = "FK5"
29-
end
30-
elseif xcoord == "GLON" && ycoord == "GLAT"
22+
if xcoord == "GLON" && ycoord == "GLAT"
3123
radesys = "Gal"
3224
elseif xcoord == "TLON" && ycoord == "TLAT"
3325
radesys = "ITRS"

test/utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using Reproject: wcs_to_celestial_frame
12
@testset "wcs to celestial frame" begin
23
wcs1 = WCSTransform(2;
34
ctype = ["RA---AIR", "DEC--AIR"],
@@ -20,12 +21,11 @@
2021
ctype = ["RA---AIR", "DEC--AIR"],
2122
radesys = "UNK"
2223
)
23-
24+
2425
@test wcs_to_celestial_frame(wcs1) == "ICRS"
2526
@test wcs_to_celestial_frame(wcs2) == "FK4"
2627
@test wcs_to_celestial_frame(wcs3) == "FK5"
2728
@test wcs_to_celestial_frame(wcs4) == "Gal"
2829
@test wcs_to_celestial_frame(wcs5) == "ITRS"
2930
@test wcs_to_celestial_frame(wcs6) == "UNK"
3031
end
31-

0 commit comments

Comments
 (0)