Skip to content
Merged
5 changes: 3 additions & 2 deletions config/notation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
# For example, if `centre=x`, the plot axis will be labeled 'x'.


# superscript: the superscript used on certain plots that show the results of different model-components.
# superscript: the class abbreviation used for priors directly on an unnamed Model.
# Named components use their model path instead (for example lens.bulge or source.pix.reg).

# For example, if `Gaussian=g`, plots where the parameters of the Gaussian model-component have superscript `g`.
# For example, `Gaussian=g` labels an unnamed Gaussian Model with superscript `g`.

label:
label:
Expand Down
7 changes: 4 additions & 3 deletions config/output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,14 @@ start_point: true
# manually after completing a successful model-fit. This will save computational run time by not computing latent
# variables during a any model-fit which is unsuccessful.

latent_during_fit: false # Whether to output the `latent.csv`, `latent.results` and `latent_summary.json` files during the fit when it performs on-the-fly output.
latent_after_fit: true # If `latent_during_fit` is False, whether to output the `latent.csv`, `latent.results` and `latent_summary.json` files after the fit is complete.
latent_during_fit: false # Write configured latent output during fit updates; also make the latent corner plot during updates if corner_anesthetic_latent is enabled.
latent_after_fit: true # Write configured latent output after completion. Full-sample mode writes files/latent/samples.csv; summaries use latent.results and files/latent/latent_summary.json.
latent_draw_via_pdf : true # Whether to draw latent variable values via the PDF of every sample, which uses fewer samples to estimate latent variable errors. If False, latent variable values are drawn from every sample.
latent_draw_via_pdf_size : 100 # The number of samples drawn to estimate latent variable errors if `latent_draw_via_pdf` is True.
latent_csv: true # Whether to ouptut the `latent.csv` file.
latent_results: true # Whether to output the `latent.results` file.
latent_model_parameters: true # Include model-declared columns in configured latent output. Full-sample CSV: files/latent/samples.csv. Saved angles retain their conversion range; only plots recentre them.

# Other Files:

search_log: true # `search.log`: logging produced whilst running the fit method
search_log: true # `search.log`: logging produced whilst running the fit method
3 changes: 3 additions & 0 deletions config/visualize/plots_search.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
nest:
corner_anesthetic: true # Output corner figure (using anestetic) during a non-linear search fit?
corner_anesthetic_components: true # Also output one corner figure per top-level model component (e.g. per galaxy), each named corner_anesthetic_<component>? Follows corner_anesthetic when absent.
corner_anesthetic_latent: false # Output corner_anesthetic_latent after completion for declared latent parameters; during the fit only if output.yaml's latent_during_fit is enabled. Independent of the ordinary corner switches.
corner_anesthetic_latent_components: true # With corner_anesthetic_latent, also output one latent corner figure per top-level component that has a latent parameter, each named corner_anesthetic_latent_<component>? Follows corner_anesthetic_latent when absent.
mcmc:
corner_cornerpy: true # Output corner figure (using corner.py) during a non-linear search fit?
mle:
Expand Down
16 changes: 14 additions & 2 deletions notebooks/chapter_2_modeling/tutorial_2_practicalities.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,20 @@
"The plot is labeled with short hand parameter names (e.g. `sersic_index` is mapped to the short hand\n",
"parameter `n`). These mappings are specified in the `config/notation.yaml` file and can be customized by users.\n",
"\n",
"The superscripts of labels correspond to the name each component was given in the model (e.g. for the `Sersic`\n",
"bulge its name `bulge` defined when making the `Model` above is used).\n",
"The superscripts of labels are the path of names each component was given in the model (e.g. for the `Sersic`\n",
"bulge, `galaxy.bulge`: the galaxy's name `galaxy` and its name `bulge` defined when making the `Model` above).\n",
"\n",
"Components in different named galaxy or profile paths can be distinguished by their superscripts. Profiles within\n",
"the same path, such as Gaussians in a basis, can share a superscript. When the model has more than one top-level\n",
"component, each also gets its own\n",
"corner plot in the output folder (`corner_anesthetic_<component>.png`, switched in `config/visualize/plots_search.yaml`).\n",
"\n",
"The parameters a model is sampled in are not always the ones it is read in: a profile's elliptical components are an\n",
"axis ratio and a position angle. Passing `latent=True` to `corner_anesthetic` plots these latent parameters instead.\n",
"The same figure is written to the output folder as `corner_anesthetic_latent.png` when `corner_anesthetic_latent`\n",
"is switched on in `config/visualize/plots_search.yaml` (off by default), once the fit is complete. With\n",
"`latent_model_parameters` enabled, full-sample latent output (`latent_draw_via_pdf: false`) writes these columns\n",
"to `files/latent/samples.csv`. Only the plot recentres periodic angles; saved values keep the conversion's range.\n",
"\n",
"__Other Practicalities__\n",
"\n",
Expand Down
16 changes: 14 additions & 2 deletions scripts/chapter_2_modeling/tutorial_2_practicalities.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,20 @@
The plot is labeled with short hand parameter names (e.g. `sersic_index` is mapped to the short hand
parameter `n`). These mappings are specified in the `config/notation.yaml` file and can be customized by users.

The superscripts of labels correspond to the name each component was given in the model (e.g. for the `Sersic`
bulge its name `bulge` defined when making the `Model` above is used).
The superscripts of labels are the path of names each component was given in the model (e.g. for the `Sersic`
bulge, `galaxy.bulge`: the galaxy's name `galaxy` and its name `bulge` defined when making the `Model` above).

Components in different named galaxy or profile paths can be distinguished by their superscripts. Profiles within
the same path, such as Gaussians in a basis, can share a superscript. When the model has more than one top-level
component, each also gets its own
corner plot in the output folder (`corner_anesthetic_<component>.png`, switched in `config/visualize/plots_search.yaml`).

The parameters a model is sampled in are not always the ones it is read in: a profile's elliptical components are an
axis ratio and a position angle. Passing `latent=True` to `corner_anesthetic` plots these latent parameters instead.
The same figure is written to the output folder as `corner_anesthetic_latent.png` when `corner_anesthetic_latent`
is switched on in `config/visualize/plots_search.yaml` (off by default), once the fit is complete. With
`latent_model_parameters` enabled, full-sample latent output (`latent_draw_via_pdf: false`) writes these columns
to `files/latent/samples.csv`. Only the plot recentres periodic angles; saved values keep the conversion's range.

__Other Practicalities__

Expand Down
Loading