File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -97,3 +97,18 @@ def test_footprint_to_reg_pointing(pointing_footprint_str=pointing_footprint_str
97
97
assert actual_reg .center .ra == reg_output [0 ].center .ra
98
98
assert actual_reg .center .dec == reg_output [0 ].center .dec
99
99
assert actual_reg .radius == reg_output [0 ].radius
100
+
101
+ @pytest .mark .skipif (not HAS_REGIONS , reason = "regions is required" )
102
+ def test_footprint_to_reg_plot (pointing_footprint_str = pointing_footprint_str ):
103
+ reg_output = footprint_to_reg (pointing_footprint_str )
104
+
105
+ from astropy .wcs import WCS
106
+ ww = WCS (naxis = 2 )
107
+ ww .wcs .crpix = [250.0 , 250.0 ]
108
+ ww .wcs .cdelt = [- 7.500000005754e-05 , 7.500000005754e-05 ]
109
+ ww .wcs .ctype = ['RA---SIN' , 'DEC--SIN' ]
110
+ ww .wcs .crval = [reg_output [0 ].center .ra .value , reg_output [0 ].center .dec .value ]
111
+
112
+ pix_region = reg_output [0 ].to_pixel (ww )
113
+ artist = pix_region .as_artist ()
114
+ assert artist is not None
You can’t perform that action at this time.
0 commit comments