1

I'm new to using python for photometry so I'm working through the Photutils tutorial on Background extraction, Aperture photometry etc I'm using a notebook in Python 3 and have downloaded the latest Photutils package using anaconda. When I try to do this:

from photutils import CircularAperture
positions = [(30., 30.), (40., 40.)]
apertures = CircularAperture(positions, r=3.)
from astropy import units as u
from astropy.coordinates import SkyCoord
from photutils import SkyCircularAperture
positions = SkyCoord(l=[1.2, 2.3] * u.deg, b=[0.1, 0.2] * u.deg,
                     frame='galactic')
apertures = SkyCircularAperture(positions, r=4. * u.arcsec)

I get the error cannot import name 'NUMPY_LT_1_14_1'

The same happens with from photutils import Background2D, MedianBackground and import make_source_mask

Any ideas please?

thanks! Helen

Helen U
  • 11
  • 1

1 Answers1

1

What version of Astropy and photutils do you have?

You can find out with

import astropy
print(astropy.__version__)
import photutils
print(photutils.__version__)

Note that the latest version is photutils 0.5 (see https://pypi.org/project/photutils/#history) and using Github search for NUMPY_LT_1_14_1 I found https://github.com/astropy/photutils/commit/36b1f6a6a9802d0d49d34837434630b9136cf0b2 which contains a change for this and should be included in photutils 0.5.

If you have an older photutils, the solution would be to update. If you do have the latest version 0.5, could you please open an issue at https://github.com/astropy/photutils/issues/new and post both the code to trigger the error and the resulting traceback, and your photutils and Astropy version number in the issue report?

Christoph
  • 2,790
  • 2
  • 18
  • 23
  • Thanks Christoph. I have astropy 3.0.4 and Photutils 0.5 I have opened an issue as you suggested – Helen U Oct 09 '18 at 12:44