Overview
PyAutoFit PR PyAutoLabs/PyAutoFit#1174 replaced the class-based plotting API (NestPlotter, MCMCPlotter, MLEPlotter, SamplesPlotter) with simple module-level functions (e.g. aplt.corner_anesthetic(samples=s)). The autofit_workspace still uses the old class-based API in several scripts and has stale docstrings referencing the removed classes. This task updates all workspace scripts to use the new flat function API.
Plan
- Migrate 6 scripts that still instantiate old plotter classes to the new flat function API
- Update docstrings/comments in all 6
scripts/plot/*.py files that reference old class names
- Regenerate notebooks from updated scripts
- Verify no references to old plotter classes remain
Detailed implementation plan
Affected Repositories
- autofit_workspace (primary)
Work Classification
Workspace
Branch Survey
| Repository |
Current Branch |
Dirty? |
| autofit_workspace |
main |
smoke_tests.txt modified |
Suggested branch: feature/plot-api-update
Implementation Steps
-
scripts/cookbooks/samples.py — Replace plotter = aplt.MCMCPlotter(samples=result.samples); plotter.corner_cornerpy() with aplt.corner_cornerpy(samples=result.samples). Update docstring.
-
scripts/cookbooks/search.py — Replace plotter = aplt.MCMCPlotter(samples=samples); plotter.corner_cornerpy(...) with aplt.corner_cornerpy(samples=samples, ...). Update docstring.
-
scripts/overview/overview_1_the_basics.py — Replace plotter = aplt.NestPlotter(samples=result.samples); plotter.corner_anesthetic() with aplt.corner_anesthetic(samples=result.samples).
-
scripts/howtofit/chapter_1_introduction/tutorial_5_results_and_samples.py — Replace plotter = aplt.MCMCPlotter(samples=result.samples); plotter.corner_cornerpy() with aplt.corner_cornerpy(samples=result.samples). Update docstring.
-
scripts/howtofit/chapter_3_graphical_models/tutorial_1_individual_models.py — Replace plotter = aplt.NestPlotter(samples=samples); plotter.corner_cornerpy() with aplt.corner_cornerpy(samples=samples).
-
scripts/howtofit/chapter_3_graphical_models/tutorial_3_graphical_benefits.py — Replace plotter = aplt.NestPlotter(samples=result_list[0].samples); plotter.corner_cornerpy() with aplt.corner_cornerpy(samples=result_list[0].samples).
-
scripts/plot/*.py (6 files) — Update docstrings only (DynestyPlotter, NautilusPlotter, UltraNestPlotter, EmceePlotter, ZeusPlotter, PySwarmsPlotter).
-
Regenerate notebooks from scripts.
Key Files
scripts/cookbooks/samples.py
scripts/cookbooks/search.py
scripts/overview/overview_1_the_basics.py
scripts/howtofit/chapter_1_introduction/tutorial_5_results_and_samples.py
scripts/howtofit/chapter_3_graphical_models/tutorial_1_individual_models.py
scripts/howtofit/chapter_3_graphical_models/tutorial_3_graphical_benefits.py
scripts/plot/DynestyPlotter.py
scripts/plot/NautilusPlotter.py
scripts/plot/UltraNestPlotter.py
scripts/plot/EmceePlotter.py
scripts/plot/ZeusPlotter.py
scripts/plot/PySwarmsPlotter.py
Original Prompt
Click to expand starting prompt
The following issue implements a plot interface udpate PyAutoLabs/PyAutoFit#1174
This never got implemented in @autofit_workspace, so we just need to apply the API updates there.
Do a quick check locally that indeed the old API is still present.
Overview
PyAutoFit PR PyAutoLabs/PyAutoFit#1174 replaced the class-based plotting API (
NestPlotter,MCMCPlotter,MLEPlotter,SamplesPlotter) with simple module-level functions (e.g.aplt.corner_anesthetic(samples=s)). The autofit_workspace still uses the old class-based API in several scripts and has stale docstrings referencing the removed classes. This task updates all workspace scripts to use the new flat function API.Plan
scripts/plot/*.pyfiles that reference old class namesDetailed implementation plan
Affected Repositories
Work Classification
Workspace
Branch Survey
Suggested branch:
feature/plot-api-updateImplementation Steps
scripts/cookbooks/samples.py— Replaceplotter = aplt.MCMCPlotter(samples=result.samples); plotter.corner_cornerpy()withaplt.corner_cornerpy(samples=result.samples). Update docstring.scripts/cookbooks/search.py— Replaceplotter = aplt.MCMCPlotter(samples=samples); plotter.corner_cornerpy(...)withaplt.corner_cornerpy(samples=samples, ...). Update docstring.scripts/overview/overview_1_the_basics.py— Replaceplotter = aplt.NestPlotter(samples=result.samples); plotter.corner_anesthetic()withaplt.corner_anesthetic(samples=result.samples).scripts/howtofit/chapter_1_introduction/tutorial_5_results_and_samples.py— Replaceplotter = aplt.MCMCPlotter(samples=result.samples); plotter.corner_cornerpy()withaplt.corner_cornerpy(samples=result.samples). Update docstring.scripts/howtofit/chapter_3_graphical_models/tutorial_1_individual_models.py— Replaceplotter = aplt.NestPlotter(samples=samples); plotter.corner_cornerpy()withaplt.corner_cornerpy(samples=samples).scripts/howtofit/chapter_3_graphical_models/tutorial_3_graphical_benefits.py— Replaceplotter = aplt.NestPlotter(samples=result_list[0].samples); plotter.corner_cornerpy()withaplt.corner_cornerpy(samples=result_list[0].samples).scripts/plot/*.py(6 files) — Update docstrings only (DynestyPlotter, NautilusPlotter, UltraNestPlotter, EmceePlotter, ZeusPlotter, PySwarmsPlotter).Regenerate notebooks from scripts.
Key Files
scripts/cookbooks/samples.pyscripts/cookbooks/search.pyscripts/overview/overview_1_the_basics.pyscripts/howtofit/chapter_1_introduction/tutorial_5_results_and_samples.pyscripts/howtofit/chapter_3_graphical_models/tutorial_1_individual_models.pyscripts/howtofit/chapter_3_graphical_models/tutorial_3_graphical_benefits.pyscripts/plot/DynestyPlotter.pyscripts/plot/NautilusPlotter.pyscripts/plot/UltraNestPlotter.pyscripts/plot/EmceePlotter.pyscripts/plot/ZeusPlotter.pyscripts/plot/PySwarmsPlotter.pyOriginal Prompt
Click to expand starting prompt
The following issue implements a plot interface udpate PyAutoLabs/PyAutoFit#1174
This never got implemented in @autofit_workspace, so we just need to apply the API updates there.
Do a quick check locally that indeed the old API is still present.