Skip to content
Snippets Groups Projects
Commit 55cb570e authored by Antonia Frank's avatar Antonia Frank
Browse files

Add warning when loading B-fields from other source than LIUQE.M

parent bc1d0003
No related branches found
No related tags found
1 merge request!173Ids for torbeam
......@@ -5,7 +5,7 @@ function [ids_equilibrium,ids_equilibrium_description,varargout] = ...
% tcv_get_ids_equilibrium(shot,ids_equil_empty,gdat_params,varargin);
%
%
% gdat_params: gdat_data.gdat_params to get all params passed from original call,
% gdat_params: gdat_data.gdat_params to get all params passed from original call,
% in particular error_bar and cocos_out options
%
......@@ -529,15 +529,19 @@ profiles_2d.z.data = repmat(repmat(profiles_2d.psi.dim{2}',numel(profiles_2d.psi
profiles_2d_desc.z = 'from dim{2} of ''psi'' repeated';
params_eff.data_request = 'bfields';
bfields_gdat = gdat(params_equilibrium.shot,params_eff);
profiles_2d.b_field_r = bfields_gdat.Br;
profiles_2d_desc.b_field_r = bfields_gdat.Br.label;
profiles_2d.b_field_z= bfields_gdat.Bz;
profiles_2d_desc.b_field_z = bfields_gdat.Bz.label;
profiles_2d.b_field_tor= bfields_gdat.Btor;
profiles_2d_desc.b_field_tor = bfields_gdat.Btor.label;
if ~isempty(bfields_gdat.Br)
profiles_2d.b_field_r = bfields_gdat.Br;
profiles_2d_desc.b_field_r = bfields_gdat.Br.label;
profiles_2d.b_field_z= bfields_gdat.Bz;
profiles_2d_desc.b_field_z = bfields_gdat.Bz.label;
profiles_2d.b_field_tor= bfields_gdat.Btor;
profiles_2d_desc.b_field_tor = bfields_gdat.Btor.label;
else
warning('B-fields could not be load from gdat(shot,''bfields''). B-fields only available for LIUQE.M, trial 1.')
end
% theta = gdat(params_equilibrium.shot,'theta','machine',gdat_params.machine);
tic
profiles_2d_fieldnames = fieldnames(profiles_2d);
special_fields = {'grid', 'grid_type'}; % fields needing non-automatic treatments
for it=1:ntime
......@@ -576,7 +580,7 @@ for it=1:numel(ids_equilibrium.time_slice)
ids_equilibrium.time_slice{it}.boundary_separatrix.x_point = {};
ids_equilibrium.time_slice{it}.boundary_separatrix.strike_point = {};
end
toc
% special test matrix cocos transform
% $$$ ldim1=129;
% $$$ ldim2=257;
......@@ -603,11 +607,9 @@ toc
% $$$ ids_equilibrium.time_slice{it}.profiles_2d{2}.psi_error_upper(:,:) = 12.*ones(ldim1,ldim2);
% $$$ ids_equilibrium.time_slice{it}.profiles_2d{2}.psi_error_lower(:,:) = 10.*ones(ldim1,ldim2);
% $$$ end
tic
% cocos automatic transform
if ~isempty(which('ids_generic_cocos_nodes_transformation_symbolic'))
[ids_equilibrium,cocoscoeff]=ids_generic_cocos_nodes_transformation_symbolic(ids_equilibrium,'equilibrium',gdat_params.cocos_in, ...
gdat_params.cocos_out,gdat_params.ipsign_out,gdat_params.b0sign_out,gdat_params.ipsign_in,gdat_params.b0sign_in, ...
gdat_params.error_bar,gdat_params.nverbose);
end
toc
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment