diff --git a/docs/api/data.rst b/docs/api/data.rst index 3811b591..f06a47db 100644 --- a/docs/api/data.rst +++ b/docs/api/data.rst @@ -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 @@ -17,8 +16,6 @@ grids of (y,x) Cartesian coordinates. Mask2D Array2D - Grid2D - Grid2DIrregular Charge Injection Imaging ------------------------ @@ -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 @@ -47,7 +43,6 @@ images) and grids of (y,x) Cartesian coordinates. Mask1D Array1D ArrayIrregular - Grid1D Dataset 1D ---------- @@ -58,6 +53,5 @@ For 1D datasets. :toctree: generated/ Dataset1D - LayoutDataset1D - SettingsDataset1D + Layout1D SimulatorDataset1D \ No newline at end of file diff --git a/docs/api/plot.rst b/docs/api/plot.rst index 28b22753..19ef5cc1 100644 --- a/docs/api/plot.rst +++ b/docs/api/plot.rst @@ -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 `_ 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 `_ +- `autocti_workspace: plot tutorials `_ -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 \ No newline at end of file + PlotterDataset1D + PlotterImagingCI