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.


The Xtraction object for which the documentation shall be generated.


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

contentSubFile or str
markstr, optional

If given this string is replaced with file_name in mark_in_file.


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


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

parametersMcParameterCollection, [McParameter]

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


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.

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.


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


Write all the tex files but do not build them.