-- CarmeloArcidiacono - 09 Apr 2012

bad0 = readfits('/OldRepository/carmelo/badpixel.fits')

rms = readfits('/OldRepository/carmelo/IRTCrms.fits') &

badpixel = rms * 0. &

badpixel[where(rms lt 0.01)] = 1 &

writefits,'/OldRepository/carmelo/badpixel.irtc.fits',badpixel,h &

agw_col_correct,'/OldRepository/carmelo/badpixel.irtc.fits',rms,badpixel_image,dark & badpixel[where(rms gt 2)] = 1 &

writefits,'/OldRepository/carmelo/badpixel.irtc.fits',badpixel,h & badpixel = rms * 0. & badpixel[where(rms lt 0.01)] = 1 & badpixel[where(dark gt 1.3)] = 1 &

writefits,'/OldRepository/carmelo/badpixel.irtc.fits',badpixel,h

file=file_search('/OldRepository/carmelo/IRTCflat/qr*.fits',COUNT=nfile) & ima=float(readfits(file[0],h)) &

ima=ima/median(ima) &

for i=1,nfile-1 do begin & temp=float(readfits(file[i],h)) & temp=temp/median(temp) & ima=[ima,temp] & endfor & rms = fltarr(320,256)

for i = 0,319 do for j = 0,255 do rms[i,j] = stddev(ima[i,j,*]) & agw_col_correct,'/OldRepository/carmelo/badpixel.irtc.fits',rms,badpixel_image,dark &

ind = [where(rms lt 0.000000000000000000001 or rms ge 0.015,count)] &

print,'rms ',count & badpixel = readfits('/OldRepository/carmelo/badpixel.irtc.fits',h) &

b=badpixel & b[ind] = 1 & print,total(badpixel),total(b) & writefits,'../badpixel.irtc.0.fits',b,h &

badpixel = readfits('/OldRepository/carmelo/badpixel.irtc.fits',h) & b=badpixel & b[ind] = 1 & print,total(badpixel),total(b) &

writefits,'../badpixel.irtc.1.fits',(b+bad0)<1,h
Topic revision: r1 - 09 Apr 2012, CarmeloArcidiacono
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback