Skip to content

Commit

Permalink
Fixing linter, adding changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
bsipocz committed Oct 2, 2022
1 parent 0237749 commit 0ae5dad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ alma
- Throws an error when an unsupported ``kwargs`` (or argument) is passed in to a function. [#2475]
- New DataLink API handling. [#2493]
- Fixed bug #2489 in which blank URLs were being sent to the downloader [#2490]

- Removed deprecated broken functions from ``alma.utils``. [#2331]

astrometry.net
^^^^^^^^^^^^^^
Expand Down
21 changes: 4 additions & 17 deletions astroquery/alma/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,11 @@
Utilities for making finder charts and overlay images for ALMA proposing
"""
import string
import os

import numpy as np

from astropy import wcs
from astroquery import log
from astropy import units as u
from astropy.io import fits
from astropy.coordinates import SkyCoord
from astroquery.utils.commons import ASTROPY_LT_4_1

from astroquery.skyview import SkyView
from astroquery.alma import Alma


__all__ = ['parse_frequency_support', 'footprint_to_reg', 'approximate_primary_beam_sizes']


Expand Down Expand Up @@ -67,10 +57,9 @@ def footprint_to_reg(footprint):

reglist = []

meta={'source': 1, 'include': 1,
'fixed': 0, 'text': ''}
visual={'color': 'green', 'dash': '0', 'dashlist': '8 3',
'font': '"helvetica 10 normal roman"', 'width': '1'}
meta = {'source': 1, 'include': 1, 'fixed': 0, 'text': ''}
visual = {'color': 'green', 'dash': '0', 'dashlist': '8 3',
'font': '"helvetica 10 normal roman"', 'width': '1'}

entries = footprint.split()
if entries[0] == 'Circle':
Expand All @@ -82,12 +71,10 @@ def footprint_to_reg(footprint):
polygons = [index for index, entry in enumerate(entries) if entry == 'Polygon']

for start, stop in zip(polygons, polygons[1:]+[None]):
#reg = Shape('polygon', [float(x) for x in entries[start+1:stop] if x != 'ICRS'])
ra = [float(x) for x in entries[start+1:stop:2]]*u.deg
dec = [float(x) for x in entries[start+2:stop:2]]*u.deg
vertices = SkyCoord(ra, dec, frame='icrs')
reg = regions.PolygonSkyCoord(vertices=vertices,
meta=meta, visual=visual)
reg = regions.PolygonSkyCoord(vertices=vertices, meta=meta, visual=visual)
reglist.append(reg)

return reglist
Expand Down

0 comments on commit 0ae5dad

Please sign in to comment.