Module ImportFrom alias alias alias Import alias identifier FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad If CompareLt NameLoad Num body Raise Call NameLoad Str Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr TupleLoad BinOpPow NameLoad Num NameLoad Call AttributeLoad NameLoad attr NameLoad attr Assign TupleStore NameStore NameStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpPow BinOpSub Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr BinOpPow BinOpSub NameLoad Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore TupleLoad SubscriptLoad NameLoad Index Num BinOpDiv UnaryOpUSub SubscriptLoad NameLoad Index Num BinOpMult Num SubscriptLoad NameLoad Index Num BinOpSub SubscriptLoad NameLoad Index Num BinOpMult SubscriptLoad NameLoad Index Num BinOpPow BinOpDiv SubscriptLoad NameLoad Index Num BinOpMult Num SubscriptLoad NameLoad Index Num Num Return TupleLoad NameLoad BinOpSub Num BinOpDiv NameLoad NameLoad decorator_list
N/A __future__ absolute_import division print_function N/A numpy np fit_quad_to_peak N/A N/A x y N/A N/A N/A 
    Fits a quadratic to the data points handed in
    to the from y = b[0](x-b[1])**2 + b[2] and R2
    (measure of goodness of fit)

    Parameters
    ----------
    x : ndarray
        locations
    y : ndarray
        values

    Returns
    -------
    b : tuple
       coefficients of form y = b[0](x-b[1])**2 + b[2]

    R2 : float
      R2 value

     N/A lenx N/A len x N/A N/A lenx 3 N/A N/A N/A Exception insufficient points handed in  N/A X N/A N/A N/A np vstack N/A N/A x 2 x N/A N/A np ones lenx T N/A N/A beta _ _ _ N/A N/A N/A np linalg lstsq X y N/A SSerr N/A N/A np sum N/A N/A N/A N/A np polyval beta x y 2 N/A SStot N/A N/A np sum N/A N/A y N/A N/A np mean y 2 N/A ret_beta N/A N/A beta N/A 0 N/A N/A N/A beta N/A 1 N/A 2 N/A beta N/A 0 N/A N/A beta N/A 2 N/A N/A beta N/A 0 N/A N/A N/A beta N/A 1 N/A 2 N/A beta N/A 0 2 N/A N/A ret_beta N/A 1 N/A SSerr SStot N/A