.. _chapter_phase_api:

Chapter: Phase API
==================

In this chapter, we introduce you to the **PyAutoFit** phase API, which long-term software projects can adopt to interface
**PyAutoFit** directly with your software and provide a better management of many of model composition and fitting,
such as visualization, outputting results in a structured format and augmenting data before a fit.

You can start the tutorials right now by going to `our binder <https://mybinder.org/v2/gh/Jammy2211/autofit_workspace/HEAD>`_
and navigating to the folder ``notebooks/howtofit/chapter_phase_api``. They are also on the `autofit_workspace <https://github.com/Jammy2211/autofit_workspace>`_.

The chapter contains the following tutorials:

`Tutorial 1: Source Code <https://github.com/Jammy2211/autofit_workspace/blob/master/notebooks/howtofit/chapter_phase_api/tutorial_1_source_code.ipynb>`_
- How the source code of your software project should be structure to best use **PyAutoFit**.

`Tutorial 2: Visualization and Configs <https://github.com/Jammy2211/autofit_workspace/blob/master/notebooks/howtofit/chapter_phase_api/tutorial_2_visualization_and_configs.ipynb>`_
- How to set up your project to visualize results and use configuration files.

`Tutorial 3: Phase Customization <https://github.com/Jammy2211/autofit_workspace/blob/master/notebooks/howtofit/chapter_phase_api/tutorial_3_phase_customization.ipynb>`_
- Augmenting the ``data`` and customizing the likelihood function of a model-fit.

`Tutorial 4: Aggregator <https://github.com/Jammy2211/autofit_workspace/blob/master/notebooks/howtofit/chapter_phase_api/tutorial_4_aggregator.ipynb>`_
- Designing your project to be exploit **PyAutoFit**'s `Aggregator`.