Skip to content

Filter mapping output based on R-squared #234

@alexdaniel654

Description

@alexdaniel654

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions