Skip to content

Commit

Permalink
Merge pull request #374 from havijw/photometry-import-fixes
Browse files Browse the repository at this point in the history
Fix imports and definition for random colormaps
  • Loading branch information
mwcraig authored Jul 13, 2024
2 parents 0888d42 + 6b6d10f commit 17f8074
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"from photutils.datasets import make_100gaussians_image, make_gaussian_sources_image, make_noise_image\n",
"from photutils.detection import find_peaks, DAOStarFinder\n",
"from photutils.segmentation import detect_sources, make_2dgaussian_kernel, SourceCatalog\n",
"from photutils.utils import make_random_cmap\n",
"\n",
"plt.style.use('../photutils_notebook_style.mplstyle')"
]
Expand Down
2 changes: 2 additions & 0 deletions notebooks/photometry/01.04.02-image-segmentation-XDF.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@
" marker=\"s\", facecolor=\"none\", edgecolor=\"cyan\", s=200, \n",
" alpha=0.5, label=\"DAOFind\")\n",
"\n",
" rand_cmap = make_random_cmap()\n",
" rand_cmap.set_under('black')\n",
" sub_axs[\"segm\"].imshow(segm.data[slc], cmap=rand_cmap, vmin=1, vmax=len(sources_findpeaks), origin=\"lower\")\n",
" src_id = src[\"source_id\"]\n",
" # ax.text(2, 2, str(src_id), color='w', va='top')\n",
Expand Down

0 comments on commit 17f8074

Please sign in to comment.