Skip to content

Commit

Permalink
update preamble of advanced ifu_optimal notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickOgle authored and haticekaratay committed Dec 4, 2023
1 parent a88b279 commit 6abe990
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions notebooks/ifu_optimal/ifu_optimal.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,22 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Advanced: NIRSpec IFU Optimal Point Source Extraction"
"# NIRSpec IFU Optimal Point Source Extraction"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Use case:** optimal spectral extraction; method by [Horne (1986)](https://ui.adsabs.harvard.edu/abs/1986PASP...98..609H/abstract).\n",
"\n",
"**Data:** JWST simulated NIRSpec IFU data; point sources.\n",
"\n",
"**Tools:** jwst, webbpsf, matplotlib, scipy, custom functions.\n",
"\n",
"**Cross-intrument:** any spectrograph. \n",
"\n",
"**Documentation:** This notebook is part of a STScI's larger [post-pipeline Data Analysis Tools Ecosystem](https://jwst-docs.stsci.edu/jwst-post-pipeline-data-analysis)."
]
},
{
Expand Down Expand Up @@ -99,7 +114,10 @@
" raise RuntimeError('Error retrieving file: ' + result[1])\n",
" \n",
"# Construct the local filepath \n",
"filename = os.path.join(os.path.abspath('.'), uri.rsplit('/', 1)[-1])"
"filename = os.path.join(os.path.abspath('.'), uri.rsplit('/', 1)[-1])\n",
"\n",
"#Optionally Replace MAST data with custom reprocessed data in the current directory\n",
"#filename=\"./jw01335-o008_t007_nirspec_g235h-f170lp_s3d.fits\""
]
},
{
Expand All @@ -109,10 +127,6 @@
"outputs": [],
"source": [
"# Open and inspect the file and WCS\n",
"# Replace MAST data with custom reprocessed data:\n",
"file_dir = \"/Users/pogle/Desktop/NIRSpec/ifu_optimal/q3d_sdss1652_ifu_rerun/extended_source/\"\n",
"#filename=\"jw01335-o008_t007_nirspec_g235h-f170lp_s3d.fits\"\n",
"#filename= file_dir + 'jw01335-o008_t007_nirspec_g235h-f170lp_s3d.fits'\n",
"with fits.open(filename, memmap=False) as hdulist:\n",
" sci = hdulist['SCI'].data\n",
" err = hdulist['ERR'].data\n",
Expand Down

0 comments on commit 6abe990

Please sign in to comment.