Skip to content
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
28 changes: 27 additions & 1 deletion notebooks/cookbooks/analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,33 @@
"cell_type": "code",
"metadata": {},
"source": [
"dataset_path = path.join(\"dataset\", \"example_1d\", \"gaussian_x1\")\n",
"dataset_path = path.join(\"dataset\", \"example_1d\", \"gaussian_x1\")"
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"__Dataset Auto-Simulation__\n",
"\n",
"If the dataset does not already exist on your system, it will be created by running the corresponding\n",
"simulator script. This ensures that all example scripts can be run without manually simulating data first."
]
},
{
"cell_type": "code",
"metadata": {},
"source": [
"if not path.exists(dataset_path):\n",
" import subprocess\n",
" import sys\n",
" subprocess.run(\n",
" [sys.executable, \"scripts/simulators/simulators.py\"],\n",
" check=True,\n",
" )\n",
"\n",
"data = af.util.numpy_array_from_json(file_path=path.join(dataset_path, \"data.json\"))\n",
"noise_map = af.util.numpy_array_from_json(\n",
" file_path=path.join(dataset_path, \"noise_map.json\")\n",
Expand Down
30 changes: 28 additions & 2 deletions notebooks/cookbooks/configs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"__Contents__\n",
"\n",
" - No Config Behaviour: An example of what happens when a model component does not have a config file.\n",
" - Template: A template config file for specifying default model component priors.\n",
" - Templates: A template config file for specifying default model component priors.\n",
" - Modules: Writing prior config files based on the Python module the model component Python class is contained in.\n",
" - Labels: Config files which specify the labels of model component parameters for visualization."
]
Expand Down Expand Up @@ -112,7 +112,33 @@
"source": [
"model = af.Model(GaussianNoConfig)\n",
"\n",
"dataset_path = path.join(\"dataset\", \"example_1d\", \"gaussian_x1\")\n",
"dataset_path = path.join(\"dataset\", \"example_1d\", \"gaussian_x1\")"
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"__Dataset Auto-Simulation__\n",
"\n",
"If the dataset does not already exist on your system, it will be created by running the corresponding\n",
"simulator script. This ensures that all example scripts can be run without manually simulating data first."
]
},
{
"cell_type": "code",
"metadata": {},
"source": [
"if not path.exists(dataset_path):\n",
" import subprocess\n",
" import sys\n",
" subprocess.run(\n",
" [sys.executable, \"scripts/simulators/simulators.py\"],\n",
" check=True,\n",
" )\n",
"\n",
"data = af.util.numpy_array_from_json(file_path=path.join(dataset_path, \"data.json\"))\n",
"noise_map = af.util.numpy_array_from_json(\n",
" file_path=path.join(dataset_path, \"noise_map.json\")\n",
Expand Down
3 changes: 2 additions & 1 deletion notebooks/cookbooks/model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
" - Instances (af.Array): Create an instance of a numpy array model via input parameters.\n",
" - Model Customization (af.Array): Customize a numpy array model (e.g. fixing parameters or linking them to one another).\n",
" - Json Output (af.Array): Output a numpy array model in human readable text via a .json file and loading it back again.\n",
" - Extensible Models (af.Array): Using numpy arrays to compose models with a flexible number of parameters."
" - Extensible Models (af.Array): Using numpy arrays to compose models with a flexible number of parameters.\n",
" - Wrap Up: A summary of model composition in PyAutoFit."
]
},
{
Expand Down
Loading