Skip to content

Conversation

@vagechirkov
Copy link
Contributor

Reference issue #6846 and PR #9161

Add more information in the _repr_html_ output.

image

@agramfort
Copy link
Member

agramfort commented Mar 20, 2021 via email

@vagechirkov
Copy link
Contributor Author

I would just show the basenames of the filenames and represent the measurement time range in hour / min / seconds

Here is an example:

image

@hoechenberger
Copy link
Member

Can we get rid of the "Raw" title? I believe it's unnecessary.

Screen Shot 2021-03-20 at 13 09 12

@hoechenberger
Copy link
Member

"Measurement date" should ideally include the time too :)

vagechirkov and others added 4 commits March 20, 2021 13:15
Co-authored-by: Richard Höchenberger <richard.hoechenberger@gmail.com>
Co-authored-by: Richard Höchenberger <richard.hoechenberger@gmail.com>
@vagechirkov
Copy link
Contributor Author

"Measurement date" should ideally include the time too :)

image

@vagechirkov vagechirkov marked this pull request as ready for review March 20, 2021 12:33
@vagechirkov vagechirkov changed the title WIP ENH: Extend _repr_html_ method for Raw ENH: Extend _repr_html_ method for Raw Mar 20, 2021
@hoechenberger
Copy link
Member

Much better!

I haven't looked at the generated HTML code, but I have the impression that there's either another line
break or empty row now before the first one actually containing data:

Screen Shot 2021-03-20 at 13 34 58

Do you think this could be improved easily?

<td>{{', '.join(filenames)}}</td>
</tr>
<tr>
<th>Measurement time range</th>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we could change this to simply "Measurement time"? Would be slightly more concise … @agramfort WDYT?

vagechirkov and others added 2 commits March 20, 2021 13:55
Co-authored-by: Richard Höchenberger <richard.hoechenberger@gmail.com>
@vagechirkov
Copy link
Contributor Author

Much better!

I haven't looked at the generated HTML code, but I have the impression that there's either another line
break or empty row now before the first one actually containing data:

Screen Shot 2021-03-20 at 13 34 58

Do you think this could be improved easily?

I think I've fixed this now :)

image

@hoechenberger
Copy link
Member

Cool, looking good!

@agramfort
Copy link
Member

regarding measurement time range I would rather show the duration eg (6min 13s or 8h 2min 28s). For example a sleep recording can last 10h hours and it would be spanned over different days.

@hoechenberger
Copy link
Member

regarding measurement time range I would rather show the duration eg (6min 13s or 8h 2min 28s). For example a sleep recording can last 10h hours and it would be spanned over different days.

So you're proposing

Duration      12:34:56 (hh:mm:ss)

?

I like this.

Also wondering if we should maybe include info['subject_info']['his_id'] as well, if present:

Participant      Mrs X

@agramfort
Copy link
Member

agramfort commented Mar 21, 2021 via email

@vagechirkov
Copy link
Contributor Author

image

Copy link
Member

@agramfort agramfort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM provided you manage to make CIs green

@agramfort agramfort merged commit 1e403b2 into mne-tools:main Mar 21, 2021
@agramfort
Copy link
Member

Thx @vagechirkov

@hoechenberger
Copy link
Member

This is a real usability improvement, thanks a bunch!!

@vagechirkov vagechirkov deleted the extend-repr-html-raw branch March 21, 2021 18:08
@vagechirkov
Copy link
Contributor Author

This is a real usability improvement, thanks a bunch!!

Do you think it makes sense to create similar HTML-based representations for other MNE-Python objects?

@hoechenberger
Copy link
Member

This is a real usability improvement, thanks a bunch!!

Do you think it makes sense to create similar HTML-based representations for other MNE-Python objects?

I was actually thinking about exactly this, yes. Most relevant for me personally would be Epochs and Evoked; but having such a nice representation for more objects eventually could make total sense!!

@vagechirkov
Copy link
Contributor Author

This is a real usability improvement, thanks a bunch!!

Do you think it makes sense to create similar HTML-based representations for other MNE-Python objects?

I was actually thinking about exactly this, yes. Most relevant for me personally would be Epochs and Evoked; but having such a nice representation for more objects eventually could make total sense!!

Alright, I can do this. I would create a new issue for several objects to keep progress :)

@agramfort
Copy link
Member

agramfort commented Mar 21, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants