def __init__(self, study, docs, projections, spectral, magnitudes, stats): self.study = study self.docs = docs self.spectral = spectral self.projections = projections self.magnitudes = magnitudes self.stats = stats self.canonical_filenames = [doc.name for doc in study.canonical_documents] self.info = render_info_page(self)
def write_report(self, filename): if self.stats is None: return self.info = render_info_page(self) with open(filename, 'w') as out: out.write(self.info.encode('utf-8')) return self.info