<p><span style="padding: 3px 10px; border-radius: 5px; color: #ffffff; font-weight: bold; display: inline-block; background-color: #ff0000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;External Email - Use Caution&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p><p></p><div dir="ltr"><div>Hi,</div><div><br></div><div>I am not sure why you expect figs.append to suppress the figure from popping out. What you want is controlled by the &quot;show&quot; parameter of our plotting functions.</div><div><br></div><div>Mainak<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 7, 2020 at 9:51 AM &lt;<a href="mailto:balandongiv@gmail.com">balandongiv@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-MY"><p><span style="padding:3px 10px;border-radius:5px;color:rgb(255,255,255);font-weight:bold;display:inline-block;background-color:rgb(255,0,0)">        External Email - Use Caution        </span></p><p></p><div class="gmail-m_-673165308618418795WordSection1"><p class="MsoNormal"><span>Hi All,<u></u><u></u></span></p><p class="MsoNormal"><span>It is a great thing that </span><span style="font-size:10pt;font-family:&quot;Courier New&quot;">mne</span><span> has a feature for creating an HTML report.<br>However, I am having difficulty in applying the information provided from the </span><span style="font-size:10pt;font-family:&quot;Courier New&quot;">Getting started with mne.Report</span><span> tutorial onto my real-life application.<u></u><u></u></span></p><p class="MsoNormal"><span>In the tutorial, it seems that any figure generated needs to be appended. But, upon completion, a figure of the </span><span style="font-size:10pt;font-family:&quot;Courier New&quot;">plot_properties</span><span> is outputted despite it is enclosed within the </span><span style="font-size:10pt;font-family:&quot;Courier New&quot;">figs.append()</span><span>. Also, there is no </span><span style="font-size:10pt;font-family:&quot;Courier New&quot;">HTML report</span><span> generated upon completion.<u></u><u></u></span></p><p class="MsoNormal"><span>Also, may I know how to append additional information into the report.<u></u><u></u></span></p><p class="MsoNormal"><span>The full code to reproduce the above scenario is given below.<u></u><u></u></span></p><p class="MsoNormal"><span>Appreciate for any insight.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">def generate_report(raw,filename, ica, ch_not_considered):<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">    report = Report(image_format=&#39;png&#39;, subject=&#39;try_sample_subject&#39;,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">                    raw_psd=True)  # use False for speed here<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">    report.parse_folder(filename, on_error=&#39;ignore&#39;)<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">    figs = list()<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">    figs.append(ica.plot_components())<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">    figs.append(ica.plot_properties(raw, picks=[0]))<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">    # How to include additional text? say channel that ch_not_considered<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">    report.add_slider_to_section(figs, image_format=&#39;png&#39;)  # can also use &#39;svg&#39;<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">    report.save(&#39;my_reportxx.html&#39;, overwrite=True)<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">def all_procedure():<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">    filename = r&#39;S17_3.mff&#39; # Accessible via: <a href="https://drive.google.com/drive/folders/14R_2A-ceqOFvRkDZH6Skm4CqF5B-K7Co?usp=sharing" target="_blank">https://drive.google.com/drive/folders/14R_2A-ceqOFvRkDZH6Skm4CqF5B-K7Co?usp=sharing</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">    ch_not_considered = [&#39;E128&#39;, &#39;E127&#39;, &#39;E126&#39;, &#39;E126&#39;, &#39;E48&#39;, &#39;E119&#39;, &#39;E17&#39;]<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">    raw = mne.io.read_raw_egi(filename, preload=True)<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">    raw.crop(0, 300)  # crop huge artifact at the end<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">    all_bad_ch = [&#39;E128&#39;, &#39;E127&#39;, &#39;E126&#39;, &#39;E126&#39;, &#39;E48&#39;, &#39;E119&#39;, &#39;E17&#39;]<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">    <a href="http://raw.info" target="_blank">raw.info</a>[&#39;bads&#39;] = all_bad_ch  # mark bad channels<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">    filt_raw = raw.copy()<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">    ica = ICA(n_components=5, random_state=97)<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">    ica.fit(filt_raw)<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">    generate_report(raw,filename, ica, ch_not_considered)<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:&quot;Courier New&quot;">all_procedure()<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p></div></div>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a></blockquote></div>