pywcsgrid2 icon indicating copy to clipboard operation
pywcsgrid2 copied to clipboard

PyFITS deprecation warnings

Open astrocaribe opened this issue 9 years ago • 0 comments

There are several deprecation warnings that pop up, it seems like from PyFITS. Below are the warnings:

[astrocaribe:~/projects/python/astroplotlib] [common] master(+0/-248)* ± cd scripts/ /Users/astrocaribe/projects/python/astroplotlib/scripts ⌁ [astrocaribe:~/projects/python/astroplotlib/scripts] [common] master(+0/-472)* ± python contours_4_python.py /Users/astrocaribe/Ureka/variants/common/lib/python2.7/site-packages/pywcsgrid2/wcs_helper.py:233: PyfitsDeprecationWarning: The ascard function is deprecated as of version 3.1 and may be removed in a future version.

    Use the `.cards` attribute instead.

if hasattr(header, 'ascard'): /Users/astrocaribe/Ureka/variants/common/lib/python2.7/site-packages/pyfits/card.py:70: PyfitsDeprecationWarning: The CardList class has been deprecated; all its former functionality has been subsumed by the Header class, so CardList objects should not be directly created. See the PyFITS 3.1.0 CHANGELOG for more details. PyfitsDeprecationWarning) WARNING: AstropyDeprecationWarning: The CardList class has been deprecated; all its former functionality has been subsumed by the Header class, so CardList objects should not be directly created. See the PyFITS 3.1.0 CHANGELOG for more details. [astropy.io.fits.card] /Users/astrocaribe/Ureka/variants/common/lib/python2.7/site-packages/pywcsgrid2/wcs_helper.py:108: PyfitsDeprecationWarning: The key function is deprecated as of version 3.1 and may be removed in a future version.

    Use the `.keyword` attribute instead.

if c.key in ["COMMENT", "HISTORY"]: /Users/astrocaribe/Ureka/variants/common/lib/python2.7/site-packages/pywcsgrid2/wcs_helper.py:112: PyfitsDeprecationWarning: The key function is deprecated as of version 3.1 and may be removed in a future version.

    Use the `.keyword` attribute instead.

if c.key.startswith("CUNIT") and c.value.lower().startswith("deg"): /Users/astrocaribe/Ureka/variants/common/lib/python2.7/site-packages/pywcsgrid2/wcs_helper.py:117: PyfitsDeprecationWarning: The key function is deprecated as of version 3.1 and may be removed in a future version.

    Use the `.keyword` attribute instead.

cards.append(pyfits.Card(c.key, c.value, c.comment)) WARNING: AstropyDeprecationWarning: The append function is deprecated and may be removed in a future version. Use :meth:Header.append instead. [astropy.utils.decorators] WARNING: AstropyDeprecationWarning: The ascard function is deprecated and may be removed in a future version. Use the .cards attribute instead. [astropy.utils.decorators]


The script that generates these warnings can be found at https://github.com/astrocaribe/astroplotlib/blob/master/scripts/contours_4_python.py

The current module versions that I'm currently using can be found here https://github.com/astrocaribe/astroplotlib/blob/master/Requirements.txt

astrocaribe avatar Dec 29 '15 00:12 astrocaribe