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

run_eval output #270

Closed zhouyi0812 closed 6 months ago

zhouyi0812 commented 7 months ago

Hello! I adjusted the run_eval according to mescore, but the evaluation output is 'nonetype' How should I adjust it? Thank you very much!

min_SNR = 3 # SNR threshold rval_thr = 0.85 # spatial correlation threshold

quality_params = {'min_SNR': min_SNR, 'rval_thr': rval_thr, 'use_cnn': False}

index = 1 eval = df.iloc[index].cnmf.run_eval(quality_params)

print('*****')

print(f"Number accepted: {(len(df.iloc[index].cnmf.get_good_components))}")

print(f"Number rejected: {len(df.iloc[index].cnmf.get_bad_components)}")

kushalkolar commented 7 months ago

From the docstring:

Run component evaluation. This basically changes the indices for good and bad components.
zhouyi0812 commented 7 months ago

So the output of ixs_good = df.iloc[index].cnmf.get_good_components() already represents the good components right? If so, what is the evaluation parameters behind?

kushalkolar commented 7 months ago

The caiman docs has some stuff on the eval components:

https://caiman.readthedocs.io/en/latest/Getting_Started.html#component-evaluation

zhouyi0812 commented 7 months ago

Thank you! But if I want to change it maybe to a higher value, can I follow the steps above? In that case, how to present accepted components and reject components?

kushalkolar commented 7 months ago

Why not just use the visualization in mesviz you can interactively set all the eval params

zhouyi0812 commented 7 months ago

Because there are too many movies, I think it should be helpful after I check certain number of movies and find a common use parameters for the rest and just looping

zhouyi0812 commented 7 months ago

Also, I found there is a line connect two components for some cases.

Screenshot 2024-02-06 161819

kushalkolar commented 7 months ago

That's one component

zhouyi0812 commented 7 months ago

If I don't think that's right ROI, if I could delete directly from the evaluation panel? Thank you!

kushalkolar commented 7 months ago

You probably have to increase min_corr to split it.

On Wed, Feb 7, 2024, 13:35 Yi Zhou @.***> wrote:

If I don't think that's the one component, if I could delete directly from the evaluation panel? Thank you!

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