Skip to content

Commit

Permalink
from anesthetic import make_2d_axes
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamOrmondroyd committed Jan 28, 2024
1 parent 6d735e5 commit 5d9dadf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
30 changes: 15 additions & 15 deletions quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "f1479f13",
"id": "74897445",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -18,7 +18,7 @@
},
{
"cell_type": "markdown",
"id": "5cd722d8",
"id": "0b27c3aa",
"metadata": {},
"source": [
"Define a four-dimensional spherical gaussian likelihood,\n",
Expand All @@ -29,7 +29,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "3ffe63bf",
"id": "c9453fa2",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -50,7 +50,7 @@
},
{
"cell_type": "markdown",
"id": "b872ec58",
"id": "a2e69376",
"metadata": {},
"source": [
"Define a box uniform prior from -1 to 1"
Expand All @@ -59,7 +59,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "2ddab209",
"id": "93de201d",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -70,7 +70,7 @@
},
{
"cell_type": "markdown",
"id": "0df31bf8",
"id": "fe13bd20",
"metadata": {},
"source": [
"Optional dumper function giving run-time read access to\n",
Expand All @@ -80,7 +80,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "57b91f61",
"id": "a0565d20",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -90,7 +90,7 @@
},
{
"cell_type": "markdown",
"id": "4e1eba5e",
"id": "f9ed3ce3",
"metadata": {},
"source": [
"Parameter names"
Expand All @@ -99,7 +99,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "f9e59423",
"id": "c1442195",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -112,7 +112,7 @@
},
{
"cell_type": "markdown",
"id": "5b4e28be",
"id": "58c57e67",
"metadata": {},
"source": [
"Run PolyChord"
Expand All @@ -121,7 +121,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "775b8c4a",
"id": "f2dbb2bb",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -141,7 +141,7 @@
},
{
"cell_type": "markdown",
"id": "bd570900",
"id": "a8c1be16",
"metadata": {},
"source": [
"Make an anesthetic plot"
Expand All @@ -150,13 +150,13 @@
{
"cell_type": "code",
"execution_count": null,
"id": "f4b1541e",
"id": "39356e18",
"metadata": {},
"outputs": [],
"source": [
"try:\n",
" import anesthetic as ac\n",
" fig, ax = ac.make_2d_axes(['p0', 'p1', 'p2', 'p3', 'r'])\n",
" from anesthetic import make_2d_axes\n",
" fig, ax = make_2d_axes(['p0', 'p1', 'p2', 'p3', 'r'])\n",
" output.plot_2d(ax)\n",
" fig.savefig('posterior.pdf')\n",
"except ImportError:\n",
Expand Down
4 changes: 2 additions & 2 deletions quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def dumper(live, dead, logweights, logZ, logZerr):
#| Make an anesthetic plot

try:
import anesthetic as ac
fig, ax = ac.make_2d_axes(['p0', 'p1', 'p2', 'p3', 'r'])
from anesthetic import make_2d_axes
fig, ax = make_2d_axes(['p0', 'p1', 'p2', 'p3', 'r'])
output.plot_2d(ax)
fig.savefig('posterior.pdf')
except ImportError:
Expand Down

0 comments on commit 5d9dadf

Please sign in to comment.