procedure improject (list) # This procedure calculates a median value for a MEF mosaic image # and then runs mscimage to project the image. Parameters are # optimized for the WOCS project. # # Written 8/2002 # By Glenn Tiede string list {prompt="list of object files -- without extensions"} string pref {"mos",prompt="prefix for projected images"} struct *imglist begin # # Declarations # real norm,cmin,cmax string imgfile, img imgfile = mktemp("tmp$ctrfile") sections (list,option="fullname", >imgfile) imglist = imgfile # # For each image, calculate the value to use for the edge extension and # do the projection. # while (fscan(imglist, img) != EOF) { time print("projecting image "//img," ...") imgets(img//"[4]","SATURATE") cmax = real(imgets.value) - 1000.0 cmin = -1000.0 iterstat(img//"[4][120:1900,350:3800]",nsigrej=5, maxiter=20,print-,verbose-,lower=cmin,upper=cmax) norm = iterstat.mean mscimage (img,pref//img, format="image", pixmask=yes, verbose=yes, wcssource="image", reference="", ra=INDEF, dec=INDEF, scale=INDEF, rotation=INDEF, blank=-1000., interpolant="sinc17", minterpolant="linear", boundary="constant", constant=norm, fluxconserve=no, ntrim=7, nxblock=4200, nyblock=2100, interactive=no, nx=10, ny=20, fitgeometry="general", xxorder=4, xyorder=4, xxterms="half", yxorder=4, yyorder=4, yxterms="half", fd_in="", fd_ext="", fd_coord="") print(" ") print(" ") time } end