  Photometry of moving sources typically suffers from reduced signal-to-noise
(SNR) or flux measurements biased to incorrect low values through the use of
circular apertures. To address this issue we present the software package,
TRIPPy: TRailed Image Photometry in Python. TRIPPy introduces the pill
aperture, which is the natural extension of the circular aperture appropriate
for linearly trailed sources. The pill shape is a rectangle with two
semicircular end-caps, and is described by three parameters, the trail length
and angle, and the radius. The TRIPPy software package also includes a new
technique to generate accurate model point-spread functions (PSF) and trailed
point-spread functions (TSF) from stationary background sources in sidereally
tracked images. The TSF is merely the convolution of the model PSF, which
consists of a moffat profile, and super sampled lookup table. From the TSF,
accurate pill aperture corrections can be estimated as a function of pill
radius with a accuracy of 10 millimags for highly trailed sources. Analogous to
the use of small circular apertures and associated aperture corrections, small
radius pill apertures can be used to preserve signal-to-noise of low flux
sources, with appropriate aperture correction applied to provide an accurate,
unbiased flux measurement at all SNR.
