Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
% Extract RMS line profile for 2003B case
clear;
%flags
printfig=0;
runCS=1;
runIM=1;
runMC=1;
savemat=0;
loadmat=1;
if ispc
basedirname='Z:\Planar_Uncertainty_work\';
else
basedirname='/home/shannon/a/bhattac3/Planar_Uncertainty_work/';
end
%cases
casename_org={'PivChal03B','PivChal05B','stagnation_flow','Vortex_Ring','Jetdata'};
% casename={'PivChal03B','','','',''};
% casename={'','PivChal05B','','',''};
% casename={'','','stagnation_flow','',''};
% casename={'','','','Vortex_Ring',''};
% casename={'','','','','Jetdata'};
% runname='10_14_2015_deform_whittaker_blackman';
runname='10_22_2015_different_processing_windows';
%%
%Get directories
% [inputdir,outputdir]=in_out_directory_set(basedirname,runname);
[inputdir,outputdir]=in_out_directory_set_10_22_2015(basedirname,runname);
% casename1={'PivChal03B','PivChal05B','stagnation_flow','Vortex_Ring','Jetdata'};
%%Compute error and uncertainty estimates for each case
% compute_error_uncertainty(casename1,inputdir,outputdir,savemat);
%% Load matfile for the case
casename={'PivChal03B','','','',''};
if loadmat==1
A1=load(fullfile(outputdir{1},'PivChal03B.mat'));
end
% [covxMC,covyMC,covxIM,covyIM,covxCS,covyCS]=plot_MC_uncertainty(A1,casename,outputdir,printfig,runCS,runIM,runMC);
% covg1=[covxMC,covyMC,covxIM,covyIM,covxCS,covyCS];
%{
%% Convert to vectors
err_up=A.err_up(:);
err_vp=A.err_vp(:);
err_ud=A.err_ud(:);
err_vd=A.err_vd(:);
UMCx=A.UMCx(:);
UMCy=A.UMCy(:);
UIMx=A.UIMx(:);
UIMy=A.UIMy(:);
UCSx=A.UCSx(:);
UCSy=A.UCSy(:);
%% Eliminate bad vectors
veccutoff=0.1;
inx1=(find(abs(err_up)>veccutoff));
iny1=(find(abs(err_vp)>veccutoff));
inx2=(find(abs(err_ud)>veccutoff));
iny2=(find(abs(err_vd)>veccutoff));
err_up(inx1)=[];
err_vp(iny1)=[];
UMCx(inx1)=[];
UMCy(iny1)=[];
UIMx(inx1)=[];
UIMy(iny1)=[];
err_ud(inx2)=[];
err_vd(iny2)=[];
UCSx(inx2)=[];
UCSy(iny2)=[];
%}
% % %% Extract RMS profile at x=96th column
% % % RMS error
% % c1=96;
% % Upt=rms(squeeze(A1.err_up(end:-1:1,c1,:)),2);
% % Vpt=rms(squeeze(A1.err_vp(end:-1:1,c1,:)),2);
% % Velpt=sqrt(Upt.^2+Vpt.^2);
% % c2=95;
% % Udt=rms(squeeze(A1.err_ud(end:-1:1,c2,:)),2);
% % Vdt=rms(squeeze(A1.err_vd(end:-1:1,c2,:)),2);
% % Veldt=sqrt(Udt.^2+Vdt.^2);
% %
% % %RMS uncertainty
% % UMCt=rms(squeeze(A1.err_up(end:-1:1,c1,:)),2);
% % VMCt=rms(squeeze(A1.err_vp(end:-1:1,c1,:)),2);
% % VelMC=sqrt(Upt.^2+Vpt.^2);
% %
% % %% Plot RMS profiles
% %
% % figure;hold on;
% % plot(Velpt,1:63,'k-');
% % plot(Veldt,1:62,'k--');
%% Extract RMS profile at x=96th column
% RMS error
%% Eliminate bad vectors
veccutoff=0.1;
c1=96;
Upt=squeeze(A1.err_up(end:-1:1,c1,:));Upt(Upt>veccutoff)=nan;
Vpt=squeeze(A1.err_vp(end:-1:1,c1,:));Vpt(Vpt>veccutoff)=nan;
Velpt=sqrt(Upt.^2+Vpt.^2);
[inpy,inpx]=find(isnan(Velpt));
Velptrms=sqrt(nanmean(Velpt.^2,2));
c2=96;
Udt=squeeze(A1.err_ud(end:-1:1,c2,:));Udt(Udt>veccutoff)=nan;
Vdt=squeeze(A1.err_vd(end:-1:1,c2,:));Vdt(Vdt>veccutoff)=nan;
Veldt=sqrt(Udt.^2+Vdt.^2);
Veldtrms=sqrt(nanmean(Veldt.^2,2));
%RMS uncertainty
UMCt=rms(squeeze(A1.err_up(end:-1:1,c1,:)),2);
VMCt=rms(squeeze(A1.err_vp(end:-1:1,c1,:)),2);
VelMC=sqrt(Upt.^2+Vpt.^2);
%% Plot RMS profiles
figure;hold on;
plot(Velptrms,1:63,'k-');
plot(Veldtrms,1:62,'k--');