Vista mypro.pro string2 string3 string4 string5 => runs Vista through mypro.pro, with string variable argN set to stringN if mypro.pro finishes with "end" Vista silently terminates ! Set (numeric) variables set am=1145 bm=1222 ! Snag FITS keywords NAXIS1 from header of buffer dest (variable) set size={dest:NAXIS1} ! variable arithmetic is forward polish, beware. set slope=-ydiff/xdiff typ bias1 ! String variables (different name space => can use same names as numeric) string fnum '178' ! Set a string to token from file myfile, line k, token 2 string FIELD '@myfile.dat#k#2' ! Evaluate a string as a portion of a command rd 1 {mystring} ! Write variable info to a file printf {FIELD}_{PATCH}_{DATE}_{INST}_{FILT}.{DITH}.{CHIP} printf '%a30 %f8.1 %f8.3 %f8.3' {arg2} sky sens frng ! Execute a shell command ! Note that there cannot be a space between the ">" and the filename! % ls WARP/f{field}_{patch}*.fits | wc >{patlist} % ls WARP/f{field}_{patch}*.fits | sed 's/_/ /g' >>{patlist} ! Define a box and perform analysis on an image box 1 sx=0 sy=0 nx=512 ny=512 box 1 sx={3:CNPIX1} ex=520 sy=0 ny=1 abx 1 1 silent mean=a1 rms=rms median=med medrms=medrms sx=sx ! Interactively do image stats analysis itv ! Image arithmetic with constants ac i=scratch bias1 sc i=scratch bias1 mc i=scratch bias1 dc i=scratch bias1 ! Image arithmetic with two images ai i=fixflat i=scratch si i=fixflat i=scratch mi i=fixflat i=scratch di i=fixflat i=scratch ! Mathematical functions ln i=dest inv log i=dest min 1 2 sqrt i=dest ! Clip function clip 1 max=thresh vmax=10000 min=0 vmin=-100 clip i=dest sn=snbad snlim=snpoor tv ! Fit a surface, smooth and image surface i=dest params=(x0,y0,0,slope,1,0,0,0) smooth i=dest fwc=5 fiterpolate 8 nx=5 ny=4 ! Shift an image shift 1 dx=45 dy=1 ! Create a new image open 1 nx=512 ny=512 open 1 nx=512 ny=512 header=6 ! Window down an old image wind i=image box=1 ! Copy an image cop 20 1 cop i=dest i=image box=1 cop 10 i=dest xbin=-2 ybin=2 ! Interactively clean an image or do it automatically tidy clean i=dest ! Write some text into an image wtext 1 just=8 value=2000 loc=(i*mx+m,j*my) label="{dith}.{chip}" ! Interactively examine/photometer stars and objects psf scale=0.1375 rad=10 print phot print phot file=save.dat print phot diff ! Display an image tv i=dest thresh=-200 sat=200 cf=jt tv 1 screen=1 old sqrt tv 1 zoom=-4 color bw inv ! Line graphics plot 10 y=200 plot i=mybuf r=(6,5,0,1,2,3,4) save=dudley_nt1.spec ! Read an image rd 1 sky.179 rd 10 ./nt1/lris0037 short ! Read the 7th image in a multi-extension fits file rd 9 ./nt1/lris0037 mef=7 ! Read the 2nd image in a 3-d fits file rd 9 ./nt1/lris0037 3d=1 ! Write an image wd 1 afsky.cln unsigned wd 1 zfringe.fits short wd 5 iflat.016 unsigned scale=3.0 wd i=image fringe.{fnum} ! Call a procedure call ./abflatten ! Branching constructs (only usable in non-command line procedures) do k=2,nimage+1 string FIELD '@myfile.dat#k#2' end_do if xminsx&yminsy mc i=tmp 0 else_if rot=1&flip=0 cop i=image i=image flip end_if