.. _files_generated_by_fitsum_script:

Files Generated by Fitsum Script
=================================
    
This section discusses how the :ref:`fitsum_script` saves files to disk, if you want to see an example of a :ref:`fitsum_script` created by a :ref:`fit_script`, see :ref:`builtin_fit_example`.
    
If you run a :ref:`fitsum_script` using the following command:-
    
.. code-block:: console

    $ popy_run my_fitsum_script.pyml
    
files and folders will be created on disk (within the same folder as the script) as follows:-
    
.. code-block:: console
    
    build
    src
    my_fitsum_script.pyml.html
    my_fitsum_script.pyml.run.main.log
    sphinx.log

Here 'src' contains files copied from the output of the parent :ref:`fit_script` and some automatically generated .rst files. 

The 'build' folder is the output of running |sphinx| on the 'src' files. Sphinx is a utility for processing .rst files into |html| and optionally other formats. The main output of running sphinx is here:-

.. code-block:: console

    build/
        html/
            index.html

Here 'sphinx.log' is the log file for |sphinx| and 'my_fitsum_script.pyml.run.main.log' is the log file for the :ref:`fitsum_script`.

You can view the summary of the fit/sim output to :term:`HTML` files by typing:-

.. code-block:: console

    $ popy_view my_fitsum_script.pyml.html
            
Which should look something like :ref:`sum_link_builtin_fit_example_fit`.
