From 7f88e387a7e5288eca3614a96a379d9e808fc74f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 17:29:34 +0000 Subject: [PATCH] [BOT] Left PEP8 feedback on PR 140's notebooks Files: --- .../ero_nirspec_ifu_02729_demo.ipynb | 567 +++++++++++++++++- .../ero_nirspec_ifu_02732_demo.ipynb | 513 +++++++++++++++- ...o_nirspec_ifu_02732_demo_pointsource.ipynb | 498 ++++++++++++++- 3 files changed, 1522 insertions(+), 56 deletions(-) diff --git a/notebooks/NIRSpec_IFU_spectral_extraction/ero_nirspec_ifu_02729_demo.ipynb b/notebooks/NIRSpec_IFU_spectral_extraction/ero_nirspec_ifu_02729_demo.ipynb index e4cfcac37..bacac68f4 100644 --- a/notebooks/NIRSpec_IFU_spectral_extraction/ero_nirspec_ifu_02729_demo.ipynb +++ b/notebooks/NIRSpec_IFU_spectral_extraction/ero_nirspec_ifu_02729_demo.ipynb @@ -61,12 +61,99 @@ "
Reviewer note: Begin PEP8 check cells (delete below when finished)
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# disable all imported packages' loggers\n", + "import logging\n", + "logging.root.manager.loggerDict = {}" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "cf5b543b", "metadata": {}, "outputs": [], + "source": [ + "# enable PEP8 checker for this notebook\n", + "%load_ext pycodestyle_magic\n", + "%flake8_on --ignore E261,E501,W291,W293\n", + "\n", + "# only allow the checker to throw warnings when there's a violation\n", + "logging.getLogger('flake8').setLevel('ERROR')\n", + "logging.getLogger('stpipe').setLevel('ERROR')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Reviewer note: Begin PEP8 check cells (delete above when finished)
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cf5b543b", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:33 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 3:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 8:47: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 9:47: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 10:47: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 11:1: F401 'jwst.extract_1d.Extract1dStep' imported but unused\n", + "2023-09-07 13:29:33 - INFO - 11:47: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 16:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 18:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 19:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 20:35: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 22:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 24:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 25:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 26:1: F401 'asdf' imported but unused\n", + "2023-09-07 13:29:33 - INFO - 26:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 27:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 28:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 30:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 32:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 33:1: F401 'astropy.wcs' imported but unused\n", + "2023-09-07 13:29:33 - INFO - 33:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 34:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 35:1: F401 'astropy.visualization.SqrtStretch' imported but unused\n", + "2023-09-07 13:29:33 - INFO - 35:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 36:1: F401 'astropy.stats.sigma_clipped_stats' imported but unused\n", + "2023-09-07 13:29:33 - INFO - 36:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 37:1: F401 'astroquery' imported but unused\n", + "2023-09-07 13:29:33 - INFO - 37:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 38:1: F401 'astroquery.mast.Mast' imported but unused\n", + "2023-09-07 13:29:33 - INFO - 38:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 39:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 41:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 43:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 44:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 45:1: F401 'matplotlib.patches.Circle' imported but unused\n", + "2023-09-07 13:29:33 - INFO - 45:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 46:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 47:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:33 - INFO - 52:1: E265 block comment should start with '# '\n" + ] + } + ], "source": [ "#Import Library\n", "\n", @@ -143,7 +230,19 @@ "execution_count": null, "id": "7bb4f2b5", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:33 - INFO - 28:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 40:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 54:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 56:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 66:52: E231 missing whitespace after ','\n" + ] + } + ], "source": [ "def show_image(data_2d, vmin, vmax, xsize=15, ysize=15, title=None, zoom_in=None, aspect=1, scale='log', units='DN/s', cmap='jet'):\n", " \"\"\"\n", @@ -218,7 +317,95 @@ "execution_count": null, "id": "83b1838f", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:33 - INFO - 1:113: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 1:115: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 1:120: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 1:171: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 1:173: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 34:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 36:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 37:109: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 38:142: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 40:20: E225 missing whitespace around operator\n", + "2023-09-07 13:29:33 - INFO - 43:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 47:13: E225 missing whitespace around operator\n", + "2023-09-07 13:29:33 - INFO - 47:28: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 49:35: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 50:50: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 52:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 56:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 59:9: E303 too many blank lines (2)\n", + "2023-09-07 13:29:33 - INFO - 59:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 60:28: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 61:9: F811 redefinition of unused 'wcs' from line 33\n", + "2023-09-07 13:29:33 - INFO - 61:34: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 62:28: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 63:9: F841 local variable 'cdelt1' is assigned to but never used\n", + "2023-09-07 13:29:33 - INFO - 63:48: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 64:9: F841 local variable 'cdelt2' is assigned to but never used\n", + "2023-09-07 13:29:33 - INFO - 64:48: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 65:42: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 66:42: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 68:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 73:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 75:81: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 75:97: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 78:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 100:21: E117 over-indented\n", + "2023-09-07 13:29:33 - INFO - 103:9: E303 too many blank lines (2)\n", + "2023-09-07 13:29:33 - INFO - 103:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 106:31: E225 missing whitespace around operator\n", + "2023-09-07 13:29:33 - INFO - 106:50: E225 missing whitespace around operator\n", + "2023-09-07 13:29:33 - INFO - 108:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 110:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 119:59: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 120:96: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 121:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 123:84: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 124:27: E225 missing whitespace around operator\n", + "2023-09-07 13:29:33 - INFO - 124:109: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 125:28: E225 missing whitespace around operator\n", + "2023-09-07 13:29:33 - INFO - 125:99: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 125:111: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 128:67: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 128:69: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 132:46: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 134:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 135:116: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 135:193: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 140:17: E303 too many blank lines (2)\n", + "2023-09-07 13:29:33 - INFO - 140:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 142:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 143:40: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 145:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 148:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 149:70: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 154:52: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 155:64: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 160:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 171:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 173:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 174:148: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 175:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 177:89: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 178:32: E225 missing whitespace around operator\n", + "2023-09-07 13:29:33 - INFO - 178:89: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 179:94: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 179:121: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 182:66: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 182:68: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 188:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 204:20: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:33 - INFO - 205:32: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 206:1: E303 too many blank lines (3)\n" + ] + } + ], "source": [ "def show_ifu_cubeslices(s3d_file_list, wavelength_slices=[], spaxel_locs=[], y_scale=None, cmap='jet', vmin_vmax = [[[0,15e1]]], save_figure=False, title=None, title_font = 30):\n", " \"\"\"\n", @@ -442,7 +629,22 @@ "execution_count": null, "id": "fbc514d3", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:33 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 2:1: E305 expected 2 blank lines after class or function definition, found 3\n", + "2023-09-07 13:29:33 - INFO - 4:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 5:12: E712 comparison to False should be 'if cond is False:' or 'if not cond:'\n", + "2023-09-07 13:29:33 - INFO - 8:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 9:14: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:33 - INFO - 10:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 11:5: E265 block comment should start with '# '\n" + ] + } + ], "source": [ "#To rerun the notebook and all the pipeline steps set runflag=True\n", "runflag = True \n", @@ -500,7 +702,34 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:33 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 3:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 14:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 16:23: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 16:25: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 17:24: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 17:26: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 18:20: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 18:22: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 20:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 22:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 24:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 25:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 26:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 30:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 35:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 36:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 41:16: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:33 - INFO - 42:125: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 44:124: E262 inline comment should start with '# '\n" + ] + } + ], "source": [ "#Download data from MAST \n", "\n", @@ -577,7 +806,31 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:33 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 3:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 7:39: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 8:36: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 10:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 11:31: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 11:48: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 11:61: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 11:71: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 15:164: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 17:69: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 17:82: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 17:92: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 19:125: E128 continuation line under-indented for visual indent\n", + "2023-09-07 13:29:33 - INFO - 20:125: E128 continuation line under-indented for visual indent\n", + "2023-09-07 13:29:33 - INFO - 21:125: E128 continuation line under-indented for visual indent\n", + "2023-09-07 13:29:33 - INFO - 22:1: E303 too many blank lines (3)\n" + ] + } + ], "source": [ "#Stage 1 slope products -- level 2a images\n", "\n", @@ -629,7 +882,60 @@ "execution_count": null, "id": "4b37ffa6", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:33 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 3:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 9:18: E225 missing whitespace around operator\n", + "2023-09-07 13:29:33 - INFO - 11:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 12:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 12:28: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 12:34: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 13:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 13:28: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 15:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 15:28: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 15:32: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 15:36: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 15:40: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 15:46: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 16:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 16:28: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 16:32: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 16:36: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 16:40: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 18:21: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 18:26: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 18:29: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 18:34: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 18:37: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 18:46: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 19:21: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 19:26: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 19:29: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 19:34: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 19:37: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 21:21: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 21:32: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 21:43: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 21:50: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 22:21: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 22:32: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 22:43: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 24:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 25:73: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 26:50: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 26:68: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 26:94: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 27:28: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 27:30: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 27:44: E231 missing whitespace after ','\n" + ] + } + ], "source": [ "#Stage 2 Products -- Calibrated 3-D data cubes for each GRATING/FILTER combination\n", "\n", @@ -674,7 +980,40 @@ "execution_count": null, "id": "94514cfd", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:33 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 5:18: E225 missing whitespace around operator\n", + "2023-09-07 13:29:33 - INFO - 7:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 8:19: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 8:23: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 8:29: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 9:19: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 9:23: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 9:27: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 9:31: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 9:35: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 9:41: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 10:16: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 10:21: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 10:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 10:29: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 10:32: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 10:41: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 11:16: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 11:27: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 11:38: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 11:45: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 13:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 14:69: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 16:28: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 16:30: E251 unexpected spaces around keyword / parameter equals\n" + ] + } + ], "source": [ "#Stage 3 Products -- Combined Calibrated 3-D data cubes for each GRATING/FILTER combination\n", "\n", @@ -710,7 +1049,27 @@ "execution_count": null, "id": "de1b09ff", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:33 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 3:29: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 11:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 15:27: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 15:52: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 16:94: E128 continuation line under-indented for visual indent\n", + "2023-09-07 13:29:33 - INFO - 17:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 19:78: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 22:14: W605 invalid escape sequence '\\l'\n", + "2023-09-07 13:29:33 - INFO - 22:23: W605 invalid escape sequence '\\m'\n", + "2023-09-07 13:29:33 - INFO - 22:40: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 23:51: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 24:94: E251 unexpected spaces around keyword / parameter equals\n" + ] + } + ], "source": [ "#Stage 3 Products -- Combined Extracted 1-D Spectrum \n", "\n", @@ -780,7 +1139,18 @@ "execution_count": null, "id": "80d54809", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:33 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 4:119: E203 whitespace before ','\n", + "2023-09-07 13:29:33 - INFO - 5:1: E128 continuation line under-indented for visual indent\n", + "2023-09-07 13:29:33 - INFO - 5:1: E231 missing whitespace after ','\n" + ] + } + ], "source": [ "#Just a check to see what verison of the pipeline and what pmap was used\n", "x1d3_mast = fits.open(glob.glob(mast_products_dir+'*_x1d.fits')[0])\n", @@ -805,7 +1175,15 @@ "execution_count": null, "id": "d3a9e22a", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:33 - INFO - 1:1: E265 block comment should start with '# '\n" + ] + } + ], "source": [ "#Directory for rerun of stage 1 to avoid overwritting MAST products\n", "output_dir_rerun = output_dir+'rerun/' \n", @@ -829,7 +1207,21 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:33 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 3:12: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:33 - INFO - 7:65: E225 missing whitespace around operator\n", + "2023-09-07 13:29:33 - INFO - 10:53: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 10:55: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 11:51: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 11:53: E251 unexpected spaces around keyword / parameter equals\n" + ] + } + ], "source": [ "#Stage 1 Processing \n", "\n", @@ -851,7 +1243,31 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:33 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 3:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 7:39: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 8:36: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 10:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 11:31: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 11:48: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 11:61: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 11:71: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 15:164: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 17:69: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 17:82: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 17:92: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 19:125: E128 continuation line under-indented for visual indent\n", + "2023-09-07 13:29:33 - INFO - 20:125: E128 continuation line under-indented for visual indent\n", + "2023-09-07 13:29:33 - INFO - 21:125: E128 continuation line under-indented for visual indent\n", + "2023-09-07 13:29:33 - INFO - 22:1: E303 too many blank lines (3)\n" + ] + } + ], "source": [ "#Stage 1 slope products -- level 2a images\n", "\n", @@ -914,7 +1330,22 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:33 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 3:12: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:33 - INFO - 5:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 8:65: E225 missing whitespace around operator\n", + "2023-09-07 13:29:33 - INFO - 11:49: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 11:51: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 12:47: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 12:49: E251 unexpected spaces around keyword / parameter equals\n" + ] + } + ], "source": [ "#Stage 2 Processing \n", "\n", @@ -937,7 +1368,36 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:33 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 3:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 6:19: E225 missing whitespace around operator\n", + "2023-09-07 13:29:33 - INFO - 8:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 9:26: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 12:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 12:30: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 13:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 15:21: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 15:28: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 16:21: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 18:21: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 18:28: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 19:21: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 21:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 22:73: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 23:50: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 23:68: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 23:94: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 24:28: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 24:30: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 24:44: E231 missing whitespace after ','\n" + ] + } + ], "source": [ "#Stage 2 Products -- Calibrated 3-D data cubes for each GRATING/FILTER combination\n", "\n", @@ -987,7 +1447,18 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:33 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 3:73: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 5:65: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 9:1: E265 block comment should start with '# '\n" + ] + } + ], "source": [ "#Copy ASN file from MAST (for G235H/F170LP) into the stage 1 rerun directory\n", "\n", @@ -1037,7 +1508,24 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:33 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 2:11: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:33 - INFO - 2:11: E225 missing whitespace around operator\n", + "2023-09-07 13:29:33 - INFO - 5:45: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 5:47: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 6:43: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 6:45: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 7:38: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 7:40: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 7:61: E231 missing whitespace after ':'\n" + ] + } + ], "source": [ "#Rerun stage 3 with outlier detection off\n", "if runflag==True:\n", @@ -1057,7 +1545,28 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:33 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 5:19: E225 missing whitespace around operator\n", + "2023-09-07 13:29:33 - INFO - 7:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 8:21: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 9:19: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 9:25: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 10:16: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 10:23: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 11:16: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 11:23: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 13:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 14:69: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 16:28: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 16:30: E251 unexpected spaces around keyword / parameter equals\n" + ] + } + ], "source": [ "#Stage 3 Products -- Combined Calibrated 3-D data cubes for GRATING/FILTER combination G235H/F170LP\n", "\n", @@ -1094,7 +1603,27 @@ "execution_count": null, "id": "d6c96634", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:33 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 3:29: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 11:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 15:28: E231 missing whitespace after ','\n", + "2023-09-07 13:29:33 - INFO - 15:54: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 16:94: E128 continuation line under-indented for visual indent\n", + "2023-09-07 13:29:33 - INFO - 17:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:33 - INFO - 18:78: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 20:14: W605 invalid escape sequence '\\l'\n", + "2023-09-07 13:29:33 - INFO - 20:23: W605 invalid escape sequence '\\m'\n", + "2023-09-07 13:29:33 - INFO - 20:40: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 21:51: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:33 - INFO - 22:94: E251 unexpected spaces around keyword / parameter equals\n" + ] + } + ], "source": [ "#Stage 3 Products -- Combined Extracted 1-D Spectrum \n", "\n", diff --git a/notebooks/NIRSpec_IFU_spectral_extraction/ero_nirspec_ifu_02732_demo.ipynb b/notebooks/NIRSpec_IFU_spectral_extraction/ero_nirspec_ifu_02732_demo.ipynb index 546c7279c..5dd4ca712 100644 --- a/notebooks/NIRSpec_IFU_spectral_extraction/ero_nirspec_ifu_02732_demo.ipynb +++ b/notebooks/NIRSpec_IFU_spectral_extraction/ero_nirspec_ifu_02732_demo.ipynb @@ -62,12 +62,99 @@ "Reviewer note: Begin PEP8 check cells (delete below when finished)
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# disable all imported packages' loggers\n", + "import logging\n", + "logging.root.manager.loggerDict = {}" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "403fa920", "metadata": {}, "outputs": [], + "source": [ + "# enable PEP8 checker for this notebook\n", + "%load_ext pycodestyle_magic\n", + "%flake8_on --ignore E261,E501,W291,W293\n", + "\n", + "# only allow the checker to throw warnings when there's a violation\n", + "logging.getLogger('flake8').setLevel('ERROR')\n", + "logging.getLogger('stpipe').setLevel('ERROR')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Reviewer note: Begin PEP8 check cells (delete above when finished)
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "403fa920", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 8:47: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 9:47: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 10:47: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 11:1: F401 'jwst.extract_1d.Extract1dStep' imported but unused\n", + "2023-09-07 13:29:34 - INFO - 11:47: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 16:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 18:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 19:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 20:35: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 22:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 24:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 25:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 26:1: F401 'asdf' imported but unused\n", + "2023-09-07 13:29:34 - INFO - 26:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 27:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 28:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 30:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 32:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 33:1: F401 'astropy.wcs' imported but unused\n", + "2023-09-07 13:29:34 - INFO - 33:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 34:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 35:1: F401 'astropy.visualization.SqrtStretch' imported but unused\n", + "2023-09-07 13:29:34 - INFO - 35:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 36:1: F401 'astropy.stats.sigma_clipped_stats' imported but unused\n", + "2023-09-07 13:29:34 - INFO - 36:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 37:1: F401 'astroquery' imported but unused\n", + "2023-09-07 13:29:34 - INFO - 37:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 38:1: F401 'astroquery.mast.Mast' imported but unused\n", + "2023-09-07 13:29:34 - INFO - 38:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 39:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 41:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 43:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 44:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 45:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 46:1: F401 'matplotlib.patches.Circle' imported but unused\n", + "2023-09-07 13:29:34 - INFO - 46:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 47:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 52:1: E265 block comment should start with '# '\n" + ] + } + ], "source": [ "#Import Library\n", "\n", @@ -144,7 +231,19 @@ "execution_count": null, "id": "5a9da49e", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 28:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 40:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 54:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 56:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 66:52: E231 missing whitespace after ','\n" + ] + } + ], "source": [ "def show_image(data_2d, vmin, vmax, xsize=15, ysize=15, title=None, zoom_in=None, aspect=1, scale='log', units='DN/s', cmap='jet'):\n", " \"\"\"\n", @@ -219,7 +318,95 @@ "execution_count": null, "id": "3d233556", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:113: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 1:115: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 1:120: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 1:171: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 1:173: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 34:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 36:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 37:109: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 38:142: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 40:20: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 43:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 47:13: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 47:28: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 49:35: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 50:50: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 52:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 56:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 59:9: E303 too many blank lines (2)\n", + "2023-09-07 13:29:34 - INFO - 59:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 60:28: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 61:9: F811 redefinition of unused 'wcs' from line 33\n", + "2023-09-07 13:29:34 - INFO - 61:34: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 62:28: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 63:9: F841 local variable 'cdelt1' is assigned to but never used\n", + "2023-09-07 13:29:34 - INFO - 63:48: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 64:9: F841 local variable 'cdelt2' is assigned to but never used\n", + "2023-09-07 13:29:34 - INFO - 64:48: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 65:42: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 66:42: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 68:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 74:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 76:81: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 76:97: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 79:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 101:21: E117 over-indented\n", + "2023-09-07 13:29:34 - INFO - 104:9: E303 too many blank lines (2)\n", + "2023-09-07 13:29:34 - INFO - 104:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 107:31: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 107:50: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 109:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 111:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 120:59: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 122:96: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 123:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 125:84: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 126:27: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 126:109: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 127:28: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 127:99: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 127:111: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 130:67: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 130:69: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 134:46: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 136:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 137:116: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 137:193: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 142:17: E303 too many blank lines (2)\n", + "2023-09-07 13:29:34 - INFO - 142:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 144:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 145:40: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 147:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 150:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 151:70: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 156:52: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 157:64: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 162:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 173:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 175:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 176:148: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 177:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 179:89: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 180:32: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 180:89: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 181:94: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 181:121: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 184:66: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 184:68: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 190:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 206:20: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:34 - INFO - 207:32: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 208:1: E303 too many blank lines (3)\n" + ] + } + ], "source": [ "def show_ifu_cubeslices(s3d_file_list, wavelength_slices=[], spaxel_locs=[], y_scale=None, cmap='jet', vmin_vmax = [[[0,15e1]]], save_figure=False, title=None, title_font = 30):\n", " \"\"\"\n", @@ -446,7 +633,22 @@ "execution_count": null, "id": "f94025d4", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 2:1: E305 expected 2 blank lines after class or function definition, found 3\n", + "2023-09-07 13:29:34 - INFO - 4:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 5:12: E712 comparison to False should be 'if cond is False:' or 'if not cond:'\n", + "2023-09-07 13:29:34 - INFO - 8:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 9:14: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:34 - INFO - 10:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 11:5: E265 block comment should start with '# '\n" + ] + } + ], "source": [ "#To rerun the notebook and all the pipeline steps set runflag=True\n", "runflag = True \n", @@ -501,7 +703,34 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 14:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 16:23: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 16:25: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 17:24: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 17:26: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 18:20: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 18:22: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 20:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 22:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 24:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 25:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 26:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 30:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 35:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 36:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 41:16: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:34 - INFO - 42:125: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 44:124: E262 inline comment should start with '# '\n" + ] + } + ], "source": [ "#Download data from MAST \n", "\n", @@ -578,7 +807,33 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 7:39: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 8:36: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 10:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 11:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 15:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 16:31: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 16:48: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 16:61: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 16:71: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 20:164: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 22:69: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 22:82: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 22:92: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 24:125: E128 continuation line under-indented for visual indent\n", + "2023-09-07 13:29:34 - INFO - 25:125: E128 continuation line under-indented for visual indent\n", + "2023-09-07 13:29:34 - INFO - 26:125: E128 continuation line under-indented for visual indent\n", + "2023-09-07 13:29:34 - INFO - 27:1: E303 too many blank lines (3)\n" + ] + } + ], "source": [ "#Stage 1 slope products -- level 2a images\n", "\n", @@ -635,7 +890,29 @@ "execution_count": null, "id": "8221ff0d", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 6:18: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 9:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 10:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 10:28: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 10:34: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 11:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:28: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:32: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:36: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:40: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:46: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 14:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 15:106: E231 missing whitespace after ','\n" + ] + } + ], "source": [ "#Stage 2 Products -- Calibrated 3-D data cube for PRISM/CLEAR (only falls on NRS1)\n", "\n", @@ -669,7 +946,28 @@ "execution_count": null, "id": "5f187aba", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 5:18: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 7:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 8:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 8:28: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 8:34: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 9:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 9:28: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 9:32: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 9:36: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 9:40: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 9:46: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 11:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 12:106: E231 missing whitespace after ','\n" + ] + } + ], "source": [ "#Stage 3 Products -- Combined Calibrated 3-D data cube for PRISM/CLEAR (only falls on NRS1)\n", "\n", @@ -701,7 +999,26 @@ "execution_count": null, "id": "3575d780", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 5:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 9:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 10:29: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 12:23: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 12:48: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 14:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 19:14: W605 invalid escape sequence '\\l'\n", + "2023-09-07 13:29:34 - INFO - 19:23: W605 invalid escape sequence '\\m'\n", + "2023-09-07 13:29:34 - INFO - 19:40: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 20:51: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 21:90: E251 unexpected spaces around keyword / parameter equals\n" + ] + } + ], "source": [ "#Stage 3 Products -- Combined Extracted 1-D Spectrum \n", "\n", @@ -756,7 +1073,18 @@ "execution_count": null, "id": "95c8425d", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 4:119: E203 whitespace before ','\n", + "2023-09-07 13:29:34 - INFO - 5:1: E128 continuation line under-indented for visual indent\n", + "2023-09-07 13:29:34 - INFO - 5:1: E231 missing whitespace after ','\n" + ] + } + ], "source": [ "#Just a check to see what verison of the pipeline and what pmap was used\n", "x1d3_mast = fits.open(glob.glob(mast_products_dir+'*nirspec_prism-clear_x1d.fits')[0])\n", @@ -779,7 +1107,15 @@ "execution_count": null, "id": "c7211260", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n" + ] + } + ], "source": [ "#Directory for rerun of stage 1 to avoid overwritting MAST products\n", "output_dir_rerun = output_dir+'rerun/' \n", @@ -803,7 +1139,21 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:12: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:34 - INFO - 7:65: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 10:53: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 10:55: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 11:51: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 11:53: E251 unexpected spaces around keyword / parameter equals\n" + ] + } + ], "source": [ "#Stage 1 Processing \n", "\n", @@ -825,7 +1175,27 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 11:5: E303 too many blank lines (2)\n", + "2023-09-07 13:29:34 - INFO - 11:31: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:48: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:61: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:71: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 15:164: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 17:69: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 17:82: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 17:92: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 21:165: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 24:1: E303 too many blank lines (5)\n" + ] + } + ], "source": [ "#Stage 1 slope products -- level 2a images\n", "\n", @@ -889,7 +1259,22 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:12: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:34 - INFO - 5:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 8:65: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 11:49: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 11:51: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 12:47: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 12:49: E251 unexpected spaces around keyword / parameter equals\n" + ] + } + ], "source": [ "#Stage 2 Processing \n", "\n", @@ -910,7 +1295,29 @@ "execution_count": null, "id": "f66fe4dc", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 6:19: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 9:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 10:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 10:28: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 10:34: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 11:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:28: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:32: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:36: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:40: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:46: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 14:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 15:106: E231 missing whitespace after ','\n" + ] + } + ], "source": [ "#Stage 2 Products -- Calibrated 3-D data cube for PRISM/CLEAR (only falls on NRS1)\n", "\n", @@ -951,7 +1358,18 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:73: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 5:65: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 9:1: E265 block comment should start with '# '\n" + ] + } + ], "source": [ "#Copy ASN file from MAST into the stage 1 rerun directory\n", "\n", @@ -1000,7 +1418,24 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 2:11: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:34 - INFO - 2:11: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 5:45: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 5:47: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 6:43: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 6:45: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 7:38: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 7:40: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 7:61: E231 missing whitespace after ':'\n" + ] + } + ], "source": [ "#Rerun stage 3 with outlier detection off\n", "if runflag==True:\n", @@ -1018,7 +1453,28 @@ "execution_count": null, "id": "01c7188b", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 5:19: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 7:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 8:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 8:28: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 8:34: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 9:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 9:28: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 9:32: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 9:36: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 9:40: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 9:46: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 11:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 12:106: E231 missing whitespace after ','\n" + ] + } + ], "source": [ "#Stage 3 Products -- Combined Calibrated 3-D data cube for PRISM/CLEAR \n", "\n", @@ -1051,7 +1507,26 @@ "execution_count": null, "id": "ee63edd8", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 5:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 9:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 10:29: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 12:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 12:50: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 14:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 19:14: W605 invalid escape sequence '\\l'\n", + "2023-09-07 13:29:34 - INFO - 19:23: W605 invalid escape sequence '\\m'\n", + "2023-09-07 13:29:34 - INFO - 19:40: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 20:51: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 21:90: E251 unexpected spaces around keyword / parameter equals\n" + ] + } + ], "source": [ "#Stage 3 Products -- Combined Extracted 1-D Spectrum \n", "\n", diff --git a/notebooks/NIRSpec_IFU_spectral_extraction/ero_nirspec_ifu_02732_demo_pointsource.ipynb b/notebooks/NIRSpec_IFU_spectral_extraction/ero_nirspec_ifu_02732_demo_pointsource.ipynb index e425cbdd0..7c2be290f 100644 --- a/notebooks/NIRSpec_IFU_spectral_extraction/ero_nirspec_ifu_02732_demo_pointsource.ipynb +++ b/notebooks/NIRSpec_IFU_spectral_extraction/ero_nirspec_ifu_02732_demo_pointsource.ipynb @@ -57,12 +57,96 @@ "Reviewer note: Begin PEP8 check cells (delete below when finished)
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# disable all imported packages' loggers\n", + "import logging\n", + "logging.root.manager.loggerDict = {}" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "6230afa9-1909-4b20-a46c-38e9832df227", "metadata": {}, "outputs": [], + "source": [ + "# enable PEP8 checker for this notebook\n", + "%load_ext pycodestyle_magic\n", + "%flake8_on --ignore E261,E501,W291,W293\n", + "\n", + "# only allow the checker to throw warnings when there's a violation\n", + "logging.getLogger('flake8').setLevel('ERROR')\n", + "logging.getLogger('stpipe').setLevel('ERROR')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Reviewer note: Begin PEP8 check cells (delete above when finished)
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6230afa9-1909-4b20-a46c-38e9832df227", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 8:47: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 9:47: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 10:47: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 11:47: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 16:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 18:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 19:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 20:35: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 22:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 24:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 25:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 26:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 27:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 28:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 30:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 32:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 33:1: F401 'astropy.wcs' imported but unused\n", + "2023-09-07 13:29:34 - INFO - 33:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 34:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 35:1: F401 'astropy.visualization.SqrtStretch' imported but unused\n", + "2023-09-07 13:29:34 - INFO - 35:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 36:1: F401 'astropy.stats.sigma_clipped_stats' imported but unused\n", + "2023-09-07 13:29:34 - INFO - 36:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 37:1: F401 'astroquery' imported but unused\n", + "2023-09-07 13:29:34 - INFO - 37:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 38:1: F401 'astroquery.mast.Mast' imported but unused\n", + "2023-09-07 13:29:34 - INFO - 38:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 39:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 41:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 43:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 44:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 45:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 46:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 47:1: E402 module level import not at top of file\n", + "2023-09-07 13:29:34 - INFO - 52:1: E265 block comment should start with '# '\n" + ] + } + ], "source": [ "#Import Library\n", "\n", @@ -139,7 +223,19 @@ "execution_count": null, "id": "1f45048e-4112-4c47-91cc-bd461d778779", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 28:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 40:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 54:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 56:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 66:52: E231 missing whitespace after ','\n" + ] + } + ], "source": [ "def show_image(data_2d, vmin, vmax, xsize=15, ysize=15, title=None, zoom_in=None, aspect=1, scale='log', units='DN/s', cmap='jet'):\n", " \"\"\"\n", @@ -214,7 +310,95 @@ "execution_count": null, "id": "019b0f74-0d54-4b89-aad4-e30c02946d0d", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:113: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 1:115: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 1:120: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 1:171: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 1:173: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 34:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 36:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 37:109: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 38:142: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 40:20: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 43:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 47:13: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 47:28: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 49:35: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 50:50: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 52:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 56:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 59:9: E303 too many blank lines (2)\n", + "2023-09-07 13:29:34 - INFO - 59:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 60:28: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 61:9: F811 redefinition of unused 'wcs' from line 33\n", + "2023-09-07 13:29:34 - INFO - 61:34: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 62:28: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 63:9: F841 local variable 'cdelt1' is assigned to but never used\n", + "2023-09-07 13:29:34 - INFO - 63:48: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 64:9: F841 local variable 'cdelt2' is assigned to but never used\n", + "2023-09-07 13:29:34 - INFO - 64:48: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 65:42: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 66:42: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 68:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 73:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 75:81: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 75:97: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 78:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 100:21: E117 over-indented\n", + "2023-09-07 13:29:34 - INFO - 103:9: E303 too many blank lines (2)\n", + "2023-09-07 13:29:34 - INFO - 103:9: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 106:31: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 106:50: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 108:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 110:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 119:59: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 120:96: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 121:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 123:84: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 124:27: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 124:109: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 125:28: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 125:99: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 125:111: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 128:67: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 128:69: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 132:46: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 134:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 135:116: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 135:193: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 140:17: E303 too many blank lines (2)\n", + "2023-09-07 13:29:34 - INFO - 140:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 142:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 143:40: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 145:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 148:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 149:70: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 154:52: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 155:64: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 160:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 171:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 173:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 174:148: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 175:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 177:89: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 178:32: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 178:89: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 179:94: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 179:121: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 182:66: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 182:68: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 188:17: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 204:20: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:34 - INFO - 205:32: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 206:1: E303 too many blank lines (3)\n" + ] + } + ], "source": [ "def show_ifu_cubeslices(s3d_file_list, wavelength_slices=[], spaxel_locs=[], y_scale=None, cmap='jet', vmin_vmax = [[[0,15e1]]], save_figure=False, title=None, title_font = 30):\n", " \"\"\"\n", @@ -438,7 +622,22 @@ "execution_count": null, "id": "36acc0ff-0a60-4f60-abad-bd71e686c8ed", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 2:1: E305 expected 2 blank lines after class or function definition, found 3\n", + "2023-09-07 13:29:34 - INFO - 4:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 5:12: E712 comparison to False should be 'if cond is False:' or 'if not cond:'\n", + "2023-09-07 13:29:34 - INFO - 8:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 9:14: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:34 - INFO - 10:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 11:5: E265 block comment should start with '# '\n" + ] + } + ], "source": [ "#To rerun the notebook and all the pipeline steps set runflag=True\n", "runflag = True \n", @@ -493,7 +692,34 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 14:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 16:23: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 16:25: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 17:24: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 17:26: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 18:20: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 18:22: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 20:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 22:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 24:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 25:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 26:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 30:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 35:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 36:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 41:16: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:34 - INFO - 42:125: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 44:124: E262 inline comment should start with '# '\n" + ] + } + ], "source": [ "#Download data from MAST \n", "\n", @@ -557,7 +783,21 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:12: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:34 - INFO - 7:65: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 10:53: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 10:55: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 11:51: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 11:53: E251 unexpected spaces around keyword / parameter equals\n" + ] + } + ], "source": [ "#Stage 1 Processing \n", "\n", @@ -579,7 +819,27 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 11:5: E303 too many blank lines (2)\n", + "2023-09-07 13:29:34 - INFO - 11:31: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:48: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:61: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:71: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 15:164: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 17:69: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 17:82: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 17:92: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 21:165: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 24:1: E303 too many blank lines (5)\n" + ] + } + ], "source": [ "#Stage 1 slope products -- level 2a images\n", "\n", @@ -623,7 +883,18 @@ "execution_count": null, "id": "cefe6882-2880-4172-b65e-e6e83383dff3", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 2:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 7:5: E265 block comment should start with '# '\n" + ] + } + ], "source": [ "#Treating the IFU data as a point source \n", "#To run as a point source, alter the rate file header keywrod SRCTYAPT=POINT & rerun stage 2 of the pipeline \n", @@ -661,7 +932,22 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:12: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:34 - INFO - 5:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 8:65: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 11:49: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 11:51: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 12:47: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 12:49: E251 unexpected spaces around keyword / parameter equals\n" + ] + } + ], "source": [ "#Stage 2 Processing \n", "\n", @@ -682,7 +968,29 @@ "execution_count": null, "id": "29bafbb3-5646-4405-94b7-179523220ca0", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 6:19: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 9:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 10:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 10:28: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 10:34: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 11:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:28: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:32: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:36: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:40: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 11:46: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 14:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 15:106: E231 missing whitespace after ','\n" + ] + } + ], "source": [ "#Stage 2 Products -- Calibrated 3-D data cube for PRISM/CLEAR (only falls on NRS1)\n", "\n", @@ -723,7 +1031,18 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:73: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 5:65: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 9:1: E265 block comment should start with '# '\n" + ] + } + ], "source": [ "#Copy ASN file from MAST into the stage 1 rerun directory\n", "\n", @@ -770,7 +1089,28 @@ "execution_count": null, "id": "07a09918-9e92-4f5b-954f-a0de70aa56d1", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 2:11: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:34 - INFO - 2:11: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 5:45: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 5:47: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 6:43: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 6:45: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 7:38: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 7:40: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 7:61: E231 missing whitespace after ':'\n", + "2023-09-07 13:29:34 - INFO - 10:54: E231 missing whitespace after ':'\n", + "2023-09-07 13:29:34 - INFO - 10:77: E231 missing whitespace after ':'\n", + "2023-09-07 13:29:34 - INFO - 10:87: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 11:1: E303 too many blank lines (3)\n" + ] + } + ], "source": [ "#Rerun stage 3 with outlier detection on\n", "if runflag==True:\n", @@ -790,7 +1130,34 @@ "execution_count": null, "id": "f0c596da-927d-41a1-93c3-4731bed51ef6", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 5:25: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 7:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 8:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 8:28: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 8:34: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 9:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 9:28: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 9:32: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 9:36: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 9:40: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 9:46: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 10:22: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 10:27: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 10:30: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 10:35: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 10:38: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 12:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 13:112: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 13:140: E231 missing whitespace after ','\n" + ] + } + ], "source": [ "#Stage 3 Products -- Combined Calibrated 3-D data cube for PRISM/CLEAR \n", "\n", @@ -812,7 +1179,27 @@ "execution_count": null, "id": "7cff7886-30b8-42a6-bf72-a5eb04fe19d8", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 6:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 10:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 11:29: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 13:30: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 13:62: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 15:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 20:14: W605 invalid escape sequence '\\l'\n", + "2023-09-07 13:29:34 - INFO - 20:23: W605 invalid escape sequence '\\m'\n", + "2023-09-07 13:29:34 - INFO - 20:40: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 21:33: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 24:57: E231 missing whitespace after ','\n" + ] + } + ], "source": [ "#Stage 3 Products -- Extracted 1-D Spectrum \n", "\n", @@ -871,7 +1258,35 @@ "execution_count": null, "id": "8284ef00-acf5-49e7-8f8d-e3cf6efd7918", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 2:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 4:20: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 6:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 7:26: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 8:54: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 9:11: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 9:81: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 10:81: E262 inline comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 12:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 14:51: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 14:53: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 18:20: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 18:24: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 19:23: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 19:27: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 19:41: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 20:10: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 20:22: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 20:26: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 20:40: E231 missing whitespace after ','\n" + ] + } + ], "source": [ "#Extraction Region Preview\n", "#Open Combined 3-D Cube FITS file\n", @@ -910,7 +1325,19 @@ "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 6:11: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:34 - INFO - 6:11: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 7:5: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 8:65: E231 missing whitespace after ','\n" + ] + } + ], "source": [ "#Grab the defualt extract1d reference file and copy to working directory\n", "extract1d_ref_og = Spec3Pipeline().get_reference_file(glob.glob(output_dir+'*nirspec_prism-clear_s3d.fits')[0], 'extract1d')\n", @@ -931,7 +1358,23 @@ "execution_count": null, "id": "1ab34faf-b2f2-469a-ad8c-8920f9e01786", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:11: E712 comparison to True should be 'if cond is True:' or 'if cond:'\n", + "2023-09-07 13:29:34 - INFO - 3:11: E225 missing whitespace around operator\n", + "2023-09-07 13:29:34 - INFO - 5:36: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 5:38: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 6:34: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 6:36: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 7:42: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 7:44: E251 unexpected spaces around keyword / parameter equals\n" + ] + } + ], "source": [ "#Rerun only the extract1d step with the new/modified reference file with background subtraction on\n", "\n", @@ -947,7 +1390,26 @@ "execution_count": null, "id": "6e10a9e2-1040-4836-b50e-903413d7defa", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "2023-09-07 13:29:34 - INFO - 1:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 3:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 6:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 10:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 11:29: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 13:18: E231 missing whitespace after ','\n", + "2023-09-07 13:29:34 - INFO - 13:38: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 15:1: E265 block comment should start with '# '\n", + "2023-09-07 13:29:34 - INFO - 20:14: W605 invalid escape sequence '\\l'\n", + "2023-09-07 13:29:34 - INFO - 20:23: W605 invalid escape sequence '\\m'\n", + "2023-09-07 13:29:34 - INFO - 21:33: E251 unexpected spaces around keyword / parameter equals\n", + "2023-09-07 13:29:34 - INFO - 24:57: E231 missing whitespace after ','\n" + ] + } + ], "source": [ "#Display new 1-D spectrum\n", "\n",