cape.cfdx.options.Report: Automated report options

This module interfaces options for generating reports. Since many of the report options are common to different solvers, much of the report generation content is controlled here.

The function Report.SetSubfigDefaults() contains an extensive set of default options for each subfigure type. However, the docstring does not contain an outline or table of these, so interested users can refer to the JSON documentation or read the source code for that function.

Please see the page on report JSON settings for more information.

class cape.cfdx.options.Report.Report(**kw)

Dictionary-based interface for automatic report options

Call:
>>> opts = Report(**kw)
Inputs:
kw: dict

Dictionary of archive options

Outputs:
opts: cape.options.Report.Report

Automated report options interface

Versions:
  • 2016-30-02 @ddalle: Version 1.0

ModSubfigDefaults()

Modify subfigure defaults for a particular solver

If you are seeing this docstring, then there are no unique subfigure defaults for this solver

Call:
>>> opts.ModSubfigDefaults()
Inputs:
opts: cape.options.Report.Report

Options interface

Versions:
  • 2016-02-04 @ddalle: Version 1.0

SetSubfigDefaults()

Set subfigure default options

Call:
>>> opts.SetSubfigDefaults()
Inputs:
opts: cape.options.Options

Options interface

Effects:
opts.defns: dict

Default options for each subfigure type is set

Versions:
  • 2016-02-04 @ddalle: Version 1.0

get_FigAlignment(fig)

Get alignment for a figure

Call:
>>> algn = opts.get_FigAlignment(fig)
Inputs:
opts: Report

Options interface

fig: str

Name of figure

Outputs:
algn: str

Figure alignment

Versions:
  • 2015-03-08 @ddalle: Version 1.0

get_FigHeader(fig)

Get header (if any) for a figure

Call:
>>> lbl = opts.get_FigHeader(fig)
Inputs:
opts: Report

Options interface

fig: str

Name of figure

Outputs:
lbl: str

Figure header

Versions:
  • 2015-03-08 @ddalle: Version 1.0

get_FigList()

Get list of figures for a report

Call:
>>> figs = opts.get_FigList()
Inputs:
opts: Report

Options interface

Outputs:
figs: list[str]

List of figures by name

Versions:
  • 2015-03-08 @ddalle: Version 1.0

get_FigSubfigList(fig)

Get list of subfigures for a figure

Call:
>>> sfigs = opts.get_FigSubfigList(fig)
Inputs:
opts: Report

Options interface

fig: str

Name of figure

Outputs:
sfigs: list[str]

Figure header

Versions:
  • 2015-03-08 @ddalle: Version 1.0

get_Figure(fig)

Return an interface to an individual figure

Call:
>>> F = opts.get_Figure(fig)
Inputs:
opts: Report

Options interface

fig: str

Name of figure

Outputs:
F: dict

Options for figure fig

Versions:
  • 2015-03-08 @ddalle: Version 1.0

get_Report(rep)

Return an interface to an individual figure

Call:
>>> R = opts.get_Report(rep)
Inputs:
opts: Report

Options interface

fig: str

Name of figure

Outputs:
R: dict

Options for figure rep

Versions:
  • 2015-03-08 @ddalle: Version 1.0

get_ReportAffiliation(rep)

Get the author affiliation of a report

Call:
>>> afl = opts.get_ReportAffiliation(rep)
Inputs:
opts: cape.options.Options

Options interface

rep: str

Name of report

Outputs:
afl: str

Author affiliation for the report

Versions:
  • 2016-01-29 @ddalle: Version 1.0

get_ReportArchive()

Get the option of whether or not to archive report folders

Call:
>>> qtar = opts.get_ReportArchive()
Inputs:
opts: pycart.options.Options

Options interface

Outputs:
qtar: bool

Whether or not to tar archives

Versions:
  • 2015-03-08 @ddalle: Version 1.0

get_ReportAuthor(rep)

Get the title of a report

Call:
>>> auth = opts.get_ReportTitle(rep)
Inputs:
opts: Report

Options interface

rep: str

Name of report

Outputs:
auth: str

Report author

Versions:
  • 2015-03-08 @ddalle: Version 1.0

get_ReportErrorFigList(rep)

Get list of figures for cases marked FAIL

Call:
>>> figs = opts.get_ReportErrorFigList(rep)
Inputs:
opts: Report

Options interface

rep: str

Name of report

Outputs:
figs: list[str]

List of figures in the report

Versions:
  • 2015-03-08 @ddalle: Version 1.0

get_ReportFigList(rep)

Get list of figures in a report

Call:
>>> figs = opts.get_ReportFigList(rep)
Inputs:
opts: Report

Options interface

rep: str

Name of report

Outputs:
figs: list[str]

List of figures in the report

Versions:
  • 2015-03-08 @ddalle: Version 1.0

get_ReportFrontispiece(rep)

Get the frontispiece (i.e. title-page logo)

Call:
>>> fimg = opts.get_ReportLogo(rep)
Inputs:
opts: pycart.options.Options

Options interface

rep: str

Name of report

Outputs:
fimg: str

File name of frontispiece relative to report/ directory

Versions:
  • 2016-01-29 @ddalle: Version 1.0

get_ReportList()

Get list of reports available to create

Call:
>>> reps = opts.get_ReportList()
Inputs:
opts: Report

Options interface

Outputs:
reps: list[str]

List of reports by name

Versions:
  • 2015-03-08 @ddalle: Version 1.0

Get the file name for the report logo (placed in footer of each page)

Call:
>>> fimg = opts.get_ReportLogo(rep)
Inputs:
opts: pycart.options.Options

Options interface

rep: str

Name of report

Outputs:
fimg: str

File name of logo relative to report/ directory

Versions:
  • 2015-03-08 @ddalle: Version 1.0

get_ReportMinIter(rep)

Get minimum iteration to create a report

Call:
>>> nMin = opts.get_ReportMinIter(rep)
Inputs:
opts: Report

Options interface

rep: str

Name of report

Outputs:
nMin: int

Do not create report if iteration count is below this number

Versions:
  • 2017-04-12 @ddalle: Version 1.0

get_ReportRestriction(rep)

Get the restriction for a report

For example, this may be “SBU - ITAR” or “FOUO”

Call:
>>> lbl = opts.get_ReportRestriction(rep)
Inputs:
opts: pycart.options.Options

Options interface

rep: str

Name of report

Outputs:
lbl: str

Distribution restriction

Versions:
  • 2015-03-08 @ddalle: Version 1.0

get_ReportShowCaseNumber(rep)

Get the option of whether or not to show case number in header

Call:
>>> qnum = opts.get_ReportShowCaseNumber(rep)
Inputs:
opts: pycart.options.Options

Options interface

rep: str

Name of report

Outputs:
qnum: True | {False}

Whether or not to show case number on each page

Versions:
  • 2016-01-29 @ddalle: Version 1.0

get_ReportSubtitle(rep)

Get the subtitle of a report

Call:
>>> ttl = opts.get_ReportSubtitle(rep)
Inputs:
opts: cape.options.Options

Options interface

rep: str

Name of report

Outputs:
ttl: str

Report subtitle

Versions:
  • 2016-01-29 @ddalle: Version 1.0

get_ReportSweepList(rep)

Get list of sweeps in a report

Call:
>>> fswps = opts.get_ReportSweepList(rep)
Inputs:
opts: Report

Options interface

rep: str

Name of report

Outputs:
fswps: list[str]

List of sweeps in the report

Versions:
  • 2015-05-28 @ddalle: Version 1.0

get_ReportTitle(rep)

Get the title of a report

Call:
>>> ttl = opts.get_ReportTitle(rep)
Inputs:
opts: Report

Options interface

rep: str

Name of report

Outputs:
ttl: str

Report title

Versions:
  • 2015-03-08 @ddalle: Version 1.0

get_ReportZeroFigList(rep)

Get list of figures for cases with zero iterations

Call:
>>> figs = opts.get_ReportZeroFigList(rep)
Inputs:
opts: Report

Options interface

rep: str

Name of report

Outputs:
figs: list[str]

List of figures in the report

Versions:
  • 2015-03-08 @ddalle: Version 1.0

get_SubfigBaseType(sfig)

Get type for an individual subfigure

Call:
>>> t = opts.get_SubfigBaseType(sfig)
Inputs:
opts: Report

Options interface

sfig: str

Name of subfigure

Outputs:
t: str

Subfigure parent type

Versions:
  • 2015-03-08 @ddalle: Version 1.0

get_SubfigCascade(sfig)

Return all options for a subfigure including ones set in a template

Call:
>>> S = opts.get_SubfigCasecasde(sfig)
Inputs:
opts: Report

Options interface

sfig: str

Name of subfigure

Outputs:
S: dict

Options for subfigure sfig

Versions:
  • 2015-03-08 @ddalle: Version 1.0

get_SubfigList()

Get list of available subfigures for a report

Call:
>>> figs = opts.get_SubfigList()
Inputs:
opts: Report

Options interface

Outputs:
sfigs: list[str]

List of subfigures by name

Versions:
  • 2015-03-08 @ddalle: Version 1.0

get_SubfigOpt(sfig, opt, i=None, k=None)

Retrieve an option for a subfigure, applying necessary defaults

Call:
>>> val = opts.get_SubfigOpt(sfig, opt, i=None)
Inputs:
opts: Report

Options interface

sfig: str

Name of subfigure

opt: str

Name of option to retrieve

i: int

Index of subfigure option to extract

Outputs:
val: any

Subfigure option value

Versions:
  • 2015-03-08 @ddalle: Version 1.0

  • 2015-05-22 @ddalle: Support for multiple coeffs in PlotCoeff

get_SubfigPlotOpt(sfig, opt, i)

Retrieve an option for a subfigure plot

For example, {"color": "k", "marker": ["^", "+", "o"]} results in a sequence of plot options as follows.

  1. {"color": "k", "marker": "^"}

  2. {"color": "k", "marker": "+"}

  3. {"color": "k", "marker": "o"}

  4. {"color": "k", "marker": "^"}

  5. {"color": "k", "marker": "+"}

It is also possible to …

Call:
>>> val = opts.get_SubfigPlotOpt(sfig, opt, i=None)
Inputs:
opts: Report

Options interface

sfig: str

Name of subfigure

opt: str

Name of option to retrieve

i: int

Index of subfigure option to extract

Outputs:
val: any

Subfigure option value

Versions:
  • 2015-06-01 @ddalle: Version 1.0

get_SubfigType(sfig)

Get type for an individual subfigure

Call:
>>> t = opts.get_SubfigType(sfig)
Inputs:
opts: Report

Options interface

sfig: str

Name of subfigure

Outputs:
t: str

Subfigure type

Versions:
  • 2015-03-08 @ddalle: Version 1.0

get_Subfigure(sfig)

Return an interface to options for an individual subfigure

Call:
>>> S = opts.get_Subfigure(sfig)
Inputs:
opts: Report

Options interface

sfig: str

Name of subfigure

Outputs:
S: dict

Options for subfigure sfig

Versions:
  • 2015-03-08 @ddalle: Version 1.0

get_Sweep(fswp)

Return a sweep and its options

Call:
>>> S = opts.get_Sweep(fswp)
Inputs:
opts: Report

Options interface

fswp: str

Name of sweep

Outputs:
S: dict

Options for sweep fswp

Versions:
  • 2015-05-28 @ddalle: Version 1.0

get_SweepFigList(fswp)

Get list of figures in a sweep

Call:
>>> figs = opts.get_SweepFigList(fswp)
Inputs:
opts: Report

Options interface

fswp: str

Name of sweep

Outputs:
figs: list[str]

List of “sweep” figures in the report

Versions:
  • 2015-05-28 @ddalle: Version 1.0

get_SweepList()

Get list of sweeps for a report

Call:
>>> fswps = opts.get_SweepList()
Inputs:
opts: Report

Options interface

Outputs:
figs: list[str]

List of figures by name

Versions:
  • 2015-05-28 @ddalle: Version 1.0

get_SweepOpt(fswp, opt)

Retrieve an option for a sweep

Call:
>>> val = opts.get_SweepOpt(fswp, opt)
Inputs:
opts: Report

Options interface

sfig: str

Name of subfigure

opt: str

Name of option to retrieve

Outputs:
val: any

Sweep option value

Versions:
  • 2015-05-28 @ddalle: Version 1.0