• Language: en

FILE_PATHS

This required field, defines where any input files can be found and where the results of the computation are to be stored.

Example from FILE_PATHS from a Fit Script

FILE_PATHS:
    # path to input comma separated value file in popy data format
    input_data_file: builtin_fit_example_data.csv

    # Output folder - results of computation stored here
    output_folder: auto

    # Temp folder - temporary files stored here
    temp_folder: auto

    # Output file extension - determines graphical output file format.
    output_file_ext: ['svg', 'pdf']

    # Solution containing f[X] values from a previous run.
    input_solution_file: none

Main FILE_PATH Fields

input_file

Required path to input a .csv file in popy data format:-

input_data_file: builtin_fit_example_data.csv

Note that this field is required and the .csv file must exist else PoPy will throw an error message.

output_folder

Optional field that specifies the output folder, where the results of computation are stored.

The default is:-

output_folder: auto

Using auto will specify an output folder based on the script name. E.g if your script is called ‘my_fit_script.pyml’, the output folder will be:-

my_fit_script.pyml.output

Using auto is safest, as then it is impossible to over-write the output from other scripts.

temp_folder

Optional field that specifies the temp folder, where temporary functions generated by PoPy are stored.

The default is:-

temp_folder: auto

The default folder name is ‘_temp’ within the output_folder. If you have a script named ‘my_fit_script.pyml’ and miss out the ‘output_folder’ and ‘temp_folder’ you will end up with temporary functions in this folder:-

my_fit_script.pyml.output
    /fit
        /_temp

Note the subfolders within ‘_temp’ have random names, this is to avoid re-using old temporary functions if the same script is run twice (and altered slightly).

output_file_ext

This is an optional list of file types to output when plotting. The default is:-

output_file_ext: ['svg']

This outputs plots in .svg format, which stands for scalable vector graphics, see:-

https://en.wikipedia.org/wiki/Scalable_Vector_Graphics

.svg is a good format because it can be displayed at any resolution without being pixelated. For example if you used .png or any other raster format.

The input is a Python list. This is to enable you to output plots in multiple formats. For example many of the documentation examples use the following:-

output_file_ext: ['svg', 'pdf']

To generate plots in .svg and also .pdf format. We do this with the documentation so that the HTML documentation can display .svg and the pdf version can use .pdf plots.

input_solution_file

This field is only available in the Fit Script. It is an optional link to a ‘solution.pyml’ file to initialise the f[X] starting values during a fit. The default is:-

input_solution_file: none

This does nothing and uses the f[X] starting values specified in the EFFECTS section of the script.

If a solution file is specified, e.g.:-

input_solution_file: ./previous_fit_script.pyml_output/solN/solution.pyml

Then the ‘solution.pyml’ file will be loaded, specifically the ‘fx_params.csv’ part of the solution.

FILE_PATHS:
    fx_params_path: fx_params.csv

The f[X] params are used as new starting values.

You can use the ‘input_solution_file’ to restart a Fit Script from a previous fitting script. This is useful if the previous script fails, for example if the machine is accidentally switched off or some other system failure.

Back to Top