- Timestamp:
- Jul 18, 2018, 10:31:09 AM (6 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/proj_field.m
r1048 r1054 919 919 %VarName{ivar}=FieldData.ListVarName{ivar}; 920 920 if test_interp2% interpolate on new grid 921 FieldData.(FieldData.ListVarName{ivar})=interp2(FieldData.(AXName),FieldData.(AYName),FieldData.(FieldData.ListVarName{ivar}),AXI,AYI );%TO TEST921 FieldData.(FieldData.ListVarName{ivar})=interp2(FieldData.(AXName),FieldData.(AYName),FieldData.(FieldData.ListVarName{ivar}),AXI,AYI'); 922 922 end 923 923 vec_A=reshape(squeeze(FieldData.(FieldData.ListVarName{ivar})),npx*npy,nbcolor); %put the original image in colum -
trunk/src/series/bed_scan.m
r1053 r1054 151 151 %% Load the init bed scan 152 152 153 y 0=90.05;154 Mfiltre=ones(2,10) ;%filter matrix for imnages153 y=90.05-0.05*i1_series{1}; 154 Mfiltre=ones(2,10)/20;%filter matrix for imnages 155 155 tic 156 156 % y=zeros(1,nimages); 157 157 % X_new=zeros(4096,nimages); 158 158 x=1:4096; 159 step=Param.IndexRange.incr_i;160 159 % img=1; 161 160 %filecell{1,img}= list of the images _init … … 167 166 % filtering 168 167 a=filter2(Mfiltre,a); 169 [ ~,iy]=max(a);168 [imax,iy]=max(a); 170 169 Z=squeeze(iy); 171 Z_s(:,img)=smooth(Z,50,'rloess'); 172 y(img)=y0-(0.05.*step); 173 y0=y(img); 170 iy(imax<50)=NaN; 171 Z_s(:,img)=smooth(Z,40,'rloess'); 172 % y(img)=y0-(0.05.*step); 173 % y0=y(img); 174 174 X_new(:,img)=phys_scan(x,y(img)); 175 175 end … … 211 211 [imaxb,iyb]=max(b); 212 212 Zb=squeeze(iyb); 213 Z_sb(:,img)=smooth(Zb,40,'rloess'); 213 iyb(imaxb<50)=NaN; 214 Z_sb(:,img)=smooth(Zb,20,'rloess'); 214 215 end 215 216 216 217 217 218 %% bed change 218 219 219 dZ=Z_s-Z_sb; 220 220 dZ_new=zeros(4096,nimages2); 221 222 for img=1:nimages2 223 dZ_new(:,img)=phys_scanz(dZ(:,img),y(img)); 221 for img=1:nimages2 222 dZ_new(:,img)=phys_scanz(dZ(:,img),y(img)); 224 223 end 225 224 226 225 227 226 %% PLOTS 228 [Y_m,X_m]=meshgrid(y(1,:),X_new(:,1)); 227 coord_x=X_new(1,end):0.1:X_new(end,end); 228 [Y_m,X_m]=meshgrid(y(1,:),coord_x); 229 229 Y_new=Y'; 230 230 dZ_mesh=griddata(X_new,Y_new,dZ_new,X_m,Y_m); … … 271 271 Data.VarAttribute{3}.Role='scalar'; 272 272 Data.VarAttribute{3}.unit='cm'; 273 Data.coord_x= X_new(:,1);274 Data.coord_y= y(1,:);273 Data.coord_x=[coord_x(1) coord_x(end)]; 274 Data.coord_y=[y(1) y(end)]; 275 275 Data.dZ=dZ_mesh'; 276 276 struct2nc(fullfile(DirOut,'dZ.nc'),Data) -
trunk/src/uvmat.m
r1051 r1054 3919 3919 UvData.ProjObject{1}.Angle=[0 0]; 3920 3920 if isfield(UvData.Field,'CoordUnit') 3921 UvData.ProjObject{1}.CoordUnit= CoordUnit;3921 UvData.ProjObject{1}.CoordUnit=UvData.Field.CoordUnit; 3922 3922 end 3923 3923 elseif isfield(UvData,'Z')
Note: See TracChangeset
for help on using the changeset viewer.