Hello everyone,
I have a floating point array in which I'm trying to create a tiff of. I can easily create a tiff of the image created by TVSCL (output tiff matches exactly the image window), but I want to create a tiff of the image created by the TV function (output tif no longer matches image window). I have posted my routine below, so I hope someone can help me out, Thanks in advance!
Justin
pha=fltarr(xs,ys)
openr,1,'snaphu_12978-16986_60m_diff.unw_cut'
readu,1,pha
close,1
;convert to mm
rpha2=pha/(2*!Pi)*28.3
pha=rpha2
;rotate to proper orientation
pha=rotate(pha,2)
;view un-altered (no coherence mask) unwrapped image
window,7,xsiz=xs/sc,ysiz=ys/sc, title='raw UNwrapped'
loadct,13
;---converts color bar into 1 color bar = 28.3mm---
all=(abs(min(pha))+abs(max(pha)))/28.3
mmulti,all
rpha=congrid(pha,xs/sc,ys/sc)
tv,rpha
TVLCT, R, G, B, /GET
r2=rotate(c1,7)
write_tiff,'z_snaphu_12978-16986_diff.unw_cut.tif',bytscl(r2), RED=R, GREEN=G, BLUE=B
|