# CL extract by spectra and wavelength calibrate x-disp OSIRIS data # by Richard Elston, 8/18/93 # procedure mkxsky(inimage, outpref, inflat) string inimage {prompt="Input sky spectra"} string outpref {prompt="output spectra prefix"} string inflat {prompt="Input flat field prefix"} begin # # flatten and make subimages of the input sky spectra # xdispflatten (inimage, inflat, outpref) # # extract spectra and then combine # imdel("xyzskyref*.imh") imcopy (outpref//".hsub.imh", "xyzskyref.imh") apall ("xyzskyref.imh", 1, output="", format="onedspec", references="", profiles="", interactive=yes, find=no, recenter=no, resize=no, edit=yes, trace=no, fittrace=yes, extract=yes, extras=no, review=no, line=INDEF, nsum=10, lower=-1.5, upper=1.5, apidtable="", b_function="chebyshev", b_order=1, b_sample="-10:-6,6:10", b_naverage=-3, b_niterate=0, 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=1, t_step=1, t_nlost=3, t_function="legendre", t_order=3, t_sample="*", t_naverage=1, t_niterate=0, t_low_reject=3., t_high_rejec=3., t_grow=0., background="none", skybox=1, weights="variance", pfit="fit1d", clean=no, saturation=INDEF, readnoise="0.", gain="1.", lsigma=4., usigma=4., nsubaps=1) apall (outpref//".ksub", 1, output="", format="onedspec", references="xyzskyref.imh", profiles="", interactive=no, find=no, recenter=no, resize=no, edit=no, trace=no, fittrace=no, extract=yes, extras=no, review=no, line=INDEF, nsum=10, lower=-1.5, upper=1.5, apidtable="", b_function="chebyshev", b_order=1, b_sample="-10:-6,6:10", b_naverage=-3, b_niterate=0, 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=1, t_step=1, t_nlost=3, t_function="legendre", t_order=3, t_sample="*", t_naverage=1, t_niterate=0, t_low_reject=3., t_high_rejec=3., t_grow=0., background="none", skybox=1, weights="variance", pfit="fit1d", clean=no, saturation=INDEF, readnoise="0.", gain="1.", lsigma=4., usigma=4., nsubaps=1) apall (outpref//".jsub", 1, output="", format="onedspec", references="xyzskyref.imh", profiles="", interactive=no, find=no, recenter=no, resize=no, edit=no, trace=no, fittrace=no, extract=yes, extras=no, review=no, line=INDEF, nsum=10, lower=-1.5, upper=1.5, apidtable="", b_function="chebyshev", b_order=1, b_sample="-10:-6,6:10", b_naverage=-3, b_niterate=0, 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=1, t_step=1, t_nlost=3, t_function="legendre", t_order=3, t_sample="*", t_naverage=1, t_niterate=0, t_low_reject=3., t_high_rejec=3., t_grow=0., background="none", skybox=1, weights="variance", pfit="fit1d", clean=no, saturation=INDEF, readnoise="0.", gain="1.", lsigma=4., usigma=4., nsubaps=1) apall (outpref//".isub", 1, output="", format="onedspec", references="xyzskyref.imh", profiles="", interactive=no, find=no, recenter=no, resize=no, edit=no, trace=no, fittrace=no, extract=yes, extras=no, review=no, line=INDEF, nsum=10, lower=-1.5, upper=1.5, apidtable="", b_function="chebyshev", b_order=1, b_sample="-10:-6,6:10", b_naverage=-3, b_niterate=0, 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=1, t_step=1, t_nlost=3, t_function="legendre", t_order=3, t_sample="*", t_naverage=1, t_niterate=0, t_low_reject=3., t_high_rejec=3., t_grow=0., background="none", skybox=1, weights="variance", pfit="fit1d", clean=no, saturation=INDEF, readnoise="0.", gain="1.", lsigma=4., usigma=4., nsubaps=1) # # combine the spectra into one # imcomb ("xyzskyref.00??.imh", outpref//".hsky", plfile="", sigma="", logfile="STDOUT", combine="median", reject="pclip", 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("xyzskyref*.imh") imdel(outpref//".hsub*.imh") imcomb (outpref//".ksub.00??.imh", outpref//".ksky", plfile="", sigma="", logfile="STDOUT", combine="median", reject="pclip", 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(outpref//".ksub*.imh") imcomb (outpref//".jsub.00??.imh", outpref//".jsky", plfile="", sigma="", logfile="STDOUT", combine="median", reject="pclip", 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(outpref//".jsub*.imh") imcomb (outpref//".isub.00??.imh", outpref//".isky", plfile="", sigma="", logfile="STDOUT", combine="median", reject="pclip", 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(outpref//".isub*.imh") # # identify the spectra # identify (outpref//".ksky.imh", section="middle line", database="database", coordlist="argon.list ", nsum=10, match=10., maxfeatures=50, zwidth=100., ftype="emission", fwidth=4., cradius=5., threshold=10., minsep=2., function="legendre", order=3, sample="*", niterate=4, low_reject=3., high_reject=3., grow=0., autowrite=no, graphics="stdgraph", cursor="") identify (outpref//".hsky.imh", section="middle line", database="database", coordlist="argon.list ", nsum=10, match=10., maxfeatures=50, zwidth=100., ftype="emission", fwidth=4., cradius=5., threshold=10., minsep=2., function="legendre", order=3, sample="*", niterate=4, low_reject=3., high_reject=3., grow=0., autowrite=no, graphics="stdgraph", cursor="") identify (outpref//".jsky.imh", section="middle line", database="database", coordlist="argon.list ", nsum=10, match=10., maxfeatures=50, zwidth=100., ftype="emission", fwidth=4., cradius=5., threshold=10., minsep=2., function="legendre", order=3, sample="*", niterate=4, low_reject=3., high_reject=3., grow=0., autowrite=no, graphics="stdgraph", cursor="") identify (outpref//".isky.imh", section="middle line", database="database", coordlist="argon.list ", nsum=10, match=10., maxfeatures=50, zwidth=100., ftype="emission", fwidth=4., cradius=5., threshold=10., minsep=2., function="legendre", order=2, sample="*", niterate=4, low_reject=3., high_reject=3., grow=0., autowrite=no, graphics="stdgraph", cursor="") end