Basic Sources

class tractor.PointSource(pos, brightness)[source]

An implementation of a point source, characterized by its position and brightness.

copy()[source]
static getNamedParams()[source]
getParamDerivatives(img, fastPosDerivs=True, modelMask=None)[source]

returns [ Patch, Patch, ... ] of length numberOfParams().

getSourceType()[source]
getUnitFluxModelPatch(img, minval=0.0, derivs=False, modelMask=None)[source]
class tractor.PixPos(*args)[source]

A Position implementation using pixel positions.

getDimension()[source]
static getNamedParams()[source]
class tractor.Flux(val=0)[source]

A Brightness implementation that stores raw counts.

class tractor.RaDecPos(*args, **kwargs)[source]

A Position implementation using RA,Dec positions, in degrees.

Attributes:
  • .ra
  • .dec
distanceFrom(pos)[source]
getDimension()[source]
static getName()[source]
static getNamedParams()[source]
class tractor.Mag(val=0)[source]

An implementation of Brightness that stores a single magnitude.

stepsize = -0.01
strformat = '%.3f'
class tractor.Mags(r=14.3, g=15.6, order=['r','g'])[source]

An implementation of Brightness that stores magnitudes in multiple bands.

Works with MagsPhotoCal.

The order parameter is optional; it determines the ordering of the bands in the parameter vector (eg, getParams()).

getMag(bandname)[source]

Bandname: string Returns: mag in the given band.

setMag(bandname, mag)[source]