Skip to content
Snippets Groups Projects
Commit 8ae51b6b authored by Olivier Sauter's avatar Olivier Sauter
Browse files

rm blanks then same as CXRS analysis

parent c23a4b02
Branches
Tags
Loading
Pipeline #41108 passed
...@@ -6,15 +6,15 @@ function profiles=CXRS_fit_profies(V,Times,param_prof,param_plot); ...@@ -6,15 +6,15 @@ function profiles=CXRS_fit_profies(V,Times,param_prof,param_plot);
sel=find((V.t>=Times(1))&(V.t<=Times(2))); sel=find((V.t>=Times(1))&(V.t<=Times(2)));
x = V.x(sel); dx = V.dx(sel); y = V.y(sel); dy = V.dy(sel); t = V.t(sel); dt = V.dt(sel); sys = V.sys(sel); x = V.x(sel); dx = V.dx(sel); y = V.y(sel); dy = V.dy(sel); t = V.t(sel); dt = V.dt(sel); sys = V.sys(sel);
% shift of duplicated points in rho % shift of duplicated points in rho
Xb=x; Xb=x;
for ip=1:length(Xb) for ip=1:length(Xb)
sss=1:length(Xb); sss=find(sss~=ip); sss=1:length(Xb); sss=find(sss~=ip);
iff=(find(Xb(ip)==Xb(sss))); iff=(find(Xb(ip)==Xb(sss)));
if length(iff)>0, Xb(iff(1))=Xb(iff(1))+1.e-8; end if length(iff)>0, Xb(iff(1))=Xb(iff(1))+1.e-8; end
end end
% sort points in rho % sort points in rho
[x,iii] = sort(Xb); [x,iii] = sort(Xb);
if length(iii)==0 % No data if length(iii)==0 % No data
profiles.t_lim=Times; profiles.t_lim=Times;
profiles.x_prof=[]; profiles.x_prof=[];
...@@ -32,12 +32,12 @@ if length(iii)==0 % No data ...@@ -32,12 +32,12 @@ if length(iii)==0 % No data
end end
return; return;
end end
dx=dx(iii); y=y(iii); dy=dy(iii); t=t(iii); dt=dt(iii);sys=sys(iii); dx=dx(iii); y=y(iii); dy=dy(iii); t=t(iii); dt=dt(iii);sys=sys(iii);
if isempty(param_prof.xout), param_prof.xout=linspace(min(x)*0.98,max(x)*1.02,101); end if isempty(param_prof.xout), param_prof.xout=linspace(min(x)*0.98,max(x)*1.02,101); end
if ((min(x)-min(param_prof.xout))>0.45), if ((min(x)-min(param_prof.xout))>0.45),
param_prof.xout=linspace(min(x)*0.85,max(param_prof.xout),length(param_prof.xout)); param_prof.xout=linspace(min(x)*0.85,max(param_prof.xout),length(param_prof.xout));
%disp(sprintf('Redefine rho for %4.4f-%4.4fsec',Times)); %disp(sprintf('Redefine rho for %4.4f-%4.4fsec',Times));
end end
x_prof = param_prof.xout; x_prof = param_prof.xout;
XXmax=max([max(x)+0.01 1.3]); XXmax=max([max(x)+0.01 1.3]);
if length(iii)>=10, if length(iii)>=10,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment