diff --git a/notebooks/JWST/NIRCam/PSF_phot_01/GriddedPSFModel_simulation_and_photometry.ipynb b/notebooks/JWST/NIRCam/PSF_phot_01/GriddedPSFModel_simulation_and_photometry.ipynb index c01427cd..64676c90 100644 --- a/notebooks/JWST/NIRCam/PSF_phot_01/GriddedPSFModel_simulation_and_photometry.ipynb +++ b/notebooks/JWST/NIRCam/PSF_phot_01/GriddedPSFModel_simulation_and_photometry.ipynb @@ -21,7 +21,7 @@ "* *astropy.stats.gaussian_sigma_to_fwhm* for converting $\\sigma$ to FWHM\n", "* *astropy.table.Table* for constructing Astropy table\n", "* *astropy.utils.misc.NumpyRNGContext* for reproducible random result\n", - "* *astropy.visualization.simple_norm* for normalized image display\n", + "* *astropy.visualization* for normalized image display\n", "* *photutils* for photometry related classes and functions\n", "* *webbpsf* for JWST PSF related functions" ] @@ -40,7 +40,7 @@ "from astropy.stats import gaussian_sigma_to_fwhm\n", "from astropy.table import Table\n", "from astropy.utils.misc import NumpyRNGContext\n", - "from astropy.visualization import simple_norm\n", + "from astropy.visualization import imshow_norm, PercentileInterval, SqrtStretch\n", "from photutils import BasicPSFPhotometry\n", "from photutils import DBSCANGroup, MMMBackground\n", "from photutils.datasets import make_noise_image\n", @@ -128,9 +128,8 @@ "outputs": [], "source": [ "data = hdu[0].data[0]\n", - "norm = simple_norm(data, 'sqrt', percent=99.)\n", "plt.figure(figsize=(9, 9))\n", - "plt.imshow(data, norm=norm)" + "imshow_norm(data, interval=PercentileInterval(99.), stretch=SqrtStretch())" ] }, { @@ -368,9 +367,8 @@ }, "outputs": [], "source": [ - "norm = simple_norm(data, 'sqrt', percent=99.)\n", "plt.figure(figsize=(9, 9))\n", - "plt.imshow(data, norm=norm, origin='lower')" + "imshow_norm(data, interval=PercentileInterval(99.), stretch=SqrtStretch())" ] }, { @@ -498,7 +496,7 @@ "outputs": [], "source": [ "plt.figure(figsize=(9, 9))\n", - "plt.imshow(diff, norm=norm, origin='lower')\n", + "imshow_norm(diff, interval=PercentileInterval(99.), stretch=SqrtStretch())\n", "plt.colorbar()" ] },