Skip to content
This repository has been archived by the owner on Nov 5, 2020. It is now read-only.

Commit

Permalink
Merge pull request #106 from SaOgaz/release_prep
Browse files Browse the repository at this point in the history
Release prep
  • Loading branch information
SaOgaz committed Sep 17, 2018
2 parents 89b62f9 + a49ac77 commit 239cf44
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
4 changes: 3 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ Jupyter Notebook Tutorials
Below you will find Jupyter Notebook tutorials organized by usage/subject.
Each notebook is grouped by one library/sub-library of IRAF tasks, which
corresponds to the title of the notebook. Putting together these tutorial
notebooks is an ongoing task, `feedback <http://stak.userecho.com/>`_ and
notebooks is an ongoing task, and
`contributions <https://github.com/spacetelescope/stak>`_ are welcome.

If you are new to Python or Astropy, we recommend starting with the
introduction page to see some Python and Astropy information that will be used
extensively in these tutorials.

For questions or comments please see our `github <https://github.com/spacetelescope/stak-notebooks>`_ or you can visit the STScI `help page <https://hsthelp.stsci.edu>`_.

.. toctree::
:maxdepth: 2

Expand Down
36 changes: 18 additions & 18 deletions notebooks/Introduction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -79,25 +79,25 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Downloading URL https://mast.stsci.edu/api/v0/download/file?uri=mast:HST/product/iczgs3ygq/iczgs3ygq_flt.fits to ./mastDownload/HST/ICZGS3YGQ/iczgs3ygq_flt.fits ... [Done]\n"
"INFO: Found cached file ./mastDownload/HST/iczgs3ygq/iczgs3ygq_flt.fits with expected size 16534080. [astroquery.query]\n"
]
},
{
"data": {
"text/html": [
"<i>Table length=1</i>\n",
"<table id=\"table90363105176\" class=\"table-striped table-bordered table-condensed\">\n",
"<table id=\"table90371172504\" class=\"table-striped table-bordered table-condensed\">\n",
"<thead><tr><th>Local Path</th><th>Status</th><th>Message</th><th>URL</th></tr></thead>\n",
"<thead><tr><th>str47</th><th>str5</th><th>str87</th><th>str93</th></tr></thead>\n",
"<tr><td>./mastDownload/HST/ICZGS3YGQ/iczgs3ygq_flt.fits</td><td>ERROR</td><td>Downloaded filesize is 16531200,but should be 16534080, file may be partial or corrupt.</td><td>https://mast.stsci.edu/api/v0/download/file?uri=mast:HST/product/iczgs3ygq/iczgs3ygq_flt.fits</td></tr>\n",
"<thead><tr><th>str47</th><th>str8</th><th>object</th><th>object</th></tr></thead>\n",
"<tr><td>./mastDownload/HST/iczgs3ygq/iczgs3ygq_flt.fits</td><td>COMPLETE</td><td>None</td><td>None</td></tr>\n",
"</table>"
],
"text/plain": [
"<Table length=1>\n",
" Local Path ...\n",
" str47 ...\n",
"----------------------------------------------- ...\n",
"./mastDownload/HST/ICZGS3YGQ/iczgs3ygq_flt.fits ..."
" Local Path Status Message URL \n",
" str47 str8 object object\n",
"----------------------------------------------- -------- ------- ------\n",
"./mastDownload/HST/iczgs3ygq/iczgs3ygq_flt.fits COMPLETE None None"
]
},
"execution_count": 2,
Expand All @@ -114,7 +114,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -131,7 +131,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -148,7 +148,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -181,7 +181,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -209,7 +209,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 7,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -248,27 +248,27 @@
"\n",
"We can also use the `writeto` method to save the `HDUObject` to a new file. `writeto` will close the new file for you. \n",
"\n",
"`writeto` will also save to the original file if you provide it with the original filename, and use the `overwrite=True` parameter. In this case, the original file handling object will still need to be closed at some point in the session.\n",
"The `flush` method will also save to the original file. In this case, the original file handling object will still need to be closed at some point in the session.\n",
"\n",
"**No matter which mode you used to open a FITS file, you should still call the close method to close the open FITS file. Even if you use writeto to write to the original file, you still need to close the file handler you used to open the file.**"
"**No matter which mode you used to open a FITS file, you should still call the close method to close any open FITS file.**"
]
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"# Save using the writeto method to a new file, writeto will close the new file for you\n",
"HDUList_object.writeto(\"wfc3data_new.fits\")\n",
"\n",
"# Save using the writeto method, overwriting the original file\n",
"HDUList_object.writeto(\"./mastDownload/HST/ICZGS3YGQ/iczgs3ygq_flt.fits\", overwrite=True)"
"HDUList_object.flush()"
]
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
Expand Down
2 changes: 1 addition & 1 deletion notebooks/stsdas.toolbox.imgtools.mstools.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"source": [
"**Please review the** [Notes](#notes) **section above before running any examples in this notebook**\n",
"\n",
"The original `mscombine` IRAF task performed image combination of several `SCI` exetensions of HST data while allowing the user to reject specified `DQ` bits. Additionally, the user could choose to combine the stack using the average or the median. \n",
"The original `mscombine` IRAF task performed image combination of several `SCI` exetensions of HST data while allowing the user to reject specified `DQ` bits. Additionally, the user could choose to combine the stack using the average or the median. This was similar to the `imcombine` task. This example can be used to replicate either task. \n",
"\n",
"This `mscombine` alternative uses `numpy` masked arrays to avoid using flagged pixels in the `DQ` array. In this simple example, we average-combine several full-frame WFC3/UVIS images.\n",
"\n",
Expand Down

0 comments on commit 239cf44

Please sign in to comment.