Index

QuadFit

A return value of the fit_quadratic() function.

Definition:
This is a built-in group datatype, defined as:
  group QuadFit {
    Double a,          # The fitted flux offset of the quadratic.
    Double b,          # The fitted b coefficient, where b multiplies
                       # the position-offset.
    Double c,          # The fitted c coefficient, where c multiplies
                       # the square of the position-offset.
    Double mid_offset, # The position of the mid-point of the
                       # quadratic, which is defined as follows,
                       # depending on the value of the c coefficient:
                       #  c < 0: The position of the maximum of the quadratic.
                       #  c = 0: Always 0, since the curve has no min or max.
                       #  c > 0: The position of the minimum of the quadratic.
    Double mid_flux,   # The value of the quadratic at mid_offset.
    Double rchisq      # The reduced chi-squared of the fit, or 0 if there
                       #  were zero degrees of freedom.
  }

The quadratic curve that is fitted, is defined as:

 flux = a + b * offset + c * offset^2
where, offset is a position offset, such as a sky tracking offset or a focus-position offset, and flux is the received power at that position.

If the fitted quadratic has a non-zero curvature (c!=0), then the mid_offset member is assigned the best-fit position offset of the mimimum or maximum of the quadratic. This will be a minimum if the fitted curvature is negative (c<0), or a maximum if the fitted curvature is positive (c>0). If the curvature is zero, then mid_offset is arbitrarily given the value zero, since the curve never goes through a minimum or a maximum.

For an example of how this is used, please see the help page for the fit_quadratic() function.


Martin Shepherd (14-Jul-2010)