Skip to content

Commit

Permalink
Update notebook to set sparse redshift grid via stage params
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Shirley committed May 16, 2024
1 parent 32efdca commit 745b3f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/small_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@
" nondetect_val=np.nan,\n",
" model=\"lephare.pkl\",\n",
" hdf5_groupname=\"\",\n",
" # Use a sparse redshift grid to speed up the notebook\n",
" zmin=0,\n",
" zmax=5,\n",
" nzbins=51,\n",
")\n",
"\n",
"inform_lephare.inform(traindata_io)"
Expand Down Expand Up @@ -203,7 +207,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
2 changes: 2 additions & 0 deletions tests/lephare/test_algos.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ def test_informer_basic():

assert inform_lephare.name == "LephareInformer"
assert inform_lephare.config["name"] == "inform_Lephare"
# Check config zgrid updated to stage param defaults:
assert inform_lephare.config["lephare_config"]["Z_STEP"]=='0.01,0.0,3.0'


@pytest.mark.slow
Expand Down

0 comments on commit 745b3f7

Please sign in to comment.