MCPcopy
hub / github.com/mne-tools/mne-python / _src_html

Method _src_html

mne/report/report.py:3702–3747  ·  view source on GitHub ↗
(
        self,
        *,
        subject,
        subjects_dir,
        src,
        trans,
        image_format,
    )

Source from the content-addressed store, hash-verified

3700 )
3701
3702 def _src_html(
3703 self,
3704 *,
3705 subject,
3706 subjects_dir,
3707 src,
3708 trans,
3709 image_format,
3710 ):
3711 src = _ensure_src(src)
3712 subject = self.subject if subject is None else subject
3713 subject = src[0]["subject_his_id"] if subject is None else subject
3714 subjects_dir = self.subjects_dir if subjects_dir is None else subjects_dir
3715 trans, _ = _find_trans(trans=trans, subject=subject, subjects_dir=subjects_dir)
3716 if src.kind == "surface" or src.kind == "mixed":
3717 surfaces = dict(head=0.1, white=0.5)
3718 else:
3719 surfaces = dict(head=0.1)
3720 kwargs = dict(
3721 trans=trans,
3722 src=src,
3723 subject=subject,
3724 subjects_dir=subjects_dir,
3725 show_axes=False,
3726 coord_frame="mri",
3727 surfaces=surfaces,
3728 )
3729 img, _ = _iterate_alignment_views(
3730 function=plot_alignment,
3731 alpha=0.5,
3732 max_width=self.img_max_width,
3733 max_res=self.img_max_res,
3734 **kwargs,
3735 )
3736 return _html_image_element(
3737 embedded=True, # because it's embedded in an existing section...
3738 id_=None, # a bunch of options are not used (they are part of "section")
3739 tags=None,
3740 div_klass=None,
3741 img_klass=None,
3742 show=None,
3743 img=img,
3744 title="Source space", # just the alt text
3745 caption="Source space",
3746 image_format=image_format,
3747 )
3748
3749 def _add_inverse_operator(
3750 self,

Callers 2

_add_forwardMethod · 0.95
_add_inverse_operatorMethod · 0.95

Calls 4

_ensure_srcFunction · 0.85
_find_transFunction · 0.85
_iterate_alignment_viewsFunction · 0.85
_html_image_elementFunction · 0.85

Tested by

no test coverage detected