Skip to content

Commit

Permalink
Fixed posterior nb for photerr 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jfcrenshaw committed Mar 8, 2024
1 parent 1f03be0 commit cbbedba
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/creation_examples/posterior-demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"\n",
"author: John Franklin Crenshaw, Sam Schmidt, Eric Charles, others...\n",
"\n",
"last run successfully: August 2, 2023"
"last run successfully: March 7, 2024"
]
},
{
Expand Down Expand Up @@ -228,7 +228,7 @@
"source": [
"# set up the error model\n",
"\n",
"n_samples = 30\n",
"n_samples = 50\n",
"# create the FlowEngine\n",
"flowEngine_degr = FlowCreator.make_stage(\n",
" name=\"degraded\", flow_file=flow_file, n_samples=n_samples\n",
Expand Down Expand Up @@ -444,7 +444,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Based on this histogram, I will marginalize over u band values from 27 to 31. Like how I tested different numbers of error samples above, here I will test different resolutions for the u band grid.\n",
"Based on this histogram, I will marginalize over u band values from 25 to 31. Like how I tested different numbers of error samples above, here I will test different resolutions for the u band grid.\n",
"\n",
"I will provide our new u band grid in the `marg_rules` dictionary, which will also include `\"flag\"` which tells `FlowEngine` what my flag for non-detections is.\n",
"In this simple example, we are using a fixed grid for the u band, but notice that the u band rule takes the form of a function - this is because the grid over which to marginalize can be a function of any of the other variables in the row. \n",
Expand Down Expand Up @@ -476,7 +476,7 @@
" # set up the marginalization rules for this grid resolution\n",
" marg_rules = {\n",
" \"flag\": errorModel.config[\"ndFlag\"],\n",
" \"u\": lambda row: np.linspace(27, 31, nbins),\n",
" \"u\": lambda row: np.linspace(25, 31, nbins),\n",
" }\n",
"\n",
" # calculate the posterior by marginalizing over u and sampling\n",
Expand Down Expand Up @@ -530,7 +530,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.10.13"
},
"vscode": {
"interpreter": {
Expand All @@ -539,5 +539,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}

0 comments on commit cbbedba

Please sign in to comment.