summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadia Dencheva <nadia.astropy@gmail.com>2016-12-11 11:46:34 -0500
committerGitHub <noreply@github.com>2016-12-11 11:46:34 -0500
commitdc6eaa10f996af4173cebdd85f7a53d113272529 (patch)
treef44bbe11fe8507d9186ea5e5a0d6de2808a35b66
parent9fa6e818cc2f93ee65b4f979368e9db9eb8134b5 (diff)
parent1055491ec750387d3593a5200493985200233739 (diff)
downloadstwcs_hcf-dc6eaa10f996af4173cebdd85f7a53d113272529.tar.gz
Merge pull request #21 from nden/lazy-load-hdus
update to keep in sync with astropy
-rw-r--r--CHANGES.rst8
-rw-r--r--stwcs/updatewcs/__init__.py1
2 files changed, 8 insertions, 1 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index a6c6170..6b9da19 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,3 +1,9 @@
+1.3 (Unreleased)
+----------------
+
+- updatewcs() now reads all extension immediately after opening a file
+ to fix a problem after astropy implemented fits lazy loading. [#21]
+
1.2.4 (2016-10-27)
------------------
@@ -16,4 +22,4 @@
1.2.3 (2016-07-13)
------------------
-- Move to github. \ No newline at end of file
+- Move to github.
diff --git a/stwcs/updatewcs/__init__.py b/stwcs/updatewcs/__init__.py
index fe1eea2..46faa72 100644
--- a/stwcs/updatewcs/__init__.py
+++ b/stwcs/updatewcs/__init__.py
@@ -116,6 +116,7 @@ def makecorr(fname, allowed_corr):
"""
logger.info("Allowed corrections: {0}".format(allowed_corr))
f = fits.open(fname, mode='update')
+ f.readall()
# Determine the reference chip and create the reference HSTWCS object
nrefchip, nrefext = getNrefchip(f)
wcsutil.restoreWCS(f, nrefext, wcskey='O')