Skip to content

Commit

Permalink
use plot options instead of viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
Camilla Pacifici committed Jul 16, 2024
1 parent 685ec9d commit 416207a
Showing 1 changed file with 28 additions and 21 deletions.
49 changes: 28 additions & 21 deletions notebooks/NIRISS/niriss_imaging/niriss-imaging-tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"from IPython.display import Image\n",
"\n",
"# For visualizing images\n",
"import jdaviz\n",
"from jdaviz import Imviz\n",
"\n",
"# Astropy routines for visualizing detected sources:\n",
Expand All @@ -88,7 +89,8 @@
"from jwst.associations.lib.rules_level3_base import DMS_Level3_Base\n",
"\n",
"# To confirm which version of the pipeline you're running:\n",
"print(f\"jwst pipeline version: {jwst.__version__}\")"
"print(f\"jwst pipeline version: {jwst.__version__}\")\n",
"print(f\"jdaviz version: {jdaviz.__version__}\")"
]
},
{
Expand Down Expand Up @@ -233,10 +235,11 @@
"metadata": {},
"outputs": [],
"source": [
"viewer_uncal.zoom_level = 'fit'\n",
"viewer_uncal.stretch = 'sqrt'\n",
"viewer_uncal.set_colormap('Viridis')\n",
"viewer_uncal.cuts = '99.5%'"
"plotopt = imviz_uncal.plugins['Plot Options']\n",
"plotopt.stretch_function = 'sqrt'\n",
"plotopt.image_colormap = 'Viridis'\n",
"plotopt.stretch_preset = '99.5%'\n",
"plotopt.zoom_radius = 1024"
]
},
{
Expand Down Expand Up @@ -413,10 +416,11 @@
"metadata": {},
"outputs": [],
"source": [
"viewer_rate.zoom_level = 'fit'\n",
"viewer_rate.stretch = 'sqrt'\n",
"viewer_rate.set_colormap('Viridis')\n",
"viewer_rate.cuts = '95%'"
"plotopt = imviz_rate.plugins['Plot Options']\n",
"plotopt.stretch_function = 'sqrt'\n",
"plotopt.image_colormap = 'Viridis'\n",
"plotopt.stretch_preset = '95%'\n",
"plotopt.zoom_radius = 1024"
]
},
{
Expand Down Expand Up @@ -581,10 +585,11 @@
"metadata": {},
"outputs": [],
"source": [
"viewer_cal.zoom_level = 'fit'\n",
"viewer_cal.stretch = 'sqrt'\n",
"viewer_cal.set_colormap('Viridis')\n",
"viewer_cal.cuts = '95%'"
"plotopt = imviz_cal.plugins['Plot Options']\n",
"plotopt.stretch_function = 'sqrt'\n",
"plotopt.image_colormap = 'Viridis'\n",
"plotopt.stretch_preset = '95%'\n",
"plotopt.zoom_radius = 1024"
]
},
{
Expand Down Expand Up @@ -781,10 +786,11 @@
"metadata": {},
"outputs": [],
"source": [
"viewer_i2d.zoom_level = 'fit'\n",
"viewer_i2d.stretch = 'sqrt'\n",
"viewer_i2d.set_colormap('Viridis')\n",
"viewer_i2d.cuts = '95%'"
"plotopt = imviz_i2d.plugins['Plot Options']\n",
"plotopt.stretch_function = 'sqrt'\n",
"plotopt.image_colormap = 'Viridis'\n",
"plotopt.stretch_preset = '95%'\n",
"plotopt.zoom_radius = 1024"
]
},
{
Expand Down Expand Up @@ -885,10 +891,11 @@
"outputs": [],
"source": [
"# Adjust settings for viewer\n",
"viewer_cat.zoom_level = 'fit'\n",
"viewer_cat.stretch = 'sqrt'\n",
"viewer_cat.set_colormap('Viridis')\n",
"viewer_cat.cuts = '95%'"
"plotopt = imviz_cat.plugins['Plot Options']\n",
"plotopt.stretch_function = 'sqrt'\n",
"plotopt.image_colormap = 'Viridis'\n",
"plotopt.stretch_preset = '95%'\n",
"plotopt.zoom_radius = 1024"
]
},
{
Expand Down

0 comments on commit 416207a

Please sign in to comment.