Skip to content

Commit

Permalink
bump astropy_helpers version
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Alan Weaver committed Sep 21, 2015
1 parent 52a5c76 commit b25ad25
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
3 changes: 2 additions & 1 deletion docs/pydl/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pydl Changelog
0.4.0 (unreleased)
------------------

* Use `astropy_helpers`_/v1.0.2, package-template_/v1.0.
* Use `astropy_helpers`_/v1.0.3, package-template_/v1.0.
* Remove some old FITS code that ``astropy.io.fits`` makes moot.
* Remove code for command-line scripts. These are now auto-generated by the
"entry_point" method.
Expand All @@ -14,6 +14,7 @@ pydl Changelog
* Fixed problem with the spheregroup code.
* Removed some code that is 100% redundant with astropy (*e.g.* ``angles_to_xyz``).
* Fixed bug in set_use_caps that was discovered on the IDL side.
* Updated documentation of ``read_fits_polygons``.

0.3.0 (2015-02-20)
------------------
Expand Down
11 changes: 5 additions & 6 deletions pydl/pydlutils/mangle/read_fits_polygons.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,23 @@
def read_fits_polygons(filename):
"""Read a "polygon" format FITS file.
The main point of this is to extract the xcaps and cmcaps columns
and replace them with caps.x and caps.cm, though this is really very silly
& is only here so it's similar to IDL.
Unlike the IDL version of this routine, the ``XCAPS`` and ``CMPCAPS`` columns
are *not* replaced with ``poly['CAPS']['X']`` and ``poly['CAPS']['CM']``.
Parameters
----------
filename : str
Name of FITS file to read.
Returns
-------
read_fits_polygons : FITS_rec
The data contained in HDU 1 of the FITS file.
"""
from astropy.io import fits
hdulist = fits.open(filename)
poly = hdulist[1].data
hdulist.close()
with fits.open(filename) as hdulist:
poly = hdulist[1].data
# poly['CAPS'] = {'CM':list(), 'X':list()}
# for k in range(len(poly['NCAPS'])):
# poly['CAPS']['CM'].append(poly['CMCAPS'][k,0:poly['NCAPS'][k]])
Expand Down

0 comments on commit b25ad25

Please sign in to comment.