def test_manual_report_3d(tmp_path, renderer): """Simulate adding 3D sections.""" r = Report(title='My Report') r.add_trans(trans=trans_fname, info=raw_fname, title='my coreg', subject='sample', subjects_dir=subjects_dir) r.add_bem(subject='sample', subjects_dir=subjects_dir, title='my bem', decim=100) r.add_inverse_operator(inverse_operator=inv_fname, title='my inverse', subject='sample', subjects_dir=subjects_dir, trans=trans_fname) r.add_stc( stc=stc_fname, title='my stc', subject='sample', subjects_dir=subjects_dir, n_time_points=2, stc_plot_kwargs=stc_plot_kwargs, ) fname = op.join(tmp_path, 'report.html') r.save(fname=fname, open_browser=False)
def test_manual_report_3d(tmp_path, renderer): """Simulate adding 3D sections.""" r = Report(title='My Report') info = read_info(raw_fname) with info._unlock(): dig, info['dig'] = info['dig'], [] add_kwargs = dict(trans=trans_fname, info=info, subject='sample', subjects_dir=subjects_dir) with pytest.warns(RuntimeWarning, match='could not be calculated'): r.add_trans(title='coreg no dig', **add_kwargs) with info._unlock(): info['dig'] = dig # TODO: We should probably speed this up. We could expose an arg to allow # use of sparse rather than dense head, and also possibly an arg to specify # which views to actually show. Both of these could probably be useful to # end-users, too. r.add_trans(title='my coreg', **add_kwargs) r.add_bem(subject='sample', subjects_dir=subjects_dir, title='my bem', decim=100) r.add_inverse_operator(inverse_operator=inv_fname, title='my inverse', subject='sample', subjects_dir=subjects_dir, trans=trans_fname) r.add_stc( stc=stc_fname, title='my stc', subject='sample', subjects_dir=subjects_dir, n_time_points=2, stc_plot_kwargs=stc_plot_kwargs, ) fname = op.join(tmp_path, 'report.html') r.save(fname=fname, open_browser=False)