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

AstroDrizzle #210

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
880fd1b
Create example_notebook.ipynb
milchada May 31, 2022
597a1de
Create example_notebook.ipynb
milchada May 31, 2022
c9748b2
Mila notebooks
Jun 3, 2022
b7aef68
init jwst notebook
milchada Jun 3, 2022
4799e7e
init transients notebook
milchada Jun 3, 2022
2364aa1
Update previewing_transient_candidates.ipynb
milchada Jun 3, 2022
6ec241e
Create previewing_transient_candidates.ipynb
milchada Jun 3, 2022
69e73c6
Update identifying_transient_candidates.ipynb
milchada Jun 3, 2022
3a22f27
Intro
milchada Jun 8, 2022
095e3d9
Update identifying_transient_candidates.ipynb
milchada Jun 8, 2022
32b3c55
Update identifying_transient_candidates.ipynb
milchada Jun 8, 2022
6d8dc50
Update identifying_transient_candidates.ipynb
milchada Jun 8, 2022
d0f4800
Update identifying_transient_candidates.ipynb
milchada Jun 8, 2022
49bafba
Update identifying_transient_candidates.ipynb
milchada Jun 8, 2022
0662353
Update identifying_transient_candidates.ipynb
milchada Jun 14, 2022
8377d78
notebook edits
Jun 22, 2022
0eea92a
Identifying transients - code added
Jul 7, 2022
a763de9
Show zMAST images
Jul 7, 2022
ebaf152
pulled HST observations
Jul 7, 2022
fab1a67
Previewing JWST notebook update
Jul 24, 2022
c4aaec9
Previewing JWST notebook update
Jul 24, 2022
40c8439
draft of the whole process
Jul 28, 2022
eb09ba8
draft of the whole process
Jul 28, 2022
79071ea
crds config
Jul 29, 2022
475d3e7
Drizzlepac notebook
Aug 1, 2022
333c607
new branch for drizzle notebook
Aug 6, 2022
372cc2e
cleanup #1
Aug 29, 2022
2c0b308
cleanup 2
Aug 29, 2022
3eafc2c
Rename previewing_transient_candidates.ipynb to previewing_jwst_candi…
milchada Sep 21, 2022
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
._*.ipynb
*.fits
*.swp
*.txt
*.jpg
src
index.html
env
.DS_Store
**/.DS_Store
**/.DS_Store
1 change: 1 addition & 0 deletions notebooks/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Files generated by convert.py
# -----------------------------
exec_*.ipynb
$HOME
*.html
*.fits
*.coo
Expand Down
2 changes: 1 addition & 1 deletion notebooks/DrizzlePac/Initialization/Initialization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.6"
"version": "3.9.5"
}
},
"nbformat": 4,
Expand Down
9 changes: 1 addition & 8 deletions notebooks/DrizzlePac/drizzle_wfpc2/drizzle_wfpc2.ipynb
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Drizzling WFPC2 Images to use a Single Zeropoint"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -444,7 +437,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.6"
"version": "3.9.5"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.6"
"version": "3.9.5"
}
},
"nbformat": 4,
Expand Down
337 changes: 337 additions & 0 deletions notebooks/MAST/HSC/HSC_TAP/example_notebook.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,337 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"<a id=\"top\"></a>\n",
"# Tutorial Title"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "skip"
}
},
"source": [
"***"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Learning Goals\n",
"Write three to five learning goals. A learning goal should describe what a reader should know or be able to do by the end of the tutorial that they didn't know or couldn't do before.\n",
"\n",
"```\n",
"By the end of this tutorial, you will:\n",
"\n",
"- Understand how to use aperture photometry to turn a series of two-dimensional\n",
" images into a one-dimensional time series.\n",
"- Be able to determine the most useful aperture for photometry on a *Kepler/K2*\n",
" target.\n",
"- Create your own light curve for a single quarter/campaign of *Kepler/K2* data.\n",
"\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## Introduction\n",
"Write a short introduction explaining the purpose of the tutorial. Define any terms or common acronyms that your audience may not know. If you're using some kind of domain-specific astronomical symbol or unusual mathematical concept, make sure you define it (for example, in its mathematical form) and link to any definitions (from literature, Wikipedia, etc.).\n",
"\n",
"If there are background materials or resources that may be useful to the reader to provide additional context, you may link to it here. If your tutorial is a continuation from another tutorial, or there are other tutorials that would be useful for the reader to read before or after your tutorial, mention that here as well."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## Imports\n",
"Describe the libraries we're using here. If there's something unusual, explain what the library is, and why we need it.\n",
"- *numpy* to handle array functions\n",
"- *astropy.io fits* for accessing FITS files\n",
"- *astropy.table Table* for creating tidy tables of the data\n",
"- *matplotlib.pyplot* for plotting data"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import numpy as np\n",
"from astropy.io import fits\n",
"from astropy.table import Table\n",
"import matplotlib.pyplot as plt\n",
"from astroquery.mast import Mast\n",
"from astroquery.mast import Observations"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"***"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Main Content\n",
"\n",
"The main content of your tutorial should be subdivided into numbered sections with useful, descriptive headings that make sense based on the content. Break sections up with standard Markdown syntax headings:\n",
"\n",
"```\n",
"## Section 1\n",
"\n",
"Intro to Section 1\n",
"\n",
"### Subsection 1a\n",
"\n",
"More detailed info about Section 1\n",
"\n",
"## Section 2\n",
"\n",
"A complete thought that's as important as Section 1 but doesn't need subsections.\n",
"\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"### Loading Data\n",
"\n",
"Loading data and file information should appear within your main content, at the same time the data is going to be used, if possible. These elements of your tutorial can be their own sections within the main content, but avoid generic or vague headings like “Loading Data” and instead use descriptive headings pertinent to the content of the tutorial and the actual data being downloaded or files being used.\n",
"\n",
"If the user needs to download data to run the tutorial properly, where possible, use [Astroquery](https://astroquery.readthedocs.io/en/latest/) (or similar) to retrieve files. If this is not possible, see the [data guide](https://github.com/spacetelescope/style-guides/blob/master/guides/where-to-put-your-data.md) for other options."
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"For example, if we wanted to query for data from MAST for Kepler we might do something like:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"slideshow": {
"slide_type": "fragment"
}
},
"outputs": [],
"source": [
"keplerObs = Observations.query_criteria(target_name='kplr008957091', obs_collection='Kepler')\n",
"keplerProds = Observations.get_product_list(keplerObs[0])\n",
"yourProd = Observations.filter_products(keplerProds,extension='kplr008957091-2012277125453_lpd-targ.fits.gz',\n",
" mrp_only=False)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### File Information\n",
"\n",
"Explain pertinent details about the file you've just downloaded. For example, if working with Kepler light curves, explain what's in the different file extensions:\n",
"\n",
"```\n",
"- No. 0 (Primary): This HDU contains metadata related to the entire file.\n",
"- No. 1 (Light curve): This HDU contains a binary table that holds data like\n",
" flux measurements and times. We will extract information from here when we\n",
" define the parameters for the light curve plot.\n",
"- No. 2 (Aperture): This HDU contains the image extension with data collected\n",
" from the aperture. We will also use this to display a bitmask plot that\n",
" visually represents the optimal aperture used to create the SAP_FLUX column in\n",
" HDU1.\n",
"\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Where possible (if the code supports it), use code examples that visually display the data in the tutorial. For example, if you are showing an object such as a Table, display a preview of the table:"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<i>Table masked=True length=5</i>\n",
"<table id=\"table140630505372920\" class=\"table-striped table-bordered table-condensed\">\n",
"<thead><tr><th>obsID</th><th>obs_collection</th><th>dataproduct_type</th><th>obs_id</th><th>description</th><th>type</th><th>dataURI</th><th>productType</th><th>productGroupDescription</th><th>productSubGroupDescription</th><th>productDocumentationURL</th><th>project</th><th>prvversion</th><th>proposal_id</th><th>productFilename</th><th>size</th><th>parent_obsid</th></tr></thead>\n",
"<thead><tr><th>str10</th><th>str6</th><th>str10</th><th>str36</th><th>str59</th><th>str1</th><th>str110</th><th>str7</th><th>str28</th><th>str1</th><th>str1</th><th>str6</th><th>str1</th><th>str7</th><th>str44</th><th>int64</th><th>str10</th></tr></thead>\n",
"<tr><td>9000159893</td><td>Kepler</td><td>timeseries</td><td>kplr008957091_lc_Q000000000011111111</td><td>Preview-Full</td><td>C</td><td>mast:Kepler/url/missions/kepler/previews/0089/008957091/kplr008957091-2013098041711_llc_bw_large.png</td><td>PREVIEW</td><td>--</td><td>--</td><td>--</td><td>Kepler</td><td>--</td><td>GO30032</td><td>kplr008957091-2013098041711_llc_bw_large.png</td><td>29653</td><td>9000159893</td></tr>\n",
"<tr><td>9000159893</td><td>Kepler</td><td>timeseries</td><td>kplr008957091_lc_Q000000000011111111</td><td>Lightcurve Long Cadence (CLC) - Q10</td><td>C</td><td>mast:Kepler/url/missions/kepler/lightcurves/0089/008957091/kplr008957091-2011271113734_llc.fits</td><td>SCIENCE</td><td>--</td><td>--</td><td>--</td><td>Kepler</td><td>--</td><td>GO30032</td><td>kplr008957091-2011271113734_llc.fits</td><td>486720</td><td>9000159893</td></tr>\n",
"<tr><td>9000159893</td><td>Kepler</td><td>timeseries</td><td>kplr008957091_lc_Q000000000011111111</td><td>Lightcurve Long Cadence (CLC) - Q11</td><td>C</td><td>mast:Kepler/url/missions/kepler/lightcurves/0089/008957091/kplr008957091-2012004120508_llc.fits</td><td>SCIENCE</td><td>--</td><td>--</td><td>--</td><td>Kepler</td><td>--</td><td>GO30032</td><td>kplr008957091-2012004120508_llc.fits</td><td>506880</td><td>9000159893</td></tr>\n",
"<tr><td>9000159893</td><td>Kepler</td><td>timeseries</td><td>kplr008957091_lc_Q000000000011111111</td><td>Lightcurve Long Cadence (CLC) - Q12</td><td>C</td><td>mast:Kepler/url/missions/kepler/lightcurves/0089/008957091/kplr008957091-2012088054726_llc.fits</td><td>SCIENCE</td><td>--</td><td>--</td><td>--</td><td>Kepler</td><td>--</td><td>GO30032</td><td>kplr008957091-2012088054726_llc.fits</td><td>434880</td><td>9000159893</td></tr>\n",
"<tr><td>9000159893</td><td>Kepler</td><td>timeseries</td><td>kplr008957091_lc_Q000000000011111111</td><td>Lightcurve Long Cadence (CLC) - Q13</td><td>C</td><td>mast:Kepler/url/missions/kepler/lightcurves/0089/008957091/kplr008957091-2012179063303_llc.fits</td><td>SCIENCE</td><td>--</td><td>--</td><td>--</td><td>Kepler</td><td>--</td><td>GO30032</td><td>kplr008957091-2012179063303_llc.fits</td><td>472320</td><td>9000159893</td></tr>\n",
"</table>"
],
"text/plain": [
"<Table masked=True length=5>\n",
" obsID obs_collection dataproduct_type ... size parent_obsid\n",
" str10 str6 str10 ... int64 str10 \n",
"---------- -------------- ---------------- ... ------ ------------\n",
"9000159893 Kepler timeseries ... 29653 9000159893\n",
"9000159893 Kepler timeseries ... 486720 9000159893\n",
"9000159893 Kepler timeseries ... 506880 9000159893\n",
"9000159893 Kepler timeseries ... 434880 9000159893\n",
"9000159893 Kepler timeseries ... 472320 9000159893"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"yourProd[0:5]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Download the products\n",
"Observations.download_products(yourProd, mrp_only=False, cache=False)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercises\n",
"Exercises are optional, but encouraged. Exercises can be woven into the main content of your tutorial, or appear in their own section toward the end of the tutorial. Final exercises can be more challenging, similar to homework problems. They can be minimal or take as long as 30 minutes to an hour to complete. If you do have one or more exercises in your tutorial, be sure to leave a blank code cell underneath each to show the reader that they're meant to try out their new skill right there. You may also want to include a \"solutions\" notebook next to your main notebook for the reader to check their work after they have finished their attempt."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Additional Resources\n",
"\n",
"This section is optional. Try to weave resource links into the main content of your tutorial so that they are falling in line with the context of your writing. For resources that do not fit cleanly into your narrative, you may include an additional resources section at the end of your tutorial. Usually a list of links using Markdown bullet list plus link format is appropriate:\n",
"\n",
"- [MAST API](https://mast.stsci.edu/api/v0/index.html)\n",
"- [Kepler Archive Page (MAST)](https://archive.stsci.edu/kepler/)\n",
"- [Kepler Archive Manual](https://archive.stsci.edu/kepler/manuals/archive_manual.pdf)\n",
"- [Exo.MAST website](https://exo.mast.stsci.edu/)"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "slide"
}
},
"source": [
"## About this Notebook\n",
"Let the world know who the author of this great tutorial is! If possible and appropriate, include a contact email address for users who might need support (for example, `[email protected]`). You can also optionally include keywords, your funding source, or a last update date in this section.\n",
"\n",
"**Author:** Jessie Blogs, Archive Scientist. \n",
"**Updated On:** YYYY-MM-DD"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Citations\n",
"Provide your reader with guidelines on how to cite open source software and other resources in their own published work.\n",
"\n",
"```\n",
"If you use `astropy` or `lightkurve` for published research, please cite the\n",
"authors. Follow these links for more information about citing `astropy` and\n",
"`lightkurve`:\n",
"\n",
"* [Citing `astropy`](https://www.astropy.org/acknowledging.html)\n",
"* [Citing `lightkurve`](http://docs.lightkurve.org/about/citing.html)\n",
"\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"***"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"[Top of Page](#top)\n",
"<img style=\"float: right;\" src=\"https://raw.githubusercontent.com/spacetelescope/notebooks/master/assets/stsci_pri_combo_mark_horizonal_white_bkgd.png\" alt=\"Space Telescope Logo\" width=\"200px\"/> "
]
}
],
"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.6.8"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading