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

small fix for notebooks ci #425

Merged
merged 3 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ jobs:
run: |
poetry install

- name: Install Scarlet
run: |
pip install "pybind11[global]" peigen
git clone https://github.com/pmelchior/scarlet.git
cd scarlet; python setup.py install; cd ..

# just checks if they run
- name: Run notebooks
run: |
Expand Down
94 changes: 47 additions & 47 deletions notebooks/00-quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -40,7 +40,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -51,7 +51,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -84,14 +84,14 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div><i>Table length=5</i>\n",
"<table id=\"table140599924127920\" class=\"table-striped table-bordered table-condensed\">\n",
"<table id=\"table140205725004032\" class=\"table-striped table-bordered table-condensed\">\n",
"<thead><tr><th>galtileid</th><th>ra</th><th>dec</th><th>redshift</th><th>fluxnorm_bulge</th><th>fluxnorm_disk</th><th>fluxnorm_agn</th><th>a_b</th><th>a_d</th><th>b_b</th><th>b_d</th><th>pa_bulge</th><th>pa_disk</th><th>u_ab</th><th>g_ab</th><th>r_ab</th><th>i_ab</th><th>z_ab</th><th>y_ab</th></tr></thead>\n",
"<thead><tr><th>int64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th></tr></thead>\n",
"<tr><td>2200871446</td><td>0.418319702147</td><td>-0.000148399994941</td><td>0.496377289295</td><td>0.0</td><td>1.4144730572e-17</td><td>0.0</td><td>0.0</td><td>0.278649687767</td><td>0.0</td><td>0.221303001046</td><td>0.0</td><td>307.344329834</td><td>25.9418621063</td><td>25.129743576</td><td>23.9588813782</td><td>23.3607368469</td><td>23.0723800659</td><td>22.9095973969</td></tr>\n",
Expand All @@ -113,7 +113,7 @@
"2212241881 0.423181056976 -0.00218109996058 ... 26.7419490814 26.1817016602"
]
},
"execution_count": null,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -140,7 +140,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -165,14 +165,14 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div><i>Table length=3</i>\n",
"<table id=\"table140599924129456\" class=\"table-striped table-bordered table-condensed\">\n",
"<table id=\"table140205725007200\" class=\"table-striped table-bordered table-condensed\">\n",
"<thead><tr><th>galtileid</th><th>ra</th><th>dec</th><th>redshift</th><th>fluxnorm_bulge</th><th>fluxnorm_disk</th><th>fluxnorm_agn</th><th>a_b</th><th>a_d</th><th>b_b</th><th>b_d</th><th>pa_bulge</th><th>pa_disk</th><th>u_ab</th><th>g_ab</th><th>r_ab</th><th>i_ab</th><th>z_ab</th><th>y_ab</th></tr></thead>\n",
"<thead><tr><th>int64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th></tr></thead>\n",
"<tr><td>2202909702</td><td>-0.9180529521276106</td><td>0.8255111545554434</td><td>0.761030912399</td><td>4.06549706794e-19</td><td>5.27902696464e-18</td><td>0.0</td><td>0.0750240981579</td><td>0.397735208273</td><td>0.0638189986348</td><td>0.216169804335</td><td>200.800704956</td><td>200.800704956</td><td>29.0995540619</td><td>27.4888687134</td><td>26.0163269043</td><td>24.9097938538</td><td>24.4229316711</td><td>24.1450653076</td></tr>\n",
Expand All @@ -190,7 +190,7 @@
"2202673364 0.6265404784005448 ... 25.0117759705 25.0565166473"
]
},
"execution_count": null,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -216,7 +216,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -233,7 +233,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -269,7 +269,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -302,7 +302,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 10,
"metadata": {},
"outputs": [
{
Expand All @@ -311,7 +311,7 @@
"(100, 6, 120, 120)"
]
},
"execution_count": null,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -331,14 +331,14 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div><i>Table length=3</i>\n",
"<table id=\"table140600209532496\" class=\"table-striped table-bordered table-condensed\">\n",
"<table id=\"table140205488323168\" class=\"table-striped table-bordered table-condensed\">\n",
"<thead><tr><th>galtileid</th><th>ra</th><th>dec</th><th>redshift</th><th>fluxnorm_bulge</th><th>fluxnorm_disk</th><th>fluxnorm_agn</th><th>a_b</th><th>a_d</th><th>b_b</th><th>b_d</th><th>pa_bulge</th><th>pa_disk</th><th>u_ab</th><th>g_ab</th><th>r_ab</th><th>i_ab</th><th>z_ab</th><th>y_ab</th><th>x_peak</th><th>y_peak</th><th>btk_rotation</th><th>not_drawn_u</th><th>not_drawn_g</th><th>not_drawn_r</th><th>not_drawn_i</th><th>not_drawn_z</th><th>not_drawn_y</th></tr></thead>\n",
"<thead><tr><th>int64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th></tr></thead>\n",
"<tr><td>2202008955</td><td>0.8701448475755365</td><td>0.7148085531751387</td><td>0.755906283855</td><td>0.0</td><td>7.038753629e-18</td><td>0.0</td><td>0.0</td><td>0.163465604186</td><td>0.0</td><td>0.0719522982836</td><td>0.0</td><td>48.2241973877</td><td>25.4941711426</td><td>25.2252883911</td><td>24.9438838959</td><td>24.4088439941</td><td>24.3243865967</td><td>24.2516822815</td><td>63.850724237965</td><td>63.07404276606157</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td></tr>\n",
Expand All @@ -356,7 +356,7 @@
"2202873263 -0.9945229996597038 0.45931089285988813 ... 0.0 0.0"
]
},
"execution_count": null,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -376,7 +376,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 12,
"metadata": {},
"outputs": [
{
Expand All @@ -390,7 +390,7 @@
"\t wcs: <class 'astropy.wcs.wcs.WCS'>)"
]
},
"execution_count": null,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -409,16 +409,16 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x7fe00990d0c0>"
"<matplotlib.collections.PathCollection at 0x7f8411226890>"
]
},
"execution_count": null,
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -453,16 +453,16 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.image.AxesImage at 0x7fe00ddd0610>"
"<matplotlib.image.AxesImage at 0x7f8426ae9720>"
]
},
"execution_count": null,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -498,16 +498,16 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.image.AxesImage at 0x7fe00de10a30>"
"<matplotlib.image.AxesImage at 0x7f8426b3fd60>"
]
},
"execution_count": null,
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -551,7 +551,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 16,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -560,7 +560,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -580,7 +580,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -597,7 +597,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 19,
"metadata": {},
"outputs": [
{
Expand All @@ -618,14 +618,14 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div><i>Table length=2</i>\n",
"<table id=\"table140599379596464\" class=\"table-striped table-bordered table-condensed\">\n",
"<table id=\"table140205732844672\" class=\"table-striped table-bordered table-condensed\">\n",
"<thead><tr><th>ra</th><th>dec</th></tr></thead>\n",
"<thead><tr><th>float64</th><th>float64</th></tr></thead>\n",
"<tr><td>0.5341353877472973</td><td>-1.0523902083800802</td></tr>\n",
Expand All @@ -641,7 +641,7 @@
" 0.866781448569519 0.6445682006963833"
]
},
"execution_count": null,
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -660,7 +660,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -677,14 +677,14 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 22,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div><i>Table length=2</i>\n",
"<table id=\"table140599379598384\" class=\"table-striped table-bordered table-condensed\">\n",
"<table id=\"table140205732845056\" class=\"table-striped table-bordered table-condensed\">\n",
"<thead><tr><th>ra</th><th>dec</th></tr></thead>\n",
"<thead><tr><th>float64</th><th>float64</th></tr></thead>\n",
"<tr><td>0.5341353877472973</td><td>-1.0523902083800802</td></tr>\n",
Expand All @@ -700,7 +700,7 @@
" 0.866781448569519 0.6445682006963833"
]
},
"execution_count": null,
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -718,16 +718,16 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.collections.PathCollection at 0x7fdfd8192b90>"
"<matplotlib.collections.PathCollection at 0x7f8426b7f6d0>"
]
},
"execution_count": null,
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -770,16 +770,16 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.colorbar.Colorbar at 0x7fdfd82aa920>"
"<matplotlib.colorbar.Colorbar at 0x7f84115cc8b0>"
]
},
"execution_count": null,
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -815,7 +815,7 @@
"# plot isolated images from prediction\n",
"for ii in range(3, 6):\n",
" ax = axes.flatten()[ii]\n",
" ax.imshow(deblend_batch.deblended_images[0, ii-3, 2, clip:-clip, clip:-clip], cmap=\"gray\", \n",
" ax.imshow(deblend_batch.deblended_images[0, ii-3, 0, clip:-clip, clip:-clip], cmap=\"gray\", \n",
" vmin=vmin, vmax=vmax)\n",
"\n",
"# add colorbar\n",
Expand Down