diff --git a/CEP/PyBDSM/src/python/functions.py b/CEP/PyBDSM/src/python/functions.py
index b3769185543dd21f7127523c1a42f56cf3232159..2bd0d1b44bd26fa28fcab14a36611bbaa2f66906 100755
--- a/CEP/PyBDSM/src/python/functions.py
+++ b/CEP/PyBDSM/src/python/functions.py
@@ -1183,7 +1183,7 @@ def convert_pyrap_header(pyrap_image):
 
     tfile = tempfile.NamedTemporaryFile(delete=False)
     pyrap_image.tofits(tfile.name)
-    hdr = pyfits.get_header(tfile.name)
+    hdr = pyfits.getheader(tfile.name)
     return hdr