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

fix n_x_point from linear interpolation and problem with psitbxtcv2 removing time points

integers should be piece-wise constant interpolated, and psitbxtcv2/psitbxtcv use unique(t) once closest times are taken, thus it removes time points if time_out array delta_t smaller than liuqe (which is easy since typically 17ms). At this stage modified psitbxtcv2/psitbxtcv with unique_t=false input arg in my matlab_imas folder
parent d021805c
No related branches found
No related tags found
1 merge request!31fix n_x_point from linear interpolation and problem with psitbxtcv2 removing time points
Pipeline #25464 passed
...@@ -203,8 +203,9 @@ for it=1:numel(ids_equilibrium.time) ...@@ -203,8 +203,9 @@ for it=1:numel(ids_equilibrium.time)
ids_equilibrium.time_slice{it}.boundary.geometric_axis.r = temp.rgeom.data(it); ids_equilibrium.time_slice{it}.boundary.geometric_axis.r = temp.rgeom.data(it);
ids_equilibrium.time_slice{it}.boundary.geometric_axis.z = temp.zgeom.data(it); ids_equilibrium.time_slice{it}.boundary.geometric_axis.z = temp.zgeom.data(it);
if temp.n_x_point.data(it) > 0 if temp.n_x_point.data(it) > 0
ids_equilibrium.time_slice{it}.boundary.x_point(1:temp.n_x_point.data(it)) = ids_equilibrium.time_slice{it}.boundary.x_point(1); % not that asking for time_out may lead to interpolated nb of X-points non integer, should included piece-wise constant interpolation for equil quantities...
for i=1:temp.n_x_point.data(it) ids_equilibrium.time_slice{it}.boundary.x_point(1:fix(temp.n_x_point.data(it))) = ids_equilibrium.time_slice{it}.boundary.x_point(1);
for i=1:fix(temp.n_x_point.data(it))
ids_equilibrium.time_slice{it}.boundary.x_point{i}.r = temp.r_x_point.data(i,it); ids_equilibrium.time_slice{it}.boundary.x_point{i}.r = temp.r_x_point.data(i,it);
ids_equilibrium.time_slice{it}.boundary.x_point{i}.z = temp.z_x_point.data(i,it); ids_equilibrium.time_slice{it}.boundary.x_point{i}.z = temp.z_x_point.data(i,it);
end end
...@@ -296,7 +297,7 @@ switch liuqe_opt ...@@ -296,7 +297,7 @@ switch liuqe_opt
case {12,13}, psitbx_str=['LIUQE' num2str(mod(liuqe_opt,10))]; case {12,13}, psitbx_str=['LIUQE' num2str(mod(liuqe_opt,10))];
otherwise, error(['Unknown LIUQE version, liuqe = ' num2str(liuqe_opt)]); otherwise, error(['Unknown LIUQE version, liuqe = ' num2str(liuqe_opt)]);
end end
fsd = psitbxtcv2(shot,profiles_1d.volume.t,'FS',psitbx_str); % will get automatically the correct time interval fsd = psitbxtcv2(shot,profiles_1d.volume.t,'FS',psitbx_str,false); % will get automatically the correct time interval
grho_metric_3D = metric(fsd,-1); grho_metric_3D = metric(fsd,-1);
% Introduced new anonymous function to compute FS average ... % Introduced new anonymous function to compute FS average ...
metric_FS = metric(grho_metric_3D.grid,[2,3]); metric_FS = metric(grho_metric_3D.grid,[2,3]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment