osl_ephys.report.src_report#
Reporting tool for source reconstruction.
Functions#
|
Generate data for HTML report. |
|
Generate an HTML page from a report directory. |
|
Generate an HTML summary from a report directory. |
|
Plots a config flowchart. |
|
Plot parcellation. |
|
Plot sign flipping results. |
|
Adds info to a dictionary containing info for the source recon report. |
|
Merge/update a config. |
Module Contents#
- osl_ephys.report.src_report.gen_html_data(config, outdir, subject, reportdir, logger=None, extra_funcs=None, logsdir=None)[source]#
Generate data for HTML report.
- Parameters:
config (dict) – Source reconstruction config.
outdir (str) – Source reconstruction directory.
subject (str) – Subject name.
reportdir (str) – Report directory.
logger (logging.getLogger) – Logger.
extra_funcs (list) – List of extra functions to run
logsdir (str) – Directory the log files were saved into. If None, log files are assumed to be in reportdir.replace(‘report’, ‘logs’)
- osl_ephys.report.src_report.gen_html_page(reportdir)[source]#
Generate an HTML page from a report directory.
- Parameters:
reportdir (str) – Directory to generate HTML report with.
- Returns:
Whether the report was generated successfully.
- Return type:
bool
- osl_ephys.report.src_report.gen_html_summary(reportdir, logsdir=None)[source]#
Generate an HTML summary from a report directory.
- Parameters:
reportdir (str) – Directory to generate HTML summary report with. logsdir: str
None (Directory the log files were saved into. If) – to be in reportdir.replace(‘report’, ‘logs’)
assumed (log files are) – to be in reportdir.replace(‘report’, ‘logs’)
- Returns:
Whether the report was generated successfully.
- Return type:
bool
- osl_ephys.report.src_report.plot_config(config, reportdir)[source]#
Plots a config flowchart.
- Parameters:
config (dict) – Config to plot.
reportdir (str) – Path to report directory. We will save the plot in this directory.
- Returns:
path – Path to plot.
- Return type:
str
- osl_ephys.report.src_report.plot_parcellation(parcellation_file, reportdir)[source]#
Plot parcellation.
- Parameters:
parcellation_file (str) – Path to parcellation file.
reportdir (str) – Path to report directory. We will save the plot in this directory.
- Returns:
path – Path to plot.
- Return type:
str
- osl_ephys.report.src_report.plot_sign_flipping_results(metrics, reportdir)[source]#
Plot sign flipping results.
- Parameters:
metrics (np.ndarray) – Sign flipping metrics. Shape is (n_subjects, n_iter + 1).
reportdir (str) – Path to report directory. We will save the plot in this directory.
- Returns:
path – Path to plot.
- Return type:
str