pro m2adif,imn=imn,imset=imset,img=img ; if n_elements(imn) eq 0 then imn = '22030' if n_elements(imset) eq 0 then imset = 'mar02_' if n_elements(img) eq 0 then img = 467 img1 = img nimg = 5 namex = '[bjackson.lasco.dat]' name='[bjackson.lasco.datn]' nami = '436' fini1 = '.fts' fini2 = '.dif' nameb = namex+imn+nami+fini1 base = readfits(nameb,hdrb) base = smooth(base,30) start: namei = namex+imn+strcompress(img,/rem)+fini1 namen = name+imset+strcompress(img,/rem)+fini2 ; second = readfits(namei,hdr) second = second - base ; ; The following two lines added to further smooth things 9/29/98 ; secon = smooth(second,15) second = second - secon tv, second ; writefits, namen, second, hdr img = img + 1 if img gt (img1+nimg-1) then goto, stop goto, start ; stop: end