diff --git a/phys2bids/phys2bids.py b/phys2bids/phys2bids.py index 9999ca663..453b8bcad 100644 --- a/phys2bids/phys2bids.py +++ b/phys2bids/phys2bids.py @@ -542,8 +542,7 @@ def phys2bids( # Only generate report if specified by the user if make_report: - generate_report(conversion_path, logname, phys_out[key]) - + generate_report(outdir, conversion_path, logname, phys_out[key]) def _main(argv=None): options = _get_parser().parse_args(argv) diff --git a/phys2bids/reporting/html_report.py b/phys2bids/reporting/html_report.py index 54bcc93a2..1b44980bb 100644 --- a/phys2bids/reporting/html_report.py +++ b/phys2bids/reporting/html_report.py @@ -193,7 +193,7 @@ def _generate_bokeh_plots(phys_in, figsize=(250, 500)): return script, div -def generate_report(out_dir, log_path, phys_in): +def generate_report(out_dir, conversion_path, log_path, phys_in): """ Plot all the channels for visualizations as linked line plots for dynamic report. @@ -217,15 +217,15 @@ def generate_report(out_dir, log_path, phys_in): # Copy assets into output folder pkgdir = sys.modules["phys2bids"].__path__[0] assets_path = join(pkgdir, "reporting", "assets") - copy_tree(assets_path, join(out_dir, "assets")) + copy_tree(assets_path, join(conversion_path, "assets")) # Read log with open(log_path, "r") as f: log_content = f.read() log_content = log_content.replace("\n", "
") - log_html_path = join(out_dir, "phys2bids_report_log.html") - qc_html_path = join(out_dir, "phys2bids_report.html") + log_html_path = join(conversion_path, "phys2bids_report_log.html") + qc_html_path = join(conversion_path, "phys2bids_report.html") html = _save_as_html(log_html_path, log_content, qc_html_path)