Skip to content

Commit

Permalink
updated Preprocessing
Browse files Browse the repository at this point in the history
  • Loading branch information
grantmerz committed Sep 9, 2024
1 parent d79ef3b commit 1e7b9d9
Showing 1 changed file with 61 additions and 4 deletions.
65 changes: 61 additions & 4 deletions docs/Tutorials/Preprocessing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"This notebook assumes you have the DC2 data downloaded \n",
"## This notebook assumes you have the DC2 data downloaded \n",
"\n",
"You will have to change directory paths"
]
Expand All @@ -31,7 +31,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -74,12 +74,36 @@
"import json"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1.0.1+g11d1363\n",
"1.23.4\n",
"1.2.1\n"
]
}
],
"source": [
"# Print the versions to test the imports and so we know what works\n",
"print(scarlet.__version__)\n",
"print(np.__version__)\n",
"print(sep.__version__)"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"### Run Scarlet to produce segmentation maps\n",
"\n",
"First, let's test scarlet using one DC2 image. The DC2 image data is divided into \"tracts\" and \"patches\" on the sky. You can get the data here https://data.lsstdesc.org/.\n",
"\n",
"You will need to change the directory paths below"
Expand Down Expand Up @@ -162,11 +186,16 @@
"plt.imshow(datsm[1],norm=colors.LogNorm())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now we can run detection and segmentation on the cutout image\n",
"#### Now we can run detection and segmentation on the cutout image\n",
"\n",
"To produce labels for an image, use ```deepdisc.preprocessing.detection.run_scarlet```. The main inputs you will need are an image, a list of filters, and a psf (either an image or a gaussian standard deviation).\n",
"Check the API documentation for details. \n",
Expand Down Expand Up @@ -253,6 +282,34 @@
"generate_training_data_example(dirpath, tract='3828',patch='1,2',sp=4,plot_scene=False, plot_likelihood=False, write_results=True, outdir=outdir)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -663,7 +720,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's run a few more times to get a set of images"
"#### Let's run a few more times to get a set of images"
]
},
{
Expand Down

0 comments on commit 1e7b9d9

Please sign in to comment.