astrometry Package

trackSmooth Module

oscaar v2.0 Module for differential photometry Developed by Brett Morris, 2011-2013

oscaar.astrometry.trackSmooth.quadraticFit(derivative, ext)[source]

Find an extremum in the data and use it and the points on either side, fit a quadratic function to the three points, and return the x-position of the apex of the best-fit parabola.

Called by oscaar.trackSmooth()

Parameters:

derivative : numpy.ndarray

The first derivative of the series of points, usually calculated by np.diff()

ext : string

Extremum to look find. May be either “max” or “min”

Returns:

extremum : float

The (non-integer) index where the extremum was found

oscaar.astrometry.trackSmooth.trackSmooth(image, est_x, est_y, smoothingConst, plottingThings, preCropped=False, zoom=20.0, plots=False)[source]

Method for tracking stellar centroids.

Parameters:

image : numpy.ndarray

FITS image read in by PyFITS

est_x : float

Inital estimate for the x-centroid of the star

est_y : float

Inital estimate for the y-centroid of the star

smoothingConstant : float

Controls the degree to which the raw stellar intensity profile will be smoothed by a Gaussian filter (0 = no smoothing)

preCropped : bool

If preCropped=False, image is assumed to be a raw image, if preCropped=True, image is assumed to be only the portion of the image near the star

zoom : int or float

How many pixels in each direction away from the estimated centroid to consider when tracking the centroid. Be sure to choose a large enough zoom value the stellar centroid in the next exposure will fit within the zoom

plots : bool

If plots=True, display stellar intensity profile in two axes and the centroid solution

Returns:

xCenter : float

The best-fit x-centroid of the star

yCenter : float

The best-fit y-centroid of the star

averageRadius : float

Average radius of the SMOOTHED star in pixels

errorFlag : bool

Boolean corresponding to whether or not any error occured when running oscaar.trackSmooth(). If an error occured, the flag is True; otherwise False.

Core developer: Brett Morris Modifications by: Luuk Visser, 2-12-2013