diff --git a/notebooks/ACS/acs_saturation_trails/acs_saturation_trails.ipynb b/notebooks/ACS/acs_saturation_trails/acs_saturation_trails.ipynb index dbed8b8f9..731f036fa 100644 --- a/notebooks/ACS/acs_saturation_trails/acs_saturation_trails.ipynb +++ b/notebooks/ACS/acs_saturation_trails/acs_saturation_trails.ipynb @@ -29,9 +29,10 @@ "\n", "However, accurate relative photometry can be obtained as long as a large enough aperture is selected to contain the spilled flux ([ACS ISR 2004-01](http://www.stsci.edu/files/live/sites/www/files/home/hst/instrumentation/acs/documentation/instrument-science-reports-isrs/_documents/isr0401.pdf)). While one could simply use a larger circular aperture, that may introduce error when working with a crowded field (where bright stars are often located).\n", "\n", - "Here we present a method to identify and perform photometry on saturated sources by defining a custom aperture that is a combination of a standard 0.5\" arcsecond circular aperture and the pixels affected by saturation trails. This method has been tested on ACS/WFC observations of 47 Tuc in the F660W band. The plot below shows the results of using this alternative method to recover flux.\n", + "Here we present a method to identify and perform photometry on saturated sources by defining a custom aperture that is a combination of a standard 0.5\" arcsecond circular aperture and the pixels affected by saturation trails. This method has been tested on ACS/WFC observations of 47 Tuc in the F606W band. The plot below shows the results of using this alternative method to recover flux.\n", + "\n", + "\"\"\n", "\n", - "![title](photometry_plot.png)\n", "\n", "### This tutorial will show you how to...\n", "\n", @@ -1193,7 +1194,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" + "version": "3.8.12" } }, "nbformat": 4, diff --git a/notebooks/ACS/acs_saturation_trails/p_module/plot.py b/notebooks/ACS/acs_saturation_trails/p_module/plot.py index c50038091..962395944 100644 --- a/notebooks/ACS/acs_saturation_trails/p_module/plot.py +++ b/notebooks/ACS/acs_saturation_trails/p_module/plot.py @@ -3,6 +3,7 @@ from astropy.visualization import (ZScaleInterval, LinearStretch, ImageNormalize) + def ds9_imitate(ax, image, extent=None): norm = ImageNormalize(image, interval=ZScaleInterval(), @@ -15,8 +16,8 @@ def triple_pam_plot(flt_file, pam_file, figtitle): fl_img = fits.getdata(flt_file, ext=1) pam_img = fits.getdata(pam_file) - fig = plt.figure(figsize=(20,4)) - fig.suptitle(figtitle,fontsize=20) + fig = plt.figure(figsize=(20, 4)) + fig.suptitle(figtitle, fontsize=20) ax = fig.add_subplot(1, 3, 1) ds9_imitate(ax, fl_img) @@ -36,13 +37,12 @@ def triple_pam_plot(flt_file, pam_file, figtitle): def calib_compare_plot(raw_image, cal_image): - fig = plt.figure(figsize=(14,14)) + fig = plt.figure(figsize=(14, 14)) - ax = fig.add_subplot(2,1,1) + ax = fig.add_subplot(2, 1, 1) ds9_imitate(ax, raw_image) ax.set_title('Raw') - ax2 = fig.add_subplot(2,1,2) + ax2 = fig.add_subplot(2, 1, 2) ds9_imitate(ax2, cal_image) ax2.set_title('Flat-Fielded') - diff --git a/notebooks/ACS/acs_saturation_trails/photometry_recovery.png b/notebooks/ACS/acs_saturation_trails/photometry_recovery.png new file mode 100644 index 000000000..26b92ef79 Binary files /dev/null and b/notebooks/ACS/acs_saturation_trails/photometry_recovery.png differ