!! Now extracting a spectrum with EXTRACT/AVERAGE !! !! [ other method is: !! - Optimal extraction with EXTRACT/LONG !! ] !! set/long object={p2},{p3} SET/LONG LOWSKY = {p4},{p5} uppsky={p6},{p7} SKYFIT/LONG {p1} sky LOAD sky cuts=f,ihap scale=-2 write/out this is the fitted sky write/out ... exit with right-mouse button into display get/cur COMPUTE/IMAGE obsky = {p1} - sky load obsky cuts=f,ihap scale=-2 @a autocuts obsky write/out this is the object - sky image !write/out ... exit with right-mouse button into display !get/cur write/out extracting... EXTRACT/AVERAGE obsky object write/out extraction finished PLOT object get/gcur $ echo {p1} {p8} | sed s/.bdf// > x $ cat x | awk '{print "mv object.bdf "$1"_obj"$2".bdf"}' > mv.sh $ sh mv.sh $cat mv.sh | awk '{print "plot "$3}' > _plot.prg $cat mv.sh | awk '{print "mv postscript.ps "$3".ps"}' > renps.sh $cat mv.sh | awk '{print "gv "$3".ps"}' > _gv.sh set/graph xaxis=auto yaxis=auto @@ _plot copy/grap postscript $ sh renps.sh $ sh _gv.sh !$ cat mv.sh | awk '{print "plot "$3}' > pl.prg !@@ pl !copy/graph postscript !$gv postscript.ps& @@ _plot