Commit 9940f122 authored by Amy Stamile's avatar Amy Stamile
Browse files

Added error check

parent 0322f139
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -475,8 +475,10 @@ def compute_sigma0(V, dX, W_parameters, W_observations):
    
    if (dof > 0):
        sigma0 = VTPV/dof
    else:
    elif (dof == 0):
        sigma0 = VTPV
    else:
        raise ValueError(f"Computed degrees of freedom [{dof}] is invalid.")

    return np.sqrt(sigma0)