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
12 changes: 3 additions & 9 deletions docs/api/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ Data Structures
2D Data Structures
------------------

Two-dimensional data structures store and mask 2D arrays containing data (e.g. images) and
grids of (y,x) Cartesian coordinates.
Two-dimensional data structures store and mask 2D arrays containing data (e.g. images).

.. currentmodule:: autocti

Expand All @@ -17,8 +16,6 @@ grids of (y,x) Cartesian coordinates.

Mask2D
Array2D
Grid2D
Grid2DIrregular

Charge Injection Imaging
------------------------
Expand All @@ -36,8 +33,7 @@ For charge injection datasets taken with a CCD (or similar imaging device).
1D Data Structures
------------------

One-dimensional data structures store and mask 1D arrays containing data (e.g. 1D CTI datasets
images) and grids of (y,x) Cartesian coordinates.
One-dimensional data structures store and mask 1D arrays containing data (e.g. 1D CTI datasets).

.. autosummary::
:toctree: _autosummary
Expand All @@ -47,7 +43,6 @@ images) and grids of (y,x) Cartesian coordinates.
Mask1D
Array1D
ArrayIrregular
Grid1D

Dataset 1D
----------
Expand All @@ -58,6 +53,5 @@ For 1D datasets.
:toctree: generated/

Dataset1D
LayoutDataset1D
SettingsDataset1D
Layout1D
SimulatorDataset1D
170 changes: 83 additions & 87 deletions docs/api/plot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,133 +2,129 @@
Plotting
========

**PyAutoCTI** custom visualization library.
Create figures and subplots of **PyAutoCTI** datasets, fits and non-linear search results.

Step-by-step Juypter notebook guides illustrating all objects listed on this page are
provided on the `autocti_workspace: plot tutorials <https://github.com/Jammy2211/autocti_workspace/tree/release/notebooks/plot>`_ and
it is strongly recommended you use those to learn plot customization.
The plotting API is **functional**: import ``autocti.plot`` and call a plot function directly, passing it the
dataset or fit to plot. There are no ``Plotter`` classes to configure first.

.. code-block:: python

import autocti.plot as aplt

aplt.subplot_imaging_ci(dataset=dataset)
aplt.subplot_fit_ci(fit=fit, output_path="output", output_format="png")

By default a figure is shown interactively. Pass ``output_path`` and ``output_format`` (e.g. ``"png"`` or
``"pdf"``) to write it to disk instead.

**Examples / Tutorials:**

- `autocti_workspace: plot tutorials <https://github.com/Jammy2211/autocti_workspace/tree/release/notebooks/plot>`_
- `autocti_workspace: plot tutorials <https://github.com/PyAutoLabs/autocti_workspace/tree/main/notebooks/plot>`_

Plotters [aplt]
---------------
Dataset 1D [aplt]
-----------------

Create figures and subplots showing quantities of standard **PyAutoCTI** objects.
Plot a one-dimensional CTI dataset (``Dataset1D``) and its fit (``FitDataset1D``).

.. currentmodule:: autocti.plot

**Dataset:**

.. autosummary::
:toctree: _autosummary
:template: custom-class-template.rst
:recursive:

Array2DPlotter
Array1DPlotter
YX1DPlotter
Dataset1DPlotter
FitDataset1DPlotter
ImagingCIPlotter
FitImagingCIPlotter
MultiFigurePlotter
MultiYX1DPlotter

Non-linear Search Plotters [aplt]
---------------------------------
figure_dataset_1d_data
subplot_dataset_1d
subplot_dataset_1d_list

Create figures and subplots of non-linear search specific visualization of every search algorithm supported
by **PyAutoCTI**.

.. currentmodule:: autocti.plot
**Fit:**

.. autosummary::
:toctree: _autosummary
:template: custom-class-template.rst
:recursive:

NestPlotter
MCMCPlotter
MLEPlotter
figure_fit_dataset_1d
subplot_fit_dataset_1d
subplot_fit_dataset_1d_list
fits_fit_dataset_1d

Plot Customization [aplt]
-------------------------
Charge Injection Imaging [aplt]
-------------------------------

Customize figures created via ``Plotter`` objects, including changing ``matplotlib`` settings and adding
visuals to figures.
Plot charge injection imaging (``ImagingCI``) and its fit (``FitImagingCI``), either the whole frame or one
region of it (e.g. the parallel FPR or EPER).

.. currentmodule:: autocti.plot
**Dataset:**

.. autosummary::
:toctree: _autosummary
:template: custom-class-template.rst
:recursive:

MatPlot1D
MatPlot2D
Include1D
Include2D
Visuals1D
Visuals2D
figure_imaging_ci_data_region
figure_pre_cti_data_residual_map
subplot_imaging_ci
subplot_imaging_ci_region
subplot_imaging_ci_data_binned
subplot_imaging_ci_list
subplot_imaging_ci_data_region_list

Matplot Lib Wrappers [aplt]
---------------------------
**Fit:**

Wrappers for every ``matplotlib`` function used by a ``Plotter``, allowing for detailed customization of
every figure and subplot.
.. autosummary::
:toctree: _autosummary

.. currentmodule:: autocti.plot
figure_fit_ci_region
subplot_fit_ci
subplot_fit_ci_region
subplot_noise_scaling_map_dict
subplot_fit_ci_list
subplot_fit_ci_region_list
fits_fit_ci

General Plot Functions [aplt]
-----------------------------

**Matplotlib Wrapper Base Objects:**
Lower-level functions the plots above are built from, for plotting any array or (y,x) line yourself.

.. autosummary::
:toctree: _autosummary
:template: custom-class-template.rst
:recursive:

Units
Figure
Axis
Cmap
Colorbar
ColorbarTickParams
TickParams
YTicks
XTicks
Title
YLabel
XLabel
Legend
Output

**Matplotlib Wrapper 1D Objects:**
plot_array
plot_yx
plot_cti_1d
subplot_save

Non-linear Search Plots [aplt]
------------------------------

Plots of a completed non-linear search, re-exported from **PyAutoFit**. Pass them the ``Samples`` of a fit.

.. autosummary::
:toctree: _autosummary
:template: custom-class-template.rst
:recursive:

YXPlot
corner_cornerpy
corner_anesthetic
subplot_parameters
log_likelihood_vs_iteration

Figure Output [aplt]
--------------------

The shared helper that shows a figure or writes it to ``path/filename.format``:

.. autosummary::
:toctree: _autosummary

output_figure

Visualization During a Fit [aplt]
---------------------------------

**Matplotlib Wrapper 2D Objects:**
The classes a model-fit uses to write its on-the-fly visualization. You do not normally create these
yourself; the ``Analysis`` classes do.

.. autosummary::
:toctree: _autosummary
:template: custom-class-template.rst
:recursive:

ArrayOverlay
GridScatter
GridPlot
VectorYXQuiver
PatchOverlay
VoronoiDrawer
OriginScatter
MaskScatter
BorderScatter
PositionsScatter
IndexScatter
MeshGridScatter
ParallelOverscanPlot
SerialPrescanPlot
SerialOverscanPlot
PlotterDataset1D
PlotterImagingCI
Loading