diff --git a/osl_ephys/report/src_report.py b/osl_ephys/report/src_report.py index a0f2075..07e5445 100644 --- a/osl_ephys/report/src_report.py +++ b/osl_ephys/report/src_report.py @@ -106,6 +106,10 @@ def gen_html_data(config, outdir, subject, reportdir, logger=None, extra_funcs=N data["plt_filters_svd"] = f"{subject}/filters_svd.png" copy("{}/{}".format(outdir, data["filters_svd_plot"]), "{}/{}/filters_svd.png".format(reportdir, subject)) + if "dipole_locations_plot" in data: + data["plt_dipole_locations"] = f"{subject}/dipole_locations.html" # this might not have been rendered yet (if using dask), so potentially need to copy it over later + copy("{}/{}".format(outdir, data["dipole_locations_plot"]), "{}/{}/dipole_locations.html".format(reportdir, subject)) + if "parc_psd_plot" in data: data["plt_parc_psd"] = f"{subject}/parc_psd.png" copy("{}/{}".format(outdir, data["parc_psd_plot"]), "{}/{}/parc_psd.png".format(reportdir, subject)) @@ -157,6 +161,7 @@ def gen_html_page(reportdir): # Load HTML data data = [] for subdir in subdirs: + subdir = Path(subdir) # Just generate the html page with the successful runs try: @@ -464,6 +469,7 @@ def add_to_data(data_file, info): Info to add. """ data_file = Path(data_file) + if data_file.exists(): data = pickle.load(open(data_file, "rb")) else: diff --git a/osl_ephys/report/templates/src_subject_panel.html b/osl_ephys/report/templates/src_subject_panel.html index 37752c1..d1466be 100644 --- a/osl_ephys/report/templates/src_subject_panel.html +++ b/osl_ephys/report/templates/src_subject_panel.html @@ -105,18 +105,32 @@

Coregistration {% endif %} {% if data.beamform or data.beamform_and_parcellate %} -