Extraction documentation

Automatic documentation for the xtraction

class DMT.extraction.docu_xtraction.DocuXtraction(extraction, gui_extraction=None, dir_destination=None)[source]

Bases: object

This class implements routines for generating automated documentation of a Xtraction object. Xtraction objects represent a full parameter extraction flow.

Parameters:
extractionDMT.extraction.extraction.Xtraction

The Xtraction object for which the documentation shall be generated.

gui_extractionDMT.extraction.gui.XtractionGUI

The GUI in which the Xtraction object is being visualized.

dir_destinationstr, Path-like object

The destination path for writing the documentation to.

append(content, file_name, mark=None, mark_in_file='documentation.tex')[source]

Adds the content to a file and also start the build chain for self.build.

Ideally content is a

Parameters:
contentSubFile or str
file_namestr
markstr, optional

If given this string is replaced with file_name in mark_in_file.

mark_in_filestr

This file in the destination folder contains the “mark” string, which is replaced with “content”.

append_parameter_glossaries(parameters)[source]

Append model parameters to the parameter glossary defined in parameters.tex, if they are not already present

Parameters:
parametersMcParameterCollection, [McParameter]

A list of McParameter objects or an McParameterCollection which shall be appended to parameters.tex

build()[source]

Build each of the TEX files into a PDF.

copy_template(dir_destination=None, dir_source=None)[source]

Copies the autodoc template in DMT_extraction/autodoc_template to the destination folder.

Parameters:
dir_destinationstr, optional

Path to the destination directory. Is set to self.dir_destination.

dir_sourcestr, optional

Path to the template. If None, the config directory ‘autodoc’ is used. Per default this points into the DMT package.

create_subfiles()[source]

Creates the different Tex subfiles (https://ctan.org/pkg/subfiles) for the automated Xtraction tex documentation. For each XStep object in the Xtraction object:

  • create a subsection

  • print the extraction step description

  • print the plots related to the XStep

  • print the optimized modelcard parameters

generate_tex()[source]

Write all the tex files but do not build them.