From 1053181405d0e9a57715c67d8c116bcb283dec5a Mon Sep 17 00:00:00 2001 From: Camilla Pacifici Date: Wed, 8 Nov 2023 23:24:22 -0500 Subject: [PATCH] Update to latest version of packages --- .../NIRCam_PSF_Photometry_Example.ipynb | 27 ++++++++++++------- notebooks/psf_photometry/requirements.txt | 8 +++--- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/notebooks/psf_photometry/NIRCam_PSF_Photometry_Example.ipynb b/notebooks/psf_photometry/NIRCam_PSF_Photometry_Example.ipynb index 2afd8b07b..5b88e30ed 100644 --- a/notebooks/psf_photometry/NIRCam_PSF_Photometry_Example.ipynb +++ b/notebooks/psf_photometry/NIRCam_PSF_Photometry_Example.ipynb @@ -4,9 +4,13 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# PSF Photometry\n", - "\n", - "\n", + "# PSF Photometry" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "**Use case:** PSF photometry, creating a PSF, derive Color-Magnitude Diagram.
\n", "**Data:** NIRCam simulated images obtained using [MIRAGE](https://jwst-docs.stsci.edu/jwst-other-tools/mirage-data-simulator) and run through the [JWST pipeline](https://jwst-pipeline.readthedocs.io/en/latest/) of the Large Magellanic Cloud (LMC) Astrometric Calibration Field. Simulations is obtained using a 4-pt subpixel dither for three couples of wide filters: F070W, F115W, and F200W for the SW channel, and F277W, F356W, and F444W for the LW channel. We simulated only 1 NIRCam SW detector (i.e., \"NRCB1\"). For this example, we use Level-2 images (.cal, calibrated but not rectified) for two SW filters (i.e., F115W and F200W) and derive the photometry in each one of them. The images for the other filters are also available and can be used to test the notebook and/or different filters combination.
\n", "**Tools:** photutils.
\n", @@ -72,8 +76,8 @@ "os.environ[\"PYSYN_CDBS\"] = \"./grp/redcat/trds/\"\n", "\n", "# WEBBPSF Data\n", - "boxlink = 'https://stsci.box.com/shared/static/34o0keicz2iujyilg4uz617va46ks6u9.gz' \n", - "boxfile = './webbpsf-data/webbpsf-data-1.0.0.tar.gz'\n", + "boxlink = 'https://stsci.box.com/shared/static/cpga8oqarg5njvjhliau3t4fpdzkxgz4.gz' \n", + "boxfile = './webbpsf-data/webbpsf-data-LATEST.tar.gz'\n", "synphot_url = 'http://ssb.stsci.edu/trds/tarfiles/synphot5.tar.gz'\n", "synphot_file = './synphot5.tar.gz'\n", "\n", @@ -141,12 +145,15 @@ "from astropy.coordinates import SkyCoord, match_coordinates_sky\n", "from astropy.stats import sigma_clipped_stats\n", "\n", - "from photutils import CircularAperture, EPSFBuilder, find_peaks, CircularAnnulus\n", + "from photutils.aperture import CircularAperture\n", + "from photutils.psf import EPSFBuilder\n", + "from photutils.detection import find_peaks\n", + "from photutils.aperture import CircularAnnulus\n", "from photutils.detection import DAOStarFinder, IRAFStarFinder\n", "from photutils.psf import DAOGroup, IntegratedGaussianPRF, extract_stars, IterativelySubtractedPSFPhotometry\n", "from photutils.background import MMMBackground, MADStdBackgroundRMS\n", "from photutils.centroids import centroid_2dg\n", - "from photutils import aperture_photometry\n", + "from photutils.aperture import aperture_photometry\n", "\n", "from ipywidgets import interact\n", "\n", @@ -252,7 +259,7 @@ " else:\n", " d = d\n", "\n", - " wv = np.float(f[1:3])\n", + " wv = float(f[1:3])\n", "\n", " if wv > 24: \n", " ff_long.append(f)\n", @@ -1922,7 +1929,7 @@ " else:\n", " d = d\n", "\n", - " wv = np.float(f[1:3])\n", + " wv = float(f[1:3])\n", "\n", " if wv > 24:\n", " ff_long.append(f)\n", @@ -2757,7 +2764,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.11.6" } }, "nbformat": 4, diff --git a/notebooks/psf_photometry/requirements.txt b/notebooks/psf_photometry/requirements.txt index ef0875748..d138e3996 100644 --- a/notebooks/psf_photometry/requirements.txt +++ b/notebooks/psf_photometry/requirements.txt @@ -1,9 +1,9 @@ numpy>=1.22.4 pandas>=1.4.2 -jwst==1.5.2 +jwst>=1.5.2 astropy>=5.1 -photutils==1.4.0 +photutils>=1.4.0 ipywidgets>=7.7.0 -webbpsf>=1.0.0 +webbpsf>=1.2.1 matplotlib>=3.5.2 -stsynphot==1.1.0 +stsynphot>=1.1.0