############################################# img0 = ImgArray() img0.set('img_array', data0) img1 = ImgArray() img1.set('img_array', data1) nslope = 2 img0.remove_spikes(nslope=nslope) img1.remove_spikes(nslope=nslope) new_mimg, paras = img0.find_match(img1, paras0=None) ############################################# ## plot the images ####################################### data0 = img0.get('img_array') data1 = img1.get('img_array') subplot(2, 3, 1) imshow(data0) colorbar() subplot(2, 3, 2) imshow(data1) colorbar() subplot(2, 3, 3) datadiff = data1 - data0 imshow(datadiff, vmin=datadiff.mean() - 3 * datadiff.std(), vmax=datadiff.mean() + 3 * datadiff.std())
############################################# ## process of the images ############################################# img0= ImgArray(); img0.set('img_array',data0); img1= ImgArray(); img1.set('img_array',data1); nslope = 2; img0.remove_spikes(nslope=nslope); img1.remove_spikes(nslope=nslope); new_mimg,paras = img0.find_match(img1,paras0=None); ############################################# ## plot the images ####################################### data0 = img0.get('img_array'); data1 = img1.get('img_array'); subplot(2,3,1); imshow(data0);colorbar(); subplot(2,3,2); imshow(data1);colorbar(); subplot(2,3,3); datadiff=data1-data0; imshow(datadiff,vmin=datadiff.mean()-3*datadiff.std(),vmax=datadiff.mean()+3*datadiff.std());colorbar() data2 = new_mimg.get('img_array'); subplot(2,3,6); datadiff2=data1-data2;
from pylab import *; from pydao.io import Lox_Stack,ImgArray; from pydao.ohdf import OGroup; import os; dirname = r"E:\2014_08_CLS\140801\140801020"; filename_pre = "140801020#1.tif"; filename = "140801020#107.tif"; tif_filename_pre = os.path.join(dirname,filename_pre); img_pre = ImgArray(tif_filename_pre); tif_filename = os.path.join(dirname,filename); img = ImgArray(tif_filename); img_array_pre = img_pre.get('img_array'); img_array = img.get('img_array'); subplot(2,2,1); imshow(img_array_pre); colorbar(); subplot(2,2,2); imshow(img_array); colorbar(); subplot(2,2,3); imshow(img_array/img_array_pre); colorbar(); show();
from pylab import *; from pydao.io import Lox_Stack,ImgArray; from pydao.ohdf import OGroup; import os; dirname = r"D:\2014_12_CLSPEEM\141213"; filename = "141213016.tif"; tif_filename = os.path.join(dirname,filename); img = ImgArray(tif_filename); img.read(); #img.savebmp(); figure(); img_array = img.get('img_array'); imshow(img_array); colorbar(); show();
from pylab import * from pydao.io import Lox_Stack, ImgArray from pydao.ohdf import OGroup import os dirname = r"D:\2014_12_CLSPEEM\141213" filename = "141213016.tif" tif_filename = os.path.join(dirname, filename) img = ImgArray(tif_filename) img.read() #img.savebmp(); figure() img_array = img.get('img_array') imshow(img_array) colorbar() show()