procedure xdisptel (inlist, outpref, flat) string inlist {prompt="list of standard images"} string outpref {prompt="output image prefix"} string flat { prompt="flat field prefix"} bool inter {yes, prompt="Interactively extract the spectra", mode="h"} bool delsp {yes, prompt="Delete individual spectra", mode="h"} struct *instr begin string infile, outfile instr=inlist imdel("temp.med", ver-) imcomb ('@'//inlist,"temp.med", plfile="", sigma="", logfile="STDOUT", 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) while(fscan(instr, infile) !=EOF) { outfile="xyz"//infile imarith(infile,"-", "temp.med", outfile) xdispflatten(outfile, flat, outfile) xdisplay(outfile) apall (outfile//".ksub.imh", 1 , format="oned", output="", references="", profiles="", interactive=inter ,find=yes, recenter=yes, resize=no, edit=yes, trace=yes, fittrace=yes, extract=yes, extras=no, review=no, line=INDEF, nsum=30, lower=-7,upper=7, apidtable="", b_function="chebyshev", b_order=1, b_sample="-20:-8,8:20", b_naverage=1, b_niterate=5, b_low_reject=2., b_high_rejec=2., 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=300, t_step=10, t_function="cheb", t_order=3, t_sample="*", t_naverage=1, t_niterate=5, t_low_reject=2., t_high_rejec=2., t_grow=0., background="fit", skybox=1, weights="variance", clean=no, saturation=INDEF, readnoise="30", gain="10", lsigma=4., usigma=4., nsubaps=1) apall (outfile//".hsub.imh", 1 , format="oned", output="", references="", profiles="", interactive=inter ,find=yes, recenter=yes, resize=no, edit=yes, trace=yes, fittrace=yes, extract=yes, extras=no, review=no, line=INDEF, nsum=30, lower=-7,upper=7, apidtable="", b_function="chebyshev", b_order=1, b_sample="-20:-8,8:20", b_naverage=1, b_niterate=5, b_low_reject=2., b_high_rejec=2., 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=300, t_step=10, t_function="cheb", t_order=3, t_sample="*", t_naverage=1, t_niterate=5, t_low_reject=2., t_high_rejec=2., t_grow=0., background="fit", skybox=1, weights="variance", clean=no, saturation=INDEF, readnoise="30", gain="10", lsigma=4., usigma=4., nsubaps=1) apall (outfile//".jsub", 1 , format="oned", output="", references="", profiles="", interactive=inter ,find=yes, recenter=yes, resize=no, edit=yes, trace=yes, fittrace=yes, extract=yes, extras=no, review=no, line=INDEF, nsum=30, lower=-7,upper=7, apidtable="", b_function="chebyshev", b_order=1, b_sample="-20:-8,8:20", b_naverage=1, b_niterate=5, b_low_reject=2., b_high_rejec=2., 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=300, t_step=10, t_function="cheb", t_order=3, t_sample="*", t_naverage=1, t_niterate=5, t_low_reject=2., t_high_rejec=2., t_grow=0., background="fit", skybox=1, weights="variance", clean=no, saturation=INDEF, readnoise="30", gain="10", lsigma=4., usigma=4., nsubaps=1) apall (outfile//".isub", 1 , format="oned", output="", references="", profiles="", interactive=inter ,find=yes, recenter=yes, resize=no, edit=yes, trace=yes, fittrace=yes, extract=yes, extras=no, review=no, line=INDEF, nsum=30, lower=-7,upper=7, apidtable="", b_function="chebyshev", b_order=1, b_sample="-20:-8,8:20", b_naverage=1, b_niterate=5, b_low_reject=2., b_high_rejec=2., 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=300, t_step=10, t_function="cheb", t_order=3, t_sample="*", t_naverage=1, t_niterate=5, t_low_reject=2., t_high_rejec=2., t_grow=0., background="fit", skybox=1, weights="variance", clean=no, saturation=INDEF, readnoise="30", gain="10", lsigma=4., usigma=4., nsubaps=1) # del("database/aplast",ver-) # del("database/apt"//infile,ver-) } imcomb ("xyz*ksub.0001.imh",outpref//".kavg", plfile="", sigma="", logfile="STDOUT", combine="average", reject="pclip", project=no, outtype="real", offsets="", masktype="none", maskvalue=0., blank=0., scale="median", 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) imcomb ("xyz*hsub.0001.imh",outpref//".havg", plfile="", sigma="", logfile="STDOUT", combine="average", reject="pclip", project=no, outtype="real", offsets="", masktype="none", maskvalue=0., blank=0., scale="median", 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) imcomb ("xyz*jsub.0001.imh",outpref//".javg", plfile="", sigma="", logfile="STDOUT", combine="average", reject="pclip", project=no, outtype="real", offsets="", masktype="none", maskvalue=0., blank=0., scale="median", 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) imcomb ("xyz*isub.0001.imh",outpref//".iavg", plfile="", sigma="", logfile="STDOUT", combine="average", reject="pclip", project=no, outtype="real", offsets="", masktype="none", maskvalue=0., blank=0., scale="median", 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) if (delsp ) { imdel("xyz*isub.0001.imh") imdel("xyz*jsub.0001.imh") imdel("xyz*hsub.0001.imh") imdel("xyz*ksub.0001.imh") } # imdel("xyz*sub.imh") end