|
52 | 52 | "import glob\n", |
53 | 53 | "import os\n", |
54 | 54 | "import crds\n", |
| 55 | + "import shutil\n", |
| 56 | + "\n", |
55 | 57 | "import numpy as np\n", |
56 | 58 | "import matplotlib.pyplot as plt\n", |
57 | | - "from astropy.io import fits\n", |
| 59 | + "%matplotlib inline\n", |
| 60 | + "\n", |
| 61 | + "from astropy.io import ascii, fits\n", |
58 | 62 | "from astropy.visualization import ImageNormalize, ZScaleInterval\n", |
59 | 63 | "from astropy.convolution import convolve, Gaussian2DKernel\n", |
60 | 64 | "from astropy.stats import gaussian_fwhm_to_sigma\n", |
61 | 65 | "from photutils.segmentation import detect_sources, detect_threshold\n", |
62 | 66 | "from astroquery.mast import Observations\n", |
63 | | - "\n", |
64 | | - "%matplotlib inline" |
| 67 | + "from drizzlepac import tweakreg, astrodrizzle\n", |
| 68 | + "from drizzlepac.processInput import getMdriztabPars\n", |
| 69 | + "from IPython.display import Image, clear_output\n" |
65 | 70 | ] |
66 | 71 | }, |
67 | 72 | { |
|
152 | 157 | "outputs": [], |
153 | 158 | "source": [ |
154 | 159 | "# Filter for calibrated science products (in this case, FLC and DRC files from CALWF3)\n", |
155 | | - "\n", |
156 | 160 | "filtered_products = Observations.filter_products(\n", |
157 | 161 | " data_products,\n", |
158 | 162 | " productSubGroupDescription=[\"FLC\", \"DRC\",],\n", |
|
194 | 198 | "metadata": {}, |
195 | 199 | "outputs": [], |
196 | 200 | "source": [ |
197 | | - "import os\n", |
198 | | - "import shutil\n", |
199 | | - "from astropy.io import fits\n", |
200 | | - "\n", |
201 | 201 | "# Directory where files were downloaded\n", |
202 | 202 | "download_dir = \"mastDownload\"\n", |
203 | 203 | "\n", |
|
303 | 303 | "metadata": {}, |
304 | 304 | "outputs": [], |
305 | 305 | "source": [ |
306 | | - "\n", |
307 | 306 | "# CRDS configuration for HST reference files\n", |
308 | 307 | "os.environ['CRDS_PATH'] = '~/crds_cache'\n", |
309 | 308 | "os.environ['CRDS_SERVER_URL'] = 'https://hst-crds.stsci.edu'\n", |
|
758 | 757 | "\n", |
759 | 758 | "\n", |
760 | 759 | "\n", |
761 | | - "We provide a worked example using our 2 example images below; see the [DrizzlePac handbook](https://drizzlepac.readthedocs.io) and the [DrizzlePac notebooks](https://spacetelescope.github.io/hst_notebooks/notebooks/DrizzlePac/) for full parameter guidance.\n" |
| 760 | + "We provide a worked example using our 2 example images below; see the [DrizzlePac handbook](https://drizzlepac.readthedocs.io) and the [DrizzlePac notebooks](https://spacetelescope.github.io/hst_notebooks/notebooks/DrizzlePac/README.html) for full parameter guidance.\n" |
762 | 761 | ] |
763 | 762 | }, |
764 | 763 | { |
|
768 | 767 | "metadata": {}, |
769 | 768 | "outputs": [], |
770 | 769 | "source": [ |
771 | | - "from drizzlepac import tweakreg, astrodrizzle\n", |
772 | | - "from IPython.display import Image, clear_output\n", |
773 | 770 | "tweakreg.TweakReg(\n", |
774 | 771 | " eq_files,\n", |
775 | 772 | " imagefindcfg={\"threshold\": 200, \"conv_width\": 6},\n", |
|
781 | 778 | " ylimit=0.4,\n", |
782 | 779 | " searchrad=0.15,\n", |
783 | 780 | " tolerance=1,\n", |
784 | | - ")\n" |
| 781 | + ")" |
785 | 782 | ] |
786 | 783 | }, |
787 | 784 | { |
|
792 | 789 | "outputs": [], |
793 | 790 | "source": [ |
794 | 791 | "rootname = \"ifcpc6wfq\"\n", |
795 | | - "from astropy.io import ascii, fits\n", |
| 792 | + "\n", |
796 | 793 | "plt.figure(figsize=(7, 7), dpi=140)\n", |
797 | 794 | "chip1_data = fits.getdata(rootname + \"_flc_eq.fits\", \"SCI\", 2)\n", |
798 | 795 | "chip2_data = fits.getdata(rootname + \"_flc_eq.fits\", \"SCI\", 1)\n", |
|
846 | 843 | "metadata": {}, |
847 | 844 | "outputs": [], |
848 | 845 | "source": [ |
849 | | - "from drizzlepac.processInput import getMdriztabPars\n", |
850 | 846 | "def get_vals_from_mdriztab(\n", |
851 | 847 | " input_files,\n", |
852 | 848 | " kw_list=[\n", |
|
877 | 873 | "metadata": {}, |
878 | 874 | "outputs": [], |
879 | 875 | "source": [ |
880 | | - "from drizzlepac import astrodrizzle\n", |
881 | 876 | "output_name = 'ifcpc6030_equalized' # prefix for output DRZ files\n", |
882 | 877 | "astrodrizzle.AstroDrizzle(\n", |
883 | 878 | " eq_files,\n", |
|
950 | 945 | "## About this Notebook\n", |
951 | 946 | "\n", |
952 | 947 | "\n", |
953 | | - "**Updated On:** 2026-04-09\n", |
| 948 | + "**Updated On:** 2026-04-13\n", |
954 | 949 | "\n", |
955 | 950 | "**Authors:** \n", |
956 | 951 | "- Anne O'Connor, WFC3 Team \n", |
|
972 | 967 | "\n", |
973 | 968 | "* [Citing `drizzlepac`](https://zenodo.org/records/3743274)\n", |
974 | 969 | "\n", |
975 | | - "* [Citing `matplotlib`](https://matplotlib.org/stable/project/citing.html``)\n", |
| 970 | + "* [Citing `matplotlib`](https://matplotlib.org/stable/project/citing.html)\n", |
976 | 971 | "\n", |
977 | 972 | "* [Citing `numpy`](https://numpy.org/citing-numpy/)" |
978 | 973 | ] |
979 | | - }, |
980 | | - { |
981 | | - "cell_type": "markdown", |
982 | | - "id": "b838ab7a", |
983 | | - "metadata": {}, |
984 | | - "source": [] |
985 | 974 | } |
986 | 975 | ], |
987 | 976 | "metadata": { |
|
0 commit comments