Hello Mike,For my Q 1, If I don't specify the arguments on the command line,ct> tab2spec
ERROR on line 51: Header file name not found or ambiguous ([0])
tab2spec ()Line 51 above refers to the end statement in the procedure below:
procedure tab2spec (fusefile, iraffile)file fusefile {prompt="Name of calibrated Fuse ttag file"}
file iraffile {prompt="Name of output Iraf image file"}begin
file infile, outfile, fluxtemp, wavetemp
int naxis2
real exptime# Make sure that ttools and ctools packages are loaded
if (! defpac ("ttools") || ! defpac ("ctools"))
byeinfile = fusefile
outfile = iraffile# get exposure time
keypar (infile//"[0]", "exptime")
exptime = real(keypar.value)
if (exptime == 0) {
print ("file ", infile, " is empty")
delete (infile)
bye
}# get number of rows in fits table
keypar (infile//"[1]", "naxis2")
naxis = int(keypar.value)# make temporary images
fluxtemp = mktemp ("tmp$flux.fits")
wavetemp = mktemp ("tmp$wave.fits")# extract flux and wavelength and construct 1-dim IRAF images
tabim(infile, fluxtemp, "flux", 1, naxis2)
tabim(infile, wavetemp, "wave", 1, naxis2)# create a 1-dim spectra
unlearn mkmultispec
mkmultispec (fluxtemp, wavetemp, outfile, function="spline3", nterms=7)# put in the exposure time
unlearn hedit
hedit (outfile, "exptime", exptime, add+, verify-)imdel (fluxtemp, ver-, >& "dev$null")
imdel (wavetemp, ver-, >& "dev$null")endFor my Q 2, could you show me how to use an editor to create an @outfile from @infile? I really appreciate your help.Thank you.Siti