Skip to content

Commit

Permalink
Update to latest version of packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Camilla Pacifici committed Nov 9, 2023
1 parent d3157dd commit 1053181
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
27 changes: 17 additions & 10 deletions notebooks/psf_photometry/NIRCam_PSF_Photometry_Example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br>\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.<br>\n",
"**Tools:** photutils.<br>\n",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -2757,7 +2764,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.11.6"
}
},
"nbformat": 4,
Expand Down
8 changes: 4 additions & 4 deletions notebooks/psf_photometry/requirements.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 1053181

Please sign in to comment.