Skip to content

add option in "mne report" to get sensitivity maps of forward models #2828

Open

Description

@agramfort

it's a good quality insurance plot for forward models.

Activity

  1. agramfort commented on Jan 30, 2016

    @agramfort
    SponsorMemberAuthor

    something along these lines (copied from a script of @dengemann)

    mag_map = mne.sensitivity_map(fwd, ch_type=fwd_ch_type, mode=fwd_ori)
    brain = mag_map.plot(subject=subject, time_label='Magnetometer sensitivity',
                         hemi='rh', subjects_dir=subjects_dir, **fwd_plot_args)
    brain.save_image('sensitivity_mag.png')
    report.add_images_to_section('sensitivity_mag.png', 'sensitivity map',
                                 'forward')
    os.remove('sensitivity_mag.png')
    
    fig = plt.figure()
    plt.hist(mag_map.data.ravel(),
             bins=20, label=['Magnetometers'],
             color=['b'])
    plt.title('Normal orientation sensitivity')
    plt.xlabel('sensitivity')
    plt.ylabel('count')
    plt.legend()
    
  2. jasmainak commented on Jan 30, 2016

    @jasmainak
    Member

    +1

  3. added this to the 0.13 milestone on May 11, 2016
  4. larsoner commented on Sep 8, 2016

    @larsoner
    Member

    @jasmainak do you have time for this in the next two weeks?

  5. jasmainak commented on Sep 9, 2016

    @jasmainak
    Member

    okay I'll give some time for fixing MNE stuff on Monday. I've a couple of things to do.

  6. self-assigned this
    on Sep 9, 2016
  7. dengemann commented on Sep 9, 2016

    @dengemann
    Member

    +1

    On Fri, Sep 9, 2016 at 2:30 PM Mainak Jas notifications@github.com wrote:

    okay I'll give some time for fixing MNE stuff on Monday. I've a couple of
    things to do.

    —
    You are receiving this because you were mentioned.
    Reply to this email directly, view it on GitHub
    #2828 (comment),
    or mute the thread
    https://github.com/notifications/unsubscribe-auth/AB0fiiaVcWckZu6BFXgoJmmjaOHSIgVkks5qoVFOgaJpZM4HPzH3
    .

  8. larsoner commented on Sep 16, 2016

    @larsoner
    Member

    @jasmainak any time for this one in the next couple of days? If not I'll remove the milestone (or you can)

  9. jasmainak commented on Sep 16, 2016

    @jasmainak
    Member

    I have a local branch @Eric89GXL but I fear it's going to take more time. I'll remove it from the milestone

  10. removed this from the 0.13 milestone on Sep 16, 2016
  11. parulsethi commented on Mar 5, 2017

    @parulsethi

    hi,
    I’m interested in solving this issue, but will need some help through it.

    If I understand correctly, a Report class method needs to be added to append 'sensitivity map' to the report? and is ‘sensitivity/count histogram’ mentioned above also required to be appended?

    and if a method, will the input parameters to it would be same as that of 'mne.sensitivity_map()+SourceEstimate.plot()' or something else?

  12. jasmainak commented on Mar 5, 2017

    @jasmainak
    Member

    hi @parulsethi I'd suggest that you start from my work in progress commit here. I don't think I got it working, but it might be easier than starting from scratch.

  13. jasmainak commented on Mar 5, 2017

    @jasmainak
    Member

    Also, make sure you understand how to generate a report. You can read the tutorial on the mne report here

  14. parulsethi commented on Mar 5, 2017

    @parulsethi

    @jasmainak thanks for the suggestion, I've forked from there.

  15. larsoner commented on Apr 4, 2018

    @larsoner
    Member

    @agramfort do we still need this? With the ease of adding sections manually it does not seem essential

  16. agramfort commented on Apr 4, 2018

    @agramfort
    SponsorMemberAuthor
  17. sappelhoff commented on Mar 19, 2021

    @sappelhoff
    Member

    @drammock is this really in progress? It seems to me that @jasmainak self-assigned in 2016 :-) I think that's no longer up to date.

    I think this is still "up for grabs"

  18. drammock commented on Mar 19, 2021

    @drammock
    Member

    @drammock is this really in progress? It seems to me that @jasmainak self-assigned in 2016 :-) I think that's no longer up to date.

    I think this is still "up for grabs"

    I was just hoping to inspire @jasmainak to finally get to it 😆

  19. jasmainak commented on Mar 19, 2021

    @jasmainak
    Member

    I did say, I'll get to it by Monday .......

    2021? :)

  20. 1himan commented on Feb 27, 2026

    @1himan
    Contributor

    would a PR still be welcomed on this issue? @drammock

  21. larsoner commented on Mar 2, 2026

    @larsoner
    Member

    @1himan yes, probably as part of a new kwarg report.add_forward(..., sensitivity=True) adding these would be good

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions