daophot - Daophot helper routines

Interface to daophot routines.

Module provides interface to daophot.

exception vdrp.daophot.DaophotException[source]

Bases: exceptions.Exception

class vdrp.daophot.DAOPHOT_ALS(NL, NX, NY, LOWBAD, HIGHBAD, THRESH, AP1, PH_ADU, RNOISE, FRAD, data)[source]

Bases: object

Reads DAOPHOT ALS files.

static read(als_file)[source]

Reads daophot als file.

Notes:
Creates file imrot.fits.
Args:
als_file (str): Input file name.
Returns:
(DAOPHOT_ALS): Object containing all the infromation
in the als file.
vdrp.daophot.allstar(prefix, psf='use.psf', logging=None)[source]

Interface to allstar.

Notes:
Replaces second part of rdsub. Requires allstar.opt and use.psf, PREFIX.ap to be in place.
Args:
prefix (str): File name prefix to call daophot phot for. psf (str): File name for PSF model. logging (module): Pass logging module if. Otherwise output is passed to the screen.
vdrp.daophot.daomaster(logging=None)[source]

Interface to daomaster.

Notes:
replaces “rmaster0”. Requires 20180611T054545tot.als and all.mch to be in place.
Args:
logging (module): Pass logging module if. Otherwise output is passed to the screen.
vdrp.daophot.daophot_find(prefix, sigma, logging=None)[source]

Interface to daophot find.

Notes:
Replaces second part of rdcoo. Requires daophot.opt to be in place.
Args:
prefix (str): File name prefix to call daophot phot for. sigma (float): Daophot phot sigma parameter. logging (module): Pass logging module if.

Otherwise output is passed to the screen.

vdrp.daophot.daophot_phot(prefix, logging=None)[source]

Interface to daophot phot.

Notes:
Replaces first part of rdsub. Requires photo.opt to be in place.
Args:
prefix (str): File name prefix to call daophot phot for. logging (module): Pass logging module if. Otherwise output is passed to the screen.
vdrp.daophot.filter_daophot_out(file_in, file_out, xmin, xmax, ymin, ymax)[source]

Filter daophot coo ouput files. For close-to-edge detections.

Read the daophot *.coo output file and rejects detections that fall outside xmin - xmax and ymin - ymax. Translated from awk ‘{s+=1; if (s<=3||($2>4&&$2<45&&$3>4&&$3<45)) print $0}’ $1.coo > $1.lst

Notes: Args:

file_in (str): Input file name. file_out (str): Output file name. xmin (float): Detection x coordinate must be larger than this vaule. xmax (float): Detection x coordinate must be smaller than this vaule. ymin (float): Detection y coordinate must be larger than this vaule. ymax (float): Detection y coordinate must be smaller than this vaule.
vdrp.daophot.mk_daophot_opt(args)[source]
vdrp.daophot.test_input_files_exist(input_files)[source]

Takes a list of files names and check if they are in place. Raises DaophotException if not.

Args:
input_files (list): List of file names to check.
Raises:
DaophotException: If not all given files are present.