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

add psi_axis psi_bnd in core_profiles, correct psi and ec_launchers launching_positions

parent 6c0ad182
No related branches found
No related tags found
1 merge request!34add psi_axis psi_bnd in core_profiles, correct psi and ec_launchers launching_positions
Pipeline #28231 passed with stage
in 1 minute and 18 seconds
......@@ -47,6 +47,13 @@ temp_1d.fit.te_rho.gdat_params = temp_1d.te_rho.gdat_params;
temp_1d.fit.te_rho.shot = temp_1d.te_rho.shot;
temp_1d.fit.te_rho = get_grids_1d(temp_1d.fit.te_rho,1,1);
params_eff.data_request = 'psi_axis';
temp_1d.psi_axis = gdat(params_cores_profiles.shot,params_eff);
temp_1d_desc.psi_axis = params_eff.data_request;
params_eff.data_request = 'psi_edge';
temp_1d.psi_edge = gdat(params_cores_profiles.shot,params_eff);
temp_1d_desc.psi_edge = params_eff.data_request;
temp_1d.fit.ne_rho = temp_1d.ne_rho.fit;
if isempty(temp_1d.te_rho.fit.t)
disp('te_rho.fit')
......@@ -156,7 +163,10 @@ for it=1:length(ids_core_profiles.time)
ids_core_profiles.profiles_1d{it}.grid.rho_tor_norm = temp_1d.fit.te_rho.grids_1d.rhotornorm(:,it);
ids_core_profiles.profiles_1d{it}.grid.rho_tor = temp_1d.fit.te_rho.grids_1d.rhotornorm(:,it) ...
.* temp_1d.fit.te_rho.grids_1d.rhotor_edge(it);
ids_core_profiles.profiles_1d{it}.grid.rho_pol_norm = temp_1d.fit.te_rho.grids_1d.rhopolnorm;
ids_core_profiles.profiles_1d{it}.grid.psi = temp_1d.fit.te_rho.grids_1d.psi(:,it);
ids_core_profiles.profiles_1d{it}.grid.psi_magnetic_axis = 0. * temp_1d.fit.te_rho.grids_1d.psi(1,it);
ids_core_profiles.profiles_1d{it}.grid.psi_boundary = temp_1d.fit.te_rho.grids_1d.psi(end,it);
ids_core_profiles.profiles_1d{it}.grid.volume = temp_1d.fit.te_rho.grids_1d.rhovolnorm(:,it).^2 ...
.* temp_1d.fit.te_rho.grids_1d.volume_edge(it);
ids_core_profiles.profiles_1d{it}.grid.area = interpos(temp_1d.area.x,area_cpt(:,it),temp_1d.fit.te_rho.grids_1d.rhopolnorm, ...
......
......@@ -81,12 +81,10 @@ for iant=1:nb_launchers
for i=1:length(it_ok{iant})
r0 = sqrt(launch_params{iant}{it_ok{iant}(i)}.x0.^2 + launch_params{iant}{it_ok{iant}(i)}.y0.^2) / 100.; % in [m]
time_launch = launch_params{iant}{it_ok{iant}(i)}.time;
ids_ec_launchers.launcher{iant}.launching_position.r.data(i) = r0;
ids_ec_launchers.launcher{iant}.launching_position.z.data(i) = launch_params{iant}{it_ok{iant}(i)}.z0/100.;
ids_ec_launchers.launcher{iant}.launching_position.phi.data(i) = atan2(launch_params{iant}{it_ok{iant}(i)}.y0/100,r0);
ids_ec_launchers.launcher{iant}.launching_position.r.time(i) = time_launch;
ids_ec_launchers.launcher{iant}.launching_position.z.time(i) = time_launch;
ids_ec_launchers.launcher{iant}.launching_position.phi.time(i) = time_launch;
ids_ec_launchers.launcher{iant}.launching_position.r(i) = r0;
ids_ec_launchers.launcher{iant}.launching_position.z(i) = launch_params{iant}{it_ok{iant}(i)}.z0/100.;
ids_ec_launchers.launcher{iant}.launching_position.phi(i) = atan2(launch_params{iant}{it_ok{iant}(i)}.y0/100,r0);
ids_ec_launchers.launcher{iant}.launching_position.time(i) = time_launch;
kz = cos(launch_params{iant}{it_ok{iant}(i)}.theta_toray*pi/180.);
kmr = -sin(launch_params{iant}{it_ok{iant}(i)}.theta_toray*pi/180.).*cos(launch_params{iant}{it_ok{iant}(i)}.phi_toray*pi/180.);
kphi = sin(launch_params{iant}{it_ok{iant}(i)}.theta_toray*pi/180.).*sin(launch_params{iant}{it_ok{iant}(i)}.phi_toray*pi/180.); %*sigma_Rphiz (=+1 for TCV cocos=17)
......
......@@ -50,8 +50,16 @@ params_eff.data_request='psi_axis';
psi_axis = gdat(gdat_data.shot,params_eff);
params_eff.data_request='psi_edge';
psi_edge = gdat(gdat_data.shot,params_eff);
% $$$ gdat_data.grids_1d.psi_axis = psi_axis;
% $$$ gdat_data.grids_1d.psi_edge = psi_edge;
ij=~isnan(psi_axis.t);
psi0_edge = interpos(63,psi_axis.t(ij),psi_axis.data(ij)-psi_edge.data(ij),gdat_data.t,-0.01);
if ~strcmp(lower(params_eff.machine),'tcv')
psi0_edge = interpos(63,psi_axis.t(ij),psi_edge.data(ij) - psi_axis.data(ij),gdat_data.t,-0.01);
else
psi0_edge = interpos(63,psi_axis.t(ij),0. - psi_axis.data(ij),gdat_data.t,-0.01);
end
gdat_data.grids_1d.psi_axis_edge = psi0_edge';
if (nbdim_x == 1)
gdat_data.grids_1d.psi = gdat_data.grids_1d.rhopolnorm.^2*reshape(psi0_edge,1,length(psi0_edge));
elseif (nbdim_x == 2)
......
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