Slotphottools contains the algorithms to perform photometry on slotmode data.
TODO– * Change how the region file is read in so you can use different region formats
Calculate the optimal ratio between the two sources based pixel fit of the comparison star to the object star. For both stars the background will be removed and then the comparison star will be used as a ‘model’ psf for the fit. To simplify the error calculation, we are assume the errors on the comparison star are much smaller than the errors on the target star
return ratio, ratio_err
Given a central x-y, calculate the drift
Calculate the flux ratio
return ratio, ratio_err
Determines the sky background around a single star. Using square annulli. Returns the background flux in terms of e/pix.
In the case br1 and br2 are floats, x and y are the center of the annulli and br1 and br2 are floats which give the half-width of the square annulli. If br1 and br2 are lists, then the background rectangles are defined by br1 and br2.
returns bflux, npix
Calculate the image statistics
Perform circular aperture photometry
return flux, flux_err
Determeine if the value x is over the edge of an image
Perform curve of growth photometry. Will use <rc> square apertures between 2 pix to the br2 radius. rc now gives the number of apertures to use. br1 gives the annulli to use for sky determination. The flux returned is the flux in the aperture with the highest signal to noise
return flux, flux_err
Routine to perform photometry on the image. It will perform the requested type of photometry (square aperture, circular aperture, curve of growth, psf fit, or optimal). See the help file for descriptions of each.
returns list of photometry parameters for target and companion
Find the centroid of an array where
returns .
Starting with the initial x-y of the comparison source, search for the comparison star and see how much it has drifted. Expanding the search if no comparison star is found
returns dx,dy
Search an image for all stars and find the nearest one to the given coordinates
returns an x,y
Return the time since noon the previous day in seconds
Detect all significant pixels in an image returns count
Read in the lightcurve file
Read in the src file and return the parameters extracted from that file
Perform square aperture photometry
returns flux, flux_err
Write the data out to a file