{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# More Examples " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Any user of Webbpsf is invited to submit snippets of example code for sharing here.\n", "\n", "The following examples all assume you have started with" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Populating the interactive namespace from numpy and matplotlib\n" ] } ], "source": [ "import webbpsf\n", "import numpy as np\n", "# if running in a Jupyter notebook also do:\n", "%pylab inline " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Examples are organized by topic:\n", "\n", "* Typical Usage Cases\n", "* Spectroscopic PSFs\n", "* Coronagraphy and complications\n", "* Additional examples of SI modes" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Notebook Interface" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "WebbPSF includes a Jupyter notebook widget interface which facilitates simple calculations." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "76b8201f890e444b94d9028295c24f00", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HTML(value='
\\n \\n Notebook In…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "ae86c3d27f114df7aca470fae9a79c11",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Dropdown(description='Filter:', index=10, options=('F070W', 'F090W', 'F115W', 'F140M', 'F150W2', 'F150W', 'F16…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "39d968634877448e943995b3239e6d2f",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HTML(value=' \\n \\n Monochroma…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "401a4d8da8004fb9b5e799f756d3db8e",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(Checkbox(value=False, description='Monochromatic calculation?'), HTML(value='')"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9c6889d570c34e8287b12961a7f7fbf2",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Dropdown(description='Image Mask:', options=('None', 'MASKLWB', 'MASKSWB', 'MASK210R', 'MASK335R', 'MASK430R')…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "57b706ab85de4b24baf2b1a996c812c3",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Dropdown(description='Pupil Mask: ', options=('None', 'CIRCLYOT', 'WEDGELYOT', 'MASKRND', 'MASKSWB', 'MASKLWB'…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "8f2e9eca4cfe4ba5a6e3c177b82800ed",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HTML(value='
')"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "4c010d261d604e3093f4e8508f2e7aba",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Dropdown(description='Source spectrum', index=43, options=('Power law F_nu ~ nu^(3)', 'Power law F_nu ~ nu^(2)…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "c0cfdda9b2d54ad49188f31ca3996ed9",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HTML(value='
')"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "503898abe77d4016a78edeae26cf4d03",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HTML(value='
')"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "11d154d4f0c64babbd766c4bdb384009",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HBox(children=(Button(description='Calculate PSF', style=ButtonStyle()), Button(description='Display Optical S…"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "0314de5340c842919dd044c8b223df45",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"HTML(value='