A description of the general.ini config.

[output]

    NOTE : LOGGING IS CURRENTLY DISABLED IN PYAUTOLENS AND THE 3 log_ CONFIG PARAMETERS BELOW ARE PLACEHOLDERS UNTIL
     IT IS REIMPLEMETED.

    log_interval : int

        The number of new best-fit (e.g. highest log likelihood) models that must be sampled for PyAutoLens to log the
        results to the Python interpreter.

        A log_interval of -1 turns off logging.

    log_file : str

        The file name the logged output is written to (in the phase folder).

    log_level : str

        The level of logging.

    backup_interval : int

        The number of new best-fit (e.g. highest log likelihood) models that must be sampled for PyAutoLens to backup the
        results to the optimizer_backup folder of the phase.

        A backup_interval of -1 turns off backups.

    grid_results_interval : int

        For a GridSearch non-linear optimization (currently not used in any template PyAutoLens pipelines) this
        interval sets after how many samples on the grid output is performed for.

        A grid_results_interval of -1 turns off output.

    model_results_output_interval : int

        The number of new best-fit (e.g. highest log likelihood) models that must be sampled for PyAutoLens to output a new
        model.results file using the latest MultiNest samples and thus most up to data PDFs.

        A model_results_output_interval of -1 turns off backups.

    model_results_decimal_places : int

        The number of decimal places the estimate values and errors of all parameters in the model.results file are
        output to.

    remove_files : bool

        If True, all output files of a phase (e.g. optimizer, optimizer_backup, model.results, images, etc.) are
        deleted once the phase has completed.

        A .zip file of all output is always written at the phase before files are removed, thus results are not lost
        with this option turned on. If a PyAutoLens does not find the output files of a phase (because they were
        removed) but does find its .zip file, it will unzip the contents and continue the analysis as if the files were
        there all along.

        This feature was implemented because super-computers often have a limit on the number of files allowed per
        user and the large number of files output by PyAutoLens can exceed this limit. By removing files the
        number of files is restricted only to the .zip files.

[numba]

    Numba is a libray used by PyAutoLens for optimizing code. In a nutshell, it converts Python functions to C function
    before run-time permitting extremely fast code. See http://numba.pydata.org/

    nopython : bool

        If True, functions which hve a numba decorator must not convert back to Python during a run and thus must stay
        100% C. All PyAutoLens functions were developed with nopython mode turned on.

    cache : bool

        If True, the C version of numba-fied functions are cached on the hard-disk so they do not need to be
        re-numbafied every time PyAutoLens is rerun. If False, the first time every function is run will have a small
        delay (0.1-1.0 seconds) as it has to be numba-fied again.

    parallel : bool

        If True, numba will parallelize the function such that the calculation is multi-threaded if multiple CPUs are
        available or the hardware architecture necessary for multi-threading is available.

        I recommend parallel=False for the following use-cases:

            - For running PyAutoLens on a laptop, where parallel CPU use will use all CPUs available and degrade
              general laptop performance.

            - When using PyAutoLens on a super computer and fitting many images, such that it is feasible to analyse
              every image as a serial job on 1 CPU each.

        I recommend using parallel=True for the following use-case:

            - When modeling 1 (or a few) lenses on a super computer node with many more CPU's than images being fitted.

            - For modeling extremely high resolution data (e.g. pixel scales of 0.01") or interferometer data, where
              fast run times are unfeasible for 1 CPU.

        We are constantly learning better ways to use multi-threading with PyAutoLens. If you think you have an ideal
        use case or ideas of how to better optimize PyAutoLens please contact me on SLACK about it!


[calculation_grid]

    The calculation grid is used to compute lensing quantities that do not inherently need a grid to be passed to them
    for them to be calculated. For example, the critical curves and caustics of a mass model should be computed in
    a way that does not need a grid to be input.

    The calculation grid is the homogenous grid used to calculate all lensing quantities of this nature. It is computed
    as follows:

    1) Draw a rectangular 'bounding box' around the mass profile's convergence profile, where the four side of the
       the box are at threshold values of convergence.

    2) Use a grid of this box to compute the desired lensing quantity (e.g. the critical curve).

    In a future version of PyAutoLens the calculation grid will be adaptive, such that the values input into this config
    file are the desired precision of the quantitiy being calculated (e.g. the area of the critical curve should not
    change as the grid resolution is increased within a threshold value). Unfortunately, we've not yet had time
    to implement this adaptive grid.

    convergence_threshold : float

        The threshold value of convergence at which the 4 sides of the bounding box described above are located.

    pixels : int

        The shape_2d of the grid inside the bounding box from which the lensing quantitiy is computed (e.g. it is shape
        (pixels, pixels)).

[inversion]

    interpolated_grid_shape : str {image_grid, source_grid}

        In order to output inversion reconstructions (which could be on a Voronoi grid) to a .fits file, the
        reconstruction is interpolated to a square grid of pixels. This option determines this grid:

            image_grid - The interpolated grid is the same shape, resolution and centering as the observed image-data.

            source_grid - The interpolated grid is zoomed to over-lay the source-plane reconstructed source and uses
                          dimensions derived from the number of pixels used by the reconstruction.

    inversion_pixel_limit_overall : int

        The maximum number of pixels that may be assumed for an inversion during a non-linear search fit.

[hyper]

    When creating hyper-images (see howtolens/chapter_5) all flux values below a certain value are rounded up an input
    value. This prevents negative flux values negatively impacting hyper-mode features or zeros creating division
    by zero errors.

    The value pixels are rounded to are the maximum flux value in the hyper image multipled by an input percentage
    value.

    hyper_minimum_percent : float

        The minimum percentage value the hyper image is mulitpled by in order to determine the value fluxes are rounded
        up to.