# CL to make on/off dome flats # By Richard Elston 9/17/95 # procedure mkflat (onlist, offlist, flat) string onlist {prompt="List of lamps on images"} string offlist {prompt="List of lamps off images"} string flat {prompt="Name of output flat field image"} begin imdel("diff"//onlist, yes) imarith(onlist, "-", offlist, "diff"//onlist) imdel(flat, yes) imcomb ("diff"//onlist, flat, plfile="", sigma="", logfile="STDOUT", combine="median", reject="sigclip", project=no, outtype="real", offsets="none", masktype="none", maskvalue=0., blank=0., scale="med", zero="none", weight="none", statsec="", expname="", lthreshold=INDEF, hthreshold=INDEF, nlow=1, nhigh=1, nkeep=1, mclip=yes, lsigma=3., hsigma=3., rdnoise="0.", gain="1.", snoise="0.", sigscale=0.1, pclip=-0.5, grow=0) imdel("diff"//onlist, yes) response (flat, flat, flat, interactive=yes, threshold=INDEF, sample="*", naverage=1, function="legendre", order=30, low_reject=2., high_reject=2., niterate=4, grow=0., graphics="stdgraph", cursor="") imreplace(flat, 0, lower=INDEF, upper=0.6) end