Skip to content

Commit

Permalink
WIP: POC notebook for aper phot [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
pllim committed Oct 12, 2021
1 parent 925a3cb commit ae43e16
Showing 1 changed file with 107 additions and 0 deletions.
107 changes: 107 additions & 0 deletions notebooks/concepts/imviz_simple_aper_phot.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "65797402-e16b-4a78-8acc-02dd90ca5e7d",
"metadata": {},
"source": [
"# Imviz simple aperture photometry\n",
"\n",
"This is a proof-of-concept showing how to use Imviz to perform simple aperture photometry using hand-drawn aperture on a single object."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3ad56d9d-a52f-446b-9d3f-b823d930cb2e",
"metadata": {},
"outputs": [],
"source": [
"from astropy.utils.data import download_file\n",
"\n",
"from jdaviz import Imviz"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "66ca7067-6f89-446c-b1ca-53c46827af1c",
"metadata": {},
"outputs": [],
"source": [
"jwf277w = download_file('https://stsci.box.com/shared/static/iao1zxtigyrhq7k3wtu5nchrxzlhj9kv.fits', cache=True)\n",
"jwf444w = download_file('https://stsci.box.com/shared/static/rey83o5wq6g7qd7xym6r1jq9wlsxaqnt.fits', cache=True)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "610b86ac-d6da-43df-8855-3963391dab4d",
"metadata": {},
"outputs": [],
"source": [
"imviz = Imviz()\n",
"\n",
"imviz.load_data(jwf277w, data_label='JWST_F277W')\n",
"imviz.load_data(jwf444w, data_label='JWST_F444W')\n",
"\n",
"imviz.app"
]
},
{
"cell_type": "markdown",
"id": "0e973760-7843-49ce-987b-1b84d5d6eb0a",
"metadata": {},
"source": [
"Now, we would use zoom in on a star (maybe using API), draw an aperture by hand (maybe can also hack with API?), and use a new plugin that does not exist yet..."
]
},
{
"cell_type": "markdown",
"id": "9abeb637-dac2-4787-8087-3be5f54a5dd0",
"metadata": {},
"source": [
"Once photometry is done, we would do the following to extract the data from Imviz back to notebook for further processing, maybe..."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7c3e6a27-bdf8-4881-8933-aa8c29e78163",
"metadata": {},
"outputs": [],
"source": [
"# imviz.get_last_photometry()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "073a227d-802f-4af1-b580-4b4b34cb8806",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

0 comments on commit ae43e16

Please sign in to comment.