Skip to content

Dealing with pixels clipped at 0 for SNR calculation #1456

Closed Answered by ethanbb
ethanbb asked this question in Q&A
Discussion options

You must be logged in to vote

OK, I plugged the gamma-based SNR into mesmerize-viz to see if it fixes classification of my pathologically skewed ROIs, and it seems to work great. It's part of my own repository rather than caiman right now, but here is the code in case you want to adapt it for use in caiman:

def compute_snr_gamma(C: np.ndarray, YrA: np.ndarray, use_loggamma=True,
                      remove_baseline=True, N=5, sigma_factor=3., dview=None) -> np.ndarray:
    """
    Compute an SNR measure based on fitting a gamma distribution to the residuals (YrA)
    of each component, then using the gamma ppf to evaluate exceptionality of events
    in the full traces (C + YrA).
    See evaluate_components, compute_…

Replies: 9 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ethanbb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants