autodeer.reporter

Module Contents

Classes

SvgFlowable

Convert byte streasm containing SVG into a Reportlab Flowable.

Reporter

Functions

create_report(save_path, Results[, SpectrometerInfo, ...])

combo_figure(EDFS, respro, pulses, relaxation, ...[, ...])

Creates a 2x2 summary figure.

Attributes

autodeer.reporter.styles[source]
autodeer.reporter.package_dir[source]
class autodeer.reporter.SvgFlowable(svg)[source]

Bases: reportlab.platypus.Flowable

Convert byte streasm containing SVG into a Reportlab Flowable.

Convert SVG to RML drawing on initializtion.

Parameters:

svg (io.BytesIO)

drawing: reportlab.graphics.shapes.Drawing[source]
width: int[source]
height: int[source]
wrap(*_args)[source]

Return diagram size.

draw()[source]

Render the chart.

Return type:

None

class autodeer.reporter.Reporter(filepath, pagesize='A4')[source]
pdf[source]
story[source]
frame[source]
template[source]
header(canvas, doc)[source]
footer(canvas, doc)[source]
_build()[source]
add_title(key, title)[source]
add_new_section(key, title)[source]
add_text(key, text, title=None)[source]
add_code_block(key, code, title=None)[source]
add_figure(key, figure, title=None)[source]
add_space(key, height=5)[source]
add_page_break(key)[source]
add_table(key, lists)[source]

Generates a table as a reportlab flowable from a list of lists

autodeer.reporter.create_report(save_path, Results, SpectrometerInfo=None, UserInputs=None, Pulses=None)[source]
Parameters:
  • Results (dict)

  • SpectrometerInfo (dict)

  • UserInputs (dict)

autodeer.reporter.combo_figure(EDFS, respro, pulses, relaxation, init_deer, long_deer, title=None)[source]
Creates a 2x2 summary figure.
  • The top left plot is the EDFS and resonator profile, overlapped with the optimised pulses.

  • The top right plot is the relaxation data and fits.

  • The bottom left plot is the initial DEER data and fits.

  • The bottom right plot is the final DEER data and fits.

Parameters:
EDFS: ad.FieldSweepAnalysis

The Echo-Detected Field Sweep analysis.

respro: ad.ResonatorProfileAnalysis

The resonator profile analysis

pulses: dict

A dictionary containing the optimised pulses.

relaxation: list

A list containing the relaxation data and fits.

init_deer: deerlab.FitResult

The initial DEER data and fits.

long_deer: deerlab.FitResult

The final DEER data and fits.

title: str, optional

The title of the figure, by default None

Parameters:
  • pulses (dict)

  • relaxation (list)