nel-lab / mesmerize-core

High level pandas-based API for batch analysis of Calcium Imaging data using CaImAn
Other
58 stars 15 forks source link

continued quality assessment through mescore #265

Closed zhouyi0812 closed 6 months ago

zhouyi0812 commented 7 months ago

Hello! I wonder if there is a way to continue ROI segmentation through mescore. After CNMFE, how can I conduct the quality evaluation? the snr and spatial correlation? I saw some code from your demo: ixs_good = df.iloc[index].cnmf.get_good_components() ixs_bad = df.iloc[index].cnmf.get_bad_components() If this means that that already go through quality assessment?

Also I wonder, how can I plot the contour on the top of the movie? In Caiman I will plot the contour on the top of the corr imagine (cn_filter), and get the contour from this way. contour_dict = cnm.estimates.coordinates[idx] contour_coords = contour_dict['coordinates'] plt.plot(contour_coords[:, 0], contour_coords[:, 1], color='black', linewidth=1)

I am a bit lost in the data format on mescore, could you please guide me a bit, if I want to get the graph below, what contour should I use? Thank you!

016C3d16_B1_B2_1_00d00h00m Original and (7_29) Accepted Components MC

kushalkolar commented 7 months ago

That's what mesmerize-viz is for, the readme and vids show how to do it.

On Wed, Jan 24, 2024, 13:59 Yi Zhou @.***> wrote:

Hello! I wonder if there is a way to continue ROI segmentation through mescore. After CNMFE, how can I conduct the quality evaluation? the snr and spatial correlation? I saw some code from your demo: ixs_good = df.iloc[index].cnmf.get_good_components() ixs_bad = df.iloc[index].cnmf.get_bad_components() If this means that that already go through quality assessment?

Also I wonder, how can I plot the contour on the top of the movie? In Caiman I will plot the contour on the top of the corr imagine (cn_filter), and get the contour from this way. contour_dict = cnm.estimates.coordinates[idx] contour_coords = contour_dict['coordinates'] plt.plot(contour_coords[:, 0], contour_coords[:, 1], color='black', linewidth=1)

I am a bit lost in the data format on mescore, could you please guide me a bit, if I want to get the graph below, what contour should I use? Thank you!

016C3d16_B1_B2_1_00d00h00m.Original.and.7_29.Accepted.Components.MC.png (view on web) https://github.com/nel-lab/mesmerize-core/assets/48576330/7864f8a8-3ce1-4a01-b6d6-ac2963c9b1fc

— Reply to this email directly, view it on GitHub https://github.com/nel-lab/mesmerize-core/issues/265, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHXXRGXWVH7WNW2PIAR3S3YQFKYBAVCNFSM6AAAAABCJIPCV2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGA4TQOBZGQZTKMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

zhouyi0812 commented 7 months ago

I tried the code from this page to plot the contour: https://github.com/EricThomson/CCN_caiman_mesmerize_workshop_2023/blob/main/mesmerize-demos/cnmf_viz.ipynb

and there are some errors from the package: 1) TypeError: Graphic.init() got an unexpected keyword argument 'vmin_vmax_sliders' 2) AttributeError: 'ImageWidget' object has no attribute 'plot'

kushalkolar commented 7 months ago

that's old, I'm talking about this: https://github.com/kushalkolar/mesmerize-viz?tab=readme-ov-file#visualize-component-evaluation-metrics

On Wed, Jan 24, 2024 at 2:14 PM Yi Zhou @.***> wrote:

I tried the code from this page to plot the contour: https://github.com/EricThomson/CCN_caiman_mesmerize_workshop_2023/blob/main/mesmerize-demos/cnmf_viz.ipynb

and there are some errors from the package:

  1. TypeError: Graphic.init() got an unexpected keyword argument 'vmin_vmax_sliders'
  2. AttributeError: 'ImageWidget' object has no attribute 'plot'

— Reply to this email directly, view it on GitHub https://github.com/nel-lab/mesmerize-core/issues/265#issuecomment-1908762185, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHXXREWCVIMNPYVDZA6HJTYQFMR7AVCNFSM6AAAAABCJIPCV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBYG43DEMJYGU . You are receiving this because you commented.Message ID: @.***>

kushalkolar commented 6 months ago

closing due to inactivity