procedure mksky (inlist, outpref, flat, dark, apref) string inlist {prompt="list of standard images"} string outpref {prompt="output image name"} string flat { prompt="flat field name"} string dark { prompt="dark image"} string apref { prompt="aperture reference image"} struct *instr begin imreplace('@'//inlist,0.0, lower=32000) imdel("temp.med",ver-) imcomb ('@'//inlist,"temp.med", plfile="", sigma="", combine="median", reject="pclip", project=no, outtype="real", offsets="", masktype="none", maskvalue=0., blank=0., scale="none", zero="none", weight="none", statsec="", expname="", lthreshold=INDEF, hthreshold=INDEF, nlow=1, nhigh=1, mclip=yes, lsigma=3., hsigma=3., rdnoise="0.", gain="1.", sigscale=0.1, pclip=-0.5, grow=0) imarith("temp.med", "-", dark, "temp.med") imarith("temp.med", "/", flat, "temp.med") hedit("temp.med", "DISPAXIS", 1, ver-, add+) apall ("temp.med", 1, output=outpref//".sky", format="onedspec", references=apref, profiles="", interactive=yes, find=no, recenter=no, resize=no, edit=yes, trace=no, fittrace=no, extract=yes, extras=no, review=no, line=INDEF, nsum=10, lower=-1., upper=1., apidtable="", b_function="chebyshev", b_order=1, b_sample="-20:-10,10:20", b_naverage=1, b_niterate=20, b_low_reject=3., b_high_rejec=3., b_grow=0., width=5., radius=10., threshold=0., minsep=5., maxsep=1000., order="increasing", apertures="", npeaks=INDEF, shift=yes, llimit=INDEF, ulimit=INDEF, ylevel=0.1, peak=yes, bkg=yes, r_grow=0., avglimits=no, t_nsum=10, t_step=10, t_nlost=3, t_function="legendre", t_order=2, t_sample="*", t_naverage=1, t_niterate=10, t_low_reject=2.2, t_high_rejec=2.2, t_grow=0., background="none", skybox=1, weights="variance", pfit="fit1d", clean=yes, saturation=INDEF, readnoise="2100", gain="1512", lsigma=3., usigma=3., nsubaps=1) imcomb (outpref//".sky.00??.imh", outpref//".sky.imh", plfile="", sigma="", combine="median", reject="pclip", project=no, outtype="real", offsets="none", masktype="badvalue", maskvalue=0., blank=0., scale="median", zero="none", weight="none", statsec="", expname="", lthreshold=INDEF, hthreshold=INDEF, nlow=0, nhigh=1, nkeep=1, mclip=yes, lsigma=3., hsigma=3., rdnoise="9", gain="2", snoise="0", sigscale=0.1, pclip=-0.5, grow=0) identify (outpref//".sky.imh", section="middle line", database="database", coordlist="irlines", nsum="10", match=10., maxfeatures=50, zwidth=100., ftype="emission", fwidth=4., cradius=5., threshold=10., minsep=2., function="legendre", order=2, sample="*", niterate=3, low_reject=3., high_reject=3., grow=0., autowrite=no, graphics="stdgraph", cursor="") refspec (outpref//".sky.imh", "yes", references=outpref//".sky.imh", apertures="", refaps="", ignoreaps=yes, select="interp", sort="EPOCH", group="EPOCH", time=no, timewrap=17., override=yes, confirm=yes, assign=yes, verbose=yes) dispcor (outpref//".sky.imh", outpref//".sky.wav.imh", linearize=yes, database="database", table="", w1=INDEF, w2=INDEF, dw=INDEF, nw=INDEF, flux=yes, samedisp=no, global=no, ignoreaps=no, confirm=no, listonly=no, verbose=yes) imdel(outpref//".sky.00??.imh", ver-) end