diff --git a/webbpsf/gridded_library.py b/webbpsf/gridded_library.py index 5ed2021f..731052db 100644 --- a/webbpsf/gridded_library.py +++ b/webbpsf/gridded_library.py @@ -112,9 +112,12 @@ def __init__(self, instrument, filter_name, detectors="all", num_psfs=16, psf_lo # Before doing anything else, check that we have GriddedPSFModel try: - from photutils import GriddedPSFModel + from photutils.psf import GriddedPSFModel except ImportError: - raise ImportError("This method requires photutils >= 0.6") + try: + from photutils import GriddedPSFModel + except ImportError: + raise ImportError("This method requires photutils >= 0.6") # Pull WebbPSF instance self.webb = instrument