Skip to content

Commit

Permalink
Remove expectation to get RailStage in import_and_attach_all
Browse files Browse the repository at this point in the history
  • Loading branch information
OliviaLynn committed Jul 9, 2024
1 parent 93087f9 commit e5480b4
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions examples/core_examples/Useful_Utilities.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"source": [
"import rail\n",
"import rail.stages\n",
"rail.stages.import_and_attach_all()\n"
"rail.stages.import_and_attach_all()"
]
},
{
Expand Down Expand Up @@ -136,9 +136,7 @@
"source": [
"### Listing imported stages (2/2)\n",
"\n",
"Now, let's try listing imported stages again.\n",
"\n",
"Note that we can now just call `stage.RailStage` instead of `rail.core.stage.RailStage`."
"Now, let's try listing imported stages again, and notice how many more we get."
]
},
{
Expand All @@ -147,7 +145,7 @@
"metadata": {},
"outputs": [],
"source": [
"for val in stage.RailStage.pipeline_stages.values():\n",
"for val in rail.core.stage.RailStage.pipeline_stages.values():\n",
" print(val[0])"
]
},
Expand All @@ -166,7 +164,7 @@
"metadata": {},
"outputs": [],
"source": [
"for val in stage.RailStage.pipeline_stages.values():\n",
"for val in rail.core.stage.RailStage.pipeline_stages.values():\n",
" if issubclass(val[0], rail.estimation.estimator.CatEstimator):\n",
" print(val[0])"
]
Expand All @@ -188,7 +186,7 @@
"metadata": {},
"outputs": [],
"source": [
"DS = stage.RailStage.data_store\n",
"DS = rail.core.stage.RailStage.data_store\n",
"DS.__class__.allow_overwrite = True"
]
},
Expand Down Expand Up @@ -278,11 +276,12 @@
"outputs": [],
"source": [
"# Now, we have to set up some other variables for our pipeline:\n",
"import numpy as np\n",
"\n",
"bands = [\"u\", \"g\", \"r\", \"i\", \"z\", \"y\"]\n",
"band_dict = {band: f\"mag_{band}_lsst\" for band in bands}\n",
"rename_dict = {f\"mag_{band}_lsst_err\": f\"mag_err_{band}_lsst\" for band in bands}\n",
"post_grid = [float(x) for x in np.linspace(0.0, 5, 21)]\n"
"post_grid = [float(x) for x in np.linspace(0.0, 5, 21)]"
]
},
{
Expand Down Expand Up @@ -585,7 +584,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.0"
"version": "3.11.6"
}
},
"nbformat": 4,
Expand Down

0 comments on commit e5480b4

Please sign in to comment.