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

debugged core_profiles and added/tested to zcv2ids2database

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@11795 d63d8f72-b253-0410-a779-e742ad2e26cf
parent 41f0f919
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ function [ids_from_tcv,varargout] = tcv2ids(shot,varargin);
% mdsconnect('localhost:5555')
%
% varargin{1}: ids to load, by default all defined so far (if empty or empty string or not given)
% {'equilibrium', 'magnetics', 'pf_active','wall'} or a subset
% {'equilibrium', 'magnetics', 'pf_active','wall','core_profiles'} or a subset
%
% varargout{1}: return also the ids in array of structure with the names, to allow easy use of plotallids
%
......@@ -21,7 +21,7 @@ p = inputParser;
% no required inputs here so one can call with empty args and get defaults parameters
% effectively required inputs should have defaults as empty
p.addOptional('shot', [], @(x) (isnumeric(x) && isscalar(x) && (x == round(x)))); % integer
p.addOptional('ids_names', {'equilibrium', 'magnetics', 'pf_active','wall', 'tf'}, @(x) isempty(x) | (ischar(x) || iscell(x))); % char or cell array
p.addOptional('ids_names', {'equilibrium', 'magnetics', 'pf_active','wall', 'tf','core_profiles'}, @(x) isempty(x) | (ischar(x) || iscell(x))); % char or cell array
p.parse;
defaults_tcv2ids = p.Results; % to keep track of defaults
......
......@@ -2,12 +2,18 @@
% script to get TCV data as ids and then write them on the database
%
mdsconnect('localhost:5555');
aa=mdsvalue('1+2');
if aa ~= 3
error('problem with mdsconnect?');
end
shot=40000;
shot=62745;
run_out=999;
run_out=1;
occurence=0;
ids2get = {'equilibrium', 'magnetics', 'pf_active','wall'}; % default will load all defined so far
ids2get = {'equilibrium', 'magnetics', 'pf_active','wall','core_profiles'}; % default will load all defined so far
[ids_from_tcv,idsok] = tcv2ids(shot,ids2get);
%% can plot with: [plotids_H] = plotids([],idsok.ids{1},idsok.ids{2});
......
......@@ -114,13 +114,13 @@ for it=1:length(ids_cores_profiles.time)
ids_cores_profiles.profiles_1d{it}.electrons.temperature_fit.measured_error_upper = temp_1d.te_rho.error_bar(:,it_thom(it));
ids_cores_profiles.profiles_1d{it}.electrons.temperature_fit.time_measurement = temp_1d.te_rho.t(it_thom(it));
ids_cores_profiles.profiles_1d{it}.electrons.temperature_fit.rho_tor_norm = temp_1d.te_rho.grids_1d.rhotornorm(:,it_thom(it));
ids_cores_profiles.profiles_1d{it}.electrons.temperature_fit.source = 'Thomson, interpos fit';
ids_cores_profiles.profiles_1d{it}.electrons.temperature_fit.source = {'Thomson, interpos fit'};
ids_cores_profiles.profiles_1d{it}.electrons.density = temp_1d.fit.ne_rho.data(:,it);
ids_cores_profiles.profiles_1d{it}.electrons.density_fit.measured = temp_1d.ne_rho.data(:,it_thom(it));
ids_cores_profiles.profiles_1d{it}.electrons.density_fit.measured_error_upper = temp_1d.ne_rho.error_bar(:,it_thom(it));
ids_cores_profiles.profiles_1d{it}.electrons.density_fit.time_measurement = temp_1d.ne_rho.t(it_thom(it));
ids_cores_profiles.profiles_1d{it}.electrons.density_fit.rho_tor_norm = temp_1d.ne_rho.grids_1d.rhotornorm(:,it_thom(it));
ids_cores_profiles.profiles_1d{it}.electrons.density_fit.source = 'Thomson, interpos fit';
ids_cores_profiles.profiles_1d{it}.electrons.density_fit.source = {'Thomson, interpos fit'};
ids_cores_profiles.profiles_1d{it}.electrons.pressure_thermal = 1.6022e-19.*ids_cores_profiles.profiles_1d{it}.electrons.density ...
.* ids_cores_profiles.profiles_1d{it}.electrons.temperature;
end
......@@ -168,9 +168,9 @@ if ~isempty(temp_1d.cxrs_rho.ti.fit.data)
it_raw = iround_os(temp_1d.ti.raw.t,ids_cores_profiles.time);
for it=1:length(ids_cores_profiles.time)
% ids_cores_profiles.profiles_1d{it}.ion{1}.temperature_fit = temp_1d.ti.fit(:,it_ti(it));
ids_cores_profiles.profiles_1d{it}.ion{1}.density_fit.source = 'from Zeff and ne profile';
ids_cores_profiles.profiles_1d{it}.ion{1}.density_fit.source = {'from Zeff and ne profile'};
ids_cores_profiles.profiles_1d{it}.t_i_average_fit.measured = temp_1d.ti.raw.data(:,it_raw(it));
ids_cores_profiles.profiles_1d{it}.t_i_average_fit.source = 'from CXRS on C usually';
ids_cores_profiles.profiles_1d{it}.t_i_average_fit.source = {'from CXRS on C usually'};
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment