# How to create report using MNE Report module?

**URL:** <https://mne.discourse.group/t/how-to-create-report-using-mne-report-module/2284>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [August 7, 2020, 1:50pm UTC](https://mne.discourse.group/t/how-to-create-report-using-mne-report-module/2284 "2020-08-07T13:50:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [August 7, 2020, 1:50pm UTC](https://mne.discourse.group/t/how-to-create-report-using-mne-report-module/2284/1 "2020-08-07T13:50:32Z")

</div>

External Email - Use Caution

Hi All,

It is a great thing that mne has a feature for creating an HTML report.  
However, I am having difficulty in applying the information provided from  
the Getting started with mne.Report tutorial onto my real-life application.

In the tutorial, it seems that any figure generated needs to be appended.  
But, upon completion, a figure of the plot\_properties is outputted despite  
it is enclosed within the figs.append(). Also, there is no HTML report  
generated upon completion.

Also, may I know how to append additional information into the report.

The full code to reproduce the above scenario is given below.

Appreciate for any insight.

def generate\_report(raw,filename, ica, ch\_not\_considered):

&nbsp;&nbsp;&nbsp;&nbsp;report = Report(image\_format='png', subject='try\_sample\_subject',

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raw\_psd=True) # use False for speed here

&nbsp;&nbsp;&nbsp;&nbsp;report.parse\_folder(filename, on\_error='ignore')

&nbsp;&nbsp;&nbsp;&nbsp;figs = list()

&nbsp;&nbsp;&nbsp;&nbsp;figs.append(ica.plot\_components())

&nbsp;&nbsp;&nbsp;&nbsp;figs.append(ica.plot\_properties(raw, picks=[0]))

&nbsp;&nbsp;&nbsp;&nbsp;# How to include additional text? say channel that ch\_not\_considered

&nbsp;&nbsp;&nbsp;&nbsp;report.add\_slider\_to\_section(figs, image\_format='png') # can also use  
'svg'

&nbsp;&nbsp;&nbsp;&nbsp;report.save('my\_reportxx.html', overwrite=True)

def all\_procedure():

&nbsp;&nbsp;&nbsp;&nbsp;filename = r'S17\_3.mff' # Accessible via:  
[https://drive.google.com/drive/folders/14R\_2A-ceqOFvRkDZH6Skm4CqF5B-K7Co?usp](https://drive.google.com/drive/folders/14R_2A-ceqOFvRkDZH6Skm4CqF5B-K7Co?usp)  
=sharing

&nbsp;&nbsp;&nbsp;&nbsp;ch\_not\_considered = ['E128', 'E127', 'E126', 'E126', 'E48', 'E119',  
'E17']

&nbsp;&nbsp;&nbsp;&nbsp;raw = mne.io.read\_raw\_egi(filename, preload=True)

&nbsp;&nbsp;&nbsp;&nbsp;raw.crop(0, 300) # crop huge artifact at the end

&nbsp;&nbsp;&nbsp;&nbsp;all\_bad\_ch = ['E128', 'E127', 'E126', 'E126', 'E48', 'E119', 'E17']

&nbsp;&nbsp;&nbsp;&nbsp;raw.info['bads'] = all\_bad\_ch # mark bad channels

&nbsp;&nbsp;&nbsp;&nbsp;filt\_raw = raw.copy()

&nbsp;&nbsp;&nbsp;&nbsp;ica = ICA(n\_components=5, random\_state=97)

&nbsp;&nbsp;&nbsp;&nbsp;ica.fit(filt\_raw)

&nbsp;&nbsp;&nbsp;&nbsp;generate\_report(raw,filename, ica, ch\_not\_considered)

all\_procedure()

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20200807/e185593a/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200807/e185593a/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [August 8, 2020, 4:58am UTC](https://mne.discourse.group/t/how-to-create-report-using-mne-report-module/2284/2 "2020-08-08T04:58:38Z")

</div>

External Email - Use Caution

Hi,

I am not sure why you expect figs.append to suppress the figure from  
popping out. What you want is controlled by the "show" parameter of our  
plotting functions.

Mainak
