|
90 | 90 | "source": [ |
91 | 91 | "# use a jwst datamodel to provide a good interface to the data and wcs info\n", |
92 | 92 | "s2d = datamodels.open(s2dfile)\n", |
93 | | - "image = s2d.slits[0].data" |
| 93 | + "image = np.array(s2d.slits[0].data)" |
94 | 94 | ] |
95 | 95 | }, |
96 | 96 | { |
|
361 | 361 | ], |
362 | 362 | "source": [ |
363 | 363 | "plt.figure(figsize=(15, 15))\n", |
364 | | - "plt.imshow(bg.bkg_wimage[::,0:100], origin=\"lower\")\n", |
| 364 | + "plt.imshow(bg.bkg_wimage[::,0:100].data, origin=\"lower\")\n", |
365 | 365 | "plt.title(\"slit[0] slice\")" |
366 | 366 | ] |
367 | 367 | }, |
|
395 | 395 | ], |
396 | 396 | "source": [ |
397 | 397 | "plt.figure(figsize=(15, 15))\n", |
398 | | - "plt.imshow(bg.bkg_image(image)[::,0:100], norm=norm_data, origin=\"lower\")\n", |
| 398 | + "plt.imshow(bg.bkg_image(image)[::,0:100].data, norm=norm_data, origin=\"lower\")\n", |
399 | 399 | "plt.title(\"slit[0] slice\")" |
400 | 400 | ] |
401 | 401 | }, |
|
429 | 429 | ], |
430 | 430 | "source": [ |
431 | 431 | "plt.figure(figsize=(15, 15))\n", |
432 | | - "plt.imshow(bg.sub_image(image)[::,0:100], norm=norm_data, origin=\"lower\")\n", |
| 432 | + "plt.imshow(bg.sub_image(image)[::,0:100].data, norm=norm_data, origin=\"lower\")\n", |
433 | 433 | "plt.title(\"slit[0] slice\")" |
434 | 434 | ] |
435 | 435 | }, |
|
471 | 471 | "source": [ |
472 | 472 | "bg_med = Background.two_sided(image, ext_center, bkg_sep, width=bkg_width, statistic='median')\n", |
473 | 473 | "plt.figure(figsize=(15, 15))\n", |
474 | | - "plt.imshow(bg_med.bkg_wimage[::,0:100], origin=\"lower\")\n", |
| 474 | + "plt.imshow(bg_med.bkg_wimage[::,0:100].data, origin=\"lower\")\n", |
475 | 475 | "plt.title(\"slit[0] slice\")" |
476 | 476 | ] |
477 | 477 | }, |
|
548 | 548 | "## About this notebook\n", |
549 | 549 | "\n", |
550 | 550 | "**Author:** Ivo Busko, JWST\n", |
551 | | - "**Updated On:** 2022-11-11" |
| 551 | + "**Updated On:** 2022-12-05" |
552 | 552 | ] |
553 | 553 | }, |
554 | 554 | { |
|
565 | 565 | "[Top of Page](#top)\n", |
566 | 566 | "<img style=\"float: right;\" src=\"https://raw.githubusercontent.com/spacetelescope/notebooks/master/assets/stsci_pri_combo_mark_horizonal_white_bkgd.png\" alt=\"Space Telescope Logo\" width=\"200px\"/> " |
567 | 567 | ] |
568 | | - }, |
569 | | - { |
570 | | - "cell_type": "code", |
571 | | - "execution_count": null, |
572 | | - "metadata": {}, |
573 | | - "outputs": [], |
574 | | - "source": [] |
575 | 568 | } |
576 | 569 | ], |
577 | 570 | "metadata": { |
|
0 commit comments