|
2 | 2 |
|
3 | 3 | import sys |
4 | 4 | from distutils.dir_util import copy_tree |
5 | | -from os.path import join |
| 5 | +from os.path import join, basename |
6 | 6 | from pathlib import Path |
7 | 7 | from string import Template |
8 | 8 |
|
@@ -159,7 +159,11 @@ def _generate_bokeh_plots(phys_in, figsize=(250, 500)): |
159 | 159 | if ch_num > len(colors): |
160 | 160 | colors *= 2 |
161 | 161 |
|
162 | | - downsample = int(phys_in.freq / 100) |
| 162 | + if phys_in.freq > 100: |
| 163 | + downsample = int(phys_in.freq / 100) |
| 164 | + else: |
| 165 | + downsample = None |
| 166 | + |
163 | 167 | plot_list = [] |
164 | 168 | for row, timeser in enumerate(phys_in.timeseries.T[1:]): |
165 | 169 | # build a data source for each plot, with only the data + index (time) |
@@ -224,9 +228,9 @@ def generate_report(out_dir, conversion_path, log_path, phys_in): |
224 | 228 | log_content = f.read() |
225 | 229 |
|
226 | 230 | log_content = log_content.replace("\n", "<br>") |
227 | | - log_html_path = join(conversion_path, "phys2bids_report_log.html") |
228 | | - qc_html_path = join(conversion_path, "phys2bids_report.html") |
229 | | - |
| 231 | + log_html_path = join(conversion_path, basename(phys_in.filename) + ".html") |
| 232 | + qc_html_filename = "_".join(basename(phys_in.filename).split("_")[:-1])+"_desc-log_physio.html" |
| 233 | + qc_html_path = join(conversion_path, qc_html_filename) |
230 | 234 | html = _save_as_html(log_html_path, log_content, qc_html_path) |
231 | 235 |
|
232 | 236 | with open(log_html_path, "wb") as f: |
|
0 commit comments