emfacilities.protocols.report_html module

class emfacilities.protocols.report_html.ReportHtml(protocol, ctfMonitor, sysMonitor, movieGainMonitor, publishCmd=None, **kwargs)[source]

Bases: object

Create an html report with a summary of the processing. The report will be updated with a given frequency.

checkNewThumbsReady()[source]
generate(finished)[source]
generateReportImages(firstThumbIndex=0, micScaleFactor=6)[source]

Function to generate thumbnails for the report. Uses data from self.thumbPaths.

===== Params ===== - firstThumbIndex: index from which we start generating thumbnails - micScaleFactor: how much to reduce in size the micrographs.

getHTMLReportText()[source]
getResolutionHistogram(resolutionValues)[source]
getThumbPaths(thumbsDone=0, ctfData=None, ext='png', micIdSet=None)[source]

Adds to self.thumbPaths the paths to the report thumbnails that come from the alignment and/or ctf protocol.

===== Params ===== - thumbsDone: how many thumbnails have already been generated.

we will get paths starting from this index

  • ctfData: dict resulting from ctfMonitor.getData()

  • ext: extension of the thumbnail images. Defaults to png.

  • micIdSet: mic indexes to use

getTimeSeries(data)[source]
info(msg)[source]
processDefocusValues(defocusList)[source]
setUp()[source]

Setup actions for the html report: create directories to store thumbnails, check if thumbnails are already generated in the alignment protocol.