2
2
Utilities for making finder charts and overlay images for ALMA proposing
3
3
"""
4
4
import string
5
- import os
6
5
7
- import numpy as np
8
-
9
- from astropy import wcs
10
- from astroquery import log
11
6
from astropy import units as u
12
- from astropy .io import fits
13
7
from astropy .coordinates import SkyCoord
14
8
from astroquery .utils .commons import ASTROPY_LT_4_1
15
9
16
- from astroquery .skyview import SkyView
17
- from astroquery .alma import Alma
18
-
19
-
20
10
__all__ = ['parse_frequency_support' , 'footprint_to_reg' , 'approximate_primary_beam_sizes' ]
21
11
22
12
@@ -67,10 +57,9 @@ def footprint_to_reg(footprint):
67
57
68
58
reglist = []
69
59
70
- meta = {'source' : 1 , 'include' : 1 ,
71
- 'fixed' : 0 , 'text' : '' }
72
- visual = {'color' : 'green' , 'dash' : '0' , 'dashlist' : '8 3' ,
73
- 'font' : '"helvetica 10 normal roman"' , 'width' : '1' }
60
+ meta = {'source' : 1 , 'include' : 1 , 'fixed' : 0 , 'text' : '' }
61
+ visual = {'color' : 'green' , 'dash' : '0' , 'dashlist' : '8 3' ,
62
+ 'font' : '"helvetica 10 normal roman"' , 'width' : '1' }
74
63
75
64
entries = footprint .split ()
76
65
if entries [0 ] == 'Circle' :
@@ -82,12 +71,10 @@ def footprint_to_reg(footprint):
82
71
polygons = [index for index , entry in enumerate (entries ) if entry == 'Polygon' ]
83
72
84
73
for start , stop in zip (polygons , polygons [1 :]+ [None ]):
85
- #reg = Shape('polygon', [float(x) for x in entries[start+1:stop] if x != 'ICRS'])
86
74
ra = [float (x ) for x in entries [start + 1 :stop :2 ]]* u .deg
87
75
dec = [float (x ) for x in entries [start + 2 :stop :2 ]]* u .deg
88
76
vertices = SkyCoord (ra , dec , frame = 'icrs' )
89
- reg = regions .PolygonSkyCoord (vertices = vertices ,
90
- meta = meta , visual = visual )
77
+ reg = regions .PolygonSkyCoord (vertices = vertices , meta = meta , visual = visual )
91
78
reglist .append (reg )
92
79
93
80
return reglist
0 commit comments