focus module

focus module provides a

Module functions

focus.focus(files, apers=array([0.3, 0.5, 0.7, 0.9, 1.1, 1.3, 1.5, 1.7, 1.9, 2.1, 2.3, 2.5, 2.7, 2.9, 3.1, 3.3, 3.5, 3.7, 3.9, 4.1, 4.3, 4.5, 4.7, 4.9, 5.1, 5.3, 5.5, 5.7, 5.9]), thresh=100, fwhm=2, skyrad=[8, 12], pixscale=0.5, display=None, plot=False, max=None, red=None, root='', hard=False)[source]

Get best focus position from a set of focus run images

For each image, find stars and do concentric aperture photometry to determine half-flux radius. Take median of these across all stars in image and consider result as a function of focus. Find the minimum half-flux image and do a quadratic fit around this point to find minimum best fit focus. Report best fit and minimum focus and half flux diameters in arcsec.

focus.mksum(mjd, hard=None)[source]

Make plots of focus values for a night

focus.mkplots(mjd, display=None, root='/data/1m/')[source]

Make focus run plots

focus.calfocus(foc0=34700, display=None)[source]

Focus run for calibration channel

focus.specfocus(foc0=425000)[source]

Do a spectrograph focus run

focus.montage(display, red=None)[source]

Create montage of focus sequence

focus.profile(ims, red, maxrad=80)[source]

Plot stellar profiles of sequence of images

focus.allfoc()[source]

Get focus entries from database, skip focvals and file, plot bestfoc and besthf