Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

background notebook: updates requirements and screenshots #233

Merged
merged 2 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,15 @@
" Tophat2DKernel, convolve)\n",
"from astropy.modeling import fitting, models\n",
"from astropy.nddata.blocks import block_reduce\n",
"from astropy.stats import SigmaClip, gaussian_fwhm_to_sigma\n",
"from astropy.stats import SigmaClip\n",
"from astropy.table import Table\n",
"from IPython.display import Video\n",
"from IPython.display import Image\n",
"from jdaviz import Imviz\n",
"from photutils.background import (Background2D, BiweightLocationBackground,\n",
"from photutils.background import (Background2D,\n",
" BkgIDWInterpolator, BkgZoomInterpolator,\n",
" MedianBackground, SExtractorBackground)\n",
" MedianBackground)\n",
"from photutils.datasets import make_gaussian_sources_image\n",
"from photutils.segmentation import detect_sources, make_2dgaussian_kernel\n",
"from photutils.utils import ShepardIDWInterpolator as idw\n",
"from scipy import interpolate, ndimage, stats\n",
"from scipy.ndimage import median_filter"
]
},
Expand Down Expand Up @@ -231,7 +229,7 @@
"metadata": {},
"outputs": [],
"source": [
"imviz.app"
"imviz.load_data(noiseless_sky, data_label='noiseless_sky_background')"
]
},
{
Expand All @@ -240,7 +238,7 @@
"metadata": {},
"outputs": [],
"source": [
"imviz.load_data(noiseless_sky, data_label='noiseless_sky_background')"
"imviz.show()"
]
},
{
Expand Down Expand Up @@ -318,7 +316,7 @@
"metadata": {},
"outputs": [],
"source": [
"imviz2.app"
"imviz2.show()"
]
},
{
Expand Down Expand Up @@ -362,9 +360,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Video:\n",
"\n",
"Link two images in different windows by pixel and manipulate image."
"The two images are linked by pixel by default. Click on the zoom/pan tool to take a closer look at the images. The two images will zoom and pan syncronously."
]
},
{
Expand All @@ -373,8 +369,7 @@
"metadata": {},
"outputs": [],
"source": [
"# Video showing how to link two images in pixel space using plugin\n",
"Video(url='https://data.science.stsci.edu/redirect/JWST/jwst-data_analysis_tools/Background_Estimation/imviz_demo_1.mov', width=700, height=500)"
"Image('./imviz_2images.png', alt='Imviz with two viewers. Highlighted tool for linked zoom and pan.')"
]
},
{
Expand Down Expand Up @@ -938,7 +933,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Check for bias in due to the galaxies\n",
"## Check for bias due to the galaxies\n",
"\n",
"Since we are dealing with a simulation, where we know truth, we can evaluate the biases directly. (In the case of a real image, we can't do that; we'll suggest another test further down). \n",
"\n",
Expand Down Expand Up @@ -1092,7 +1087,7 @@
]
},
{
"cell_type": "raw",
"cell_type": "markdown",
"metadata": {},
"source": [
"Plot the residuals vs. source radius, separately for the masked, unmasked, and randomized source positions. The sizes of the markers are proportional to the fluxes of the sources."
Expand Down Expand Up @@ -1224,7 +1219,7 @@
"source": [
"plt.figure(figsize=(10, 6))\n",
"perfect = rms['perfect']\n",
"plt.plot(rms['widths'], rms['bkg1']/perfect, alpha=0.5,label='bkg1')\n",
"plt.plot(rms['widths'], rms['bkg1']/perfect, alpha=0.5, label='bkg1')\n",
"plt.plot(rms['widths'], rms['bkg2']/perfect, alpha=0.5, label='bkg2')\n",
"plt.plot(rms['widths'], rms['bkg3']/perfect, alpha=0.5, label='bkg3')\n",
"plt.plot(rms['widths'], rms['bkg4']/perfect, alpha=0.5, label='bkg4')\n",
Expand Down Expand Up @@ -1257,7 +1252,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
"version": "3.11.9"
}
},
"nbformat": 4,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
astropy >= 5.3.3
matplotlib >= 3.7.2
scipy >= 1.11.2
photutils >= 1.9.0
numpy >= 2.0.0
astropy >= 6.1.1
matplotlib >= 3.9.1
scipy >= 1.14.0
photutils >= 1.13.0
scikit-image >= 0.21.0
jdaviz >= 3.6.2
jdaviz >= 3.10.2
Loading