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
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@
"\n",
"samples = samples.with_paths([(\"gaussian\", \"centre\")])\n",
"\n",
"print(\"All parameters of the very first sample (containing only the Gaussian centre.\")\n",
"print(\"All parameters of the very first sample (containing only the Gaussian centre).\")\n",
"print(samples.parameter_lists[0])\n",
"\n",
"print(\"Maximum Log Likelihood Model Instances (containing only the Gaussian centre):\\n\")\n",
Expand All @@ -928,7 +928,7 @@
"Above, we specified each path as a list of tuples of strings. \n",
"\n",
"This is how the source code internally stores the path to different components of the model, but it is not \n",
"in-profile_1d with the PyAutoFIT API used to compose a model.\n",
"in-line with the PyAutoFit API used to compose a model.\n",
"\n",
"We can alternatively use the following API:"
]
Expand All @@ -954,7 +954,11 @@
"Above, we filtered the `Samples` but asking for all parameters which included the path (\"gaussian\", \"centre\").\n",
"\n",
"We can alternatively filter the `Samples` object by removing all parameters with a certain path. Below, we remove\n",
"the Gaussian's `centre` to be left with 2 parameters; the `normalization` and `sigma`."
"the Gaussian's `centre`.\n",
"\n",
"Recall that the model fitted in this tutorial has two components, a `Gaussian` and an `Exponential`, and therefore\n",
"6 parameters in total. Removing one of them therefore leaves us with 5 parameters: the Gaussian's `normalization`\n",
"and `sigma`, plus all three of the Exponential's parameters."
]
},
{
Expand All @@ -972,7 +976,7 @@
"samples = samples.without_paths([\"gaussian.centre\"])\n",
"\n",
"print(\n",
" \"All parameters of the very first sample (containing only the Gaussian normalization and sigma).\"\n",
" \"All parameters of the very first sample (with the Gaussian centre removed).\"\n",
")\n",
"print(samples.parameter_lists[0])"
],
Expand Down
12 changes: 8 additions & 4 deletions scripts/chapter_1_introduction/tutorial_5_results_and_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ def model_data_from(self, xvalues: np.ndarray):

samples = samples.with_paths([("gaussian", "centre")])

print("All parameters of the very first sample (containing only the Gaussian centre.")
print("All parameters of the very first sample (containing only the Gaussian centre).")
print(samples.parameter_lists[0])

print("Maximum Log Likelihood Model Instances (containing only the Gaussian centre):\n")
Expand All @@ -636,7 +636,7 @@ def model_data_from(self, xvalues: np.ndarray):
Above, we specified each path as a list of tuples of strings.

This is how the source code internally stores the path to different components of the model, but it is not
in-profile_1d with the PyAutoFIT API used to compose a model.
in-line with the PyAutoFit API used to compose a model.

We can alternatively use the following API:
"""
Expand All @@ -651,7 +651,11 @@ def model_data_from(self, xvalues: np.ndarray):
Above, we filtered the `Samples` but asking for all parameters which included the path ("gaussian", "centre").

We can alternatively filter the `Samples` object by removing all parameters with a certain path. Below, we remove
the Gaussian's `centre` to be left with 2 parameters; the `normalization` and `sigma`.
the Gaussian's `centre`.

Recall that the model fitted in this tutorial has two components, a `Gaussian` and an `Exponential`, and therefore
6 parameters in total. Removing one of them therefore leaves us with 5 parameters: the Gaussian's `normalization`
and `sigma`, plus all three of the Exponential's parameters.
"""
samples = result.samples

Expand All @@ -664,7 +668,7 @@ def model_data_from(self, xvalues: np.ndarray):
samples = samples.without_paths(["gaussian.centre"])

print(
"All parameters of the very first sample (containing only the Gaussian normalization and sigma)."
"All parameters of the very first sample (with the Gaussian centre removed)."
)
print(samples.parameter_lists[0])

Expand Down
Loading