Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a broken notebook #521

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions notebooks/kbmod_visualize.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"outputs": [],
"source": [
"# everything we will need for this demo\n",
"from kbmod.data_interface import load_deccam_layered_image\n",
"import kbmod.search as kb\n",
"import matplotlib.pyplot as plt\n",
"import math\n",
Expand Down Expand Up @@ -51,7 +52,7 @@
"outputs": [],
"source": [
"p = kb.PSF(1.0)\n",
"im = kb.LayeredImage(im_path + \"000000.fits\", p)\n",
"im = load_deccam_layered_image(im_path + \"000000.fits\", p)\n",
"print(f\"Loaded a {im.get_width()} by {im.get_height()} image at time {im.get_obstime()}\")"
]
},
Expand Down Expand Up @@ -89,12 +90,10 @@
"source": [
"files = [im_path + f for f in os.listdir(im_path) if \".fits\" in f]\n",
"files.sort()\n",
"\n",
"# Create default PSFs for each image.\n",
"all_psfs = [p for _ in range(len(files))]\n",
"imgs = [load_deccam_layered_image(f, p) for f in files]\n",
"\n",
"# Load the images.\n",
"stack = kb.ImageStack(files, all_psfs)\n",
"stack = kb.ImageStack(imgs)\n",
"\n",
"num_images = stack.img_count()\n",
"print(f\"Loaded {num_images} images.\")"
Expand Down Expand Up @@ -216,9 +215,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python (.conda-kbmod)",
"display_name": "Jeremy's KBMOD",
"language": "python",
"name": "conda-env-.conda-kbmod-py"
"name": "kbmod_jk"
},
"language_info": {
"codemirror_mode": {
Expand Down
Loading