Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter mapping output based on R-squared #234

Open
alexdaniel654 opened this issue Jan 14, 2025 · 0 comments
Open

Filter mapping output based on R-squared #234

alexdaniel654 opened this issue Jan 14, 2025 · 0 comments
Labels
type:enhancement 🛠️ Improvements to existing features
Milestone

Comments

@alexdaniel654
Copy link
Member

Make it so mapping functions output 0 if the R-squared of the fit is less than a desired threshold. This will minimise the number of voxels with non-sensical fits.

Add something like the snippet below to mapping/fitting/relaxation.py fit_signal function.

if r2 <= 0:
    popt = np.zeros(model.n_params)
    error = np.zeros(model.n_params)
    r2 = -1E6
@alexdaniel654 alexdaniel654 added the type:enhancement 🛠️ Improvements to existing features label Jan 14, 2025
@alexdaniel654 alexdaniel654 added this to the v0.8.0 milestone Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement 🛠️ Improvements to existing features
Projects
None yet
Development

No branches or pull requests

1 participant