diff --git a/matlab/AUG/rdaAUG_eff.m b/matlab/AUG/rdaAUG_eff.m index e023ab44a0b16e22b32d6d2f24cc63afe63c61b6..e14cdd11315acdc4cf02a19c98bae21942854d7d 100644 --- a/matlab/AUG/rdaAUG_eff.m +++ b/matlab/AUG/rdaAUG_eff.m @@ -167,13 +167,12 @@ if usemdsplus % use augsignal to get effective layout as in ISIS and sf2sig, for example for EQI/PFM eval(['[data,error]=mdsvalue(''_rdaeff' user diagname '=augsignal(' num2str(shot) ',"' diagname '","' sigtype '","' shotfile_exp ... '",' ed_number ',' tstart ',' tend ',_oshot' user diagname ',_oed' user diagname ',' ask_raw ')'');']); - if isnumeric(data) - data=double(data); - end + if isnumeric(data), data=double(data); end elseif isempty(param_set_name) && ~area_base && ~time_base % use augparam eval(['[data,error]=mdsvalue(''_rdaeff' user diagname '=augparam(' num2str(shot) ',"' diagname '","' sigtype '","' param_name '"' ... ',"' shotfile_exp '",' ed_number ',_oshot' user diagname ',_oed' user diagname ')'');']); + if isnumeric(data), data=double(data); end elseif ~area_base && ~time_base % param-set, cannot get this yet with mdsvalue disp(['cannot get param-set with mds yet (only sf2ps): ' param_set_name]) @@ -191,17 +190,21 @@ if usemdsplus if nargin_eff>=5 & ~isempty(varargin_eff{1}) eval(['[data,error]=mdsvalue(''_rdaeff' user diagname '=augdiag(' num2str(shot) ',"' diagname '","' sigtype '","' shotfile_exp ... '",' ed_number ',' num2str(varargin_eff{1}(1),'%.14f') ',' num2str(varargin_eff{1}(end),'%.14f') ')'');']); + if isnumeric(data), data=double(data); end % $$$ eval(['[data,error]=mdsvalue(''_rdaeff' user diagname '=augdiag(' num2str(shot) ',"' diagname '","' area_time_base_name '","' shotfile_exp ... % $$$ '",' ed_number ',' num2str(varargin_eff{1}(1),'%.14f') ',' num2str(varargin_eff{1}(end),'%.14f') ')'');']); else eval(['[data,error]=mdsvalue(''_rdaeff' user diagname '=augdiag(' num2str(shot) ',"' diagname '","' sigtype '","' shotfile_exp ... '",' ed_number ',,,_oshot' user diagname ',_oed' user diagname ')'');']); + if isnumeric(data), data=double(data); end end if ~isempty(area_time_base_dimof) eval(['data=mdsvalue(''dim_of(_rdaeff' user diagname ',' num2str(area_time_base_dimof) ')'');']); + if isnumeric(data), data=double(data); end else for j=1:length(size(data)) eval(['dataj=mdsvalue(''dim_of(_rdaeff' user diagname ',' num2str(j) ')'');']); + if isnumeric(data), data=double(data); end if (prod(size(dataj))~=length(dataj)) data = dataj; area_time_base_dimof = j; @@ -214,6 +217,7 @@ if usemdsplus end adata.data=data; adata.edition = mdsvalue(['_oed' user diagname]); + if isnumeric(data), data=double(data); end if nverbose>=1 && (~isempty(edition_in) && adata.edition~=edition_in) warning(sprintf('\nedition in = %d is different from output edition: %d\n\n',edition_in,adata.edition)); end @@ -246,9 +250,11 @@ if usemdsplus adata.data=reshape(adata.data,1,length(adata.data)); idim0 = 0; eval(['time=mdsvalue(''dim_of(_rdaeff' user diagname ',' num2str(idim0) ')'');']); + if isnumeric(time), time=double(time); end if numel(time) ~= numel(adata.data) idim0 = 1; eval(['time=mdsvalue(''dim_of(_rdaeff' user diagname ',' num2str(idim0) ')'');']); + if isnumeric(time), time=double(time); end if numel(time) ~= numel(adata.data) && (ischar(adata.data) && isempty(strfind(lower(adata.data),'abort'))) warning(['problem with dim for: ' diagname ', ' sigtype]) end @@ -271,8 +277,10 @@ if usemdsplus end % transposed because of C relation and backward compatibility with sf2sig part eval(['x=mdsvalue(''dim_of(_rdaeff' user diagname ',' num2str(idim_x) ')'');']); + if isnumeric(x), x=double(x); end if prod(size(x))==length(x); x = reshape(x,1,length(x)); end eval(['time=mdsvalue(''dim_of(_rdaeff' user diagname ',' num2str(idim_t) ')'');']); + if isnumeric(time), time=double(time); end time = reshape(time,1,length(time)); adata.dim = {x, time}; eval(['xunits=deblank(mdsvalue(''units_of(dim_of(_rdaeff' user diagname ',' num2str(idim_x) '))''));']); @@ -311,6 +319,7 @@ if usemdsplus itime = 1; % default for i=1:nbofdim eval(['dimarray=mdsvalue(''dim_of(_rdaeff' user diagname ',' num2str(i-1) ')'');']); + if isnumeric(dimarray), dimarray=double(dimarray); end if prod(size(dimarray)) == length(dimarray) eval(['adata.dim{' num2str(i) '}=reshape(dimarray,1,length(dimarray));']); else diff --git a/matlab/IMAS/read_hdf5_simple.m b/matlab/IMAS/read_hdf5_simple.m new file mode 100644 index 0000000000000000000000000000000000000000..10e90b251c807b057bea9ad754d692784f27a099 --- /dev/null +++ b/matlab/IMAS/read_hdf5_simple.m @@ -0,0 +1,47 @@ +function h5_struct = read_hdf5_simple(ids_h5_file,varargin) +% +% h5_struct = read_hdf5_simple(ids_h5_file,varargin) +% +% varargin{1}: 'imas' (default), 'futils' (for ogyropsi files e.g.) type of hdf5 +% +% on spcimas need to do: +% export LD_PRELOAD_previous=$LD_PRELOAD +% unset LD_PRELOAD +% matlab +% >> h5disp('/tmp/yildiz//imasdb/tcv/3/80000/999/summary.h5') +% (to reset: export LD_PRELOAD=$LD_PRELOAD_previous ) + +try + aa=hdf5info(ids_h5_file); +catch + error('could not hdf5info(file)') +end + +file_type = 'imas', +if nargin>=2 && ~isempty(varargin{1}) + file_type = varargin{1} +end + +switch file_type + case {'futils', 'standard'} + keyboard + otherwise + [a1,ids_name,a3]=fileparts(aa.Filename); + h5_struct.ids_name = ids_name; + h5_struct.Filename = aa.GroupHierarchy.Filename; + + if isfield(aa.GroupHierarchy.Groups,'Datasets') + for i=1:numel(aa.GroupHierarchy.Groups.Datasets) + if strcmp(aa.GroupHierarchy.Groups.Datasets(i).Name(1),'/') + istart = 2; + else + istart = 1; + end + struct_flatname = regexprep(lower(regexprep(aa.GroupHierarchy.Groups.Datasets(i).Name(istart:end),'[/&[]]','.')),'\.+','_'); + struct_flatname = regexprep(struct_flatname,[h5_struct.ids_name '_'],''); + h5_struct.(struct_flatname) = h5read(aa.GroupHierarchy.Groups.Datasets(i).Filename,aa.GroupHierarchy.Groups.Datasets(i).Name); + end + else + disp(sprintf('\n*************\nno Datasets\n*************\n')); + end +end diff --git a/matlab/TCV/gdat_tcv.m b/matlab/TCV/gdat_tcv.m index 8ce621c5708f9a2b75df0b45afb5920ee67795b5..f528917d4766db1abe4807377f1a0328b8003a5e 100644 --- a/matlab/TCV/gdat_tcv.m +++ b/matlab/TCV/gdat_tcv.m @@ -2568,7 +2568,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') gdat_data.units = 'W'; tension = -1e5; vloop_smooth=interpos(-63,vloop.t,vloop.data,gdat_data.ohm.t,tension); - ip_t = interp1(ip.t,ip.data,gdat_data.ohm.t); + ip_t = interpos(21,ip.t,ip.data,gdat_data.ohm.t); gdat_data.ohm.data = -vloop_smooth.*ip_t; % TCV has wrong sign for Vloop gdat_data.ohm.raw_data = -vloop.data.*ip_t; gdat_data.ohm.data_fullpath = 'from vloop*Ip, smoothed vloop in data, unsmoothed in raw_data'; @@ -3108,7 +3108,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') psi_axis=gdat_tcv(shot,params_eff); params_eff.data_request='b0'; b0=gdat_tcv(shot,params_eff); - b0tpsi = interp1(b0.t,b0.data,psi_axis.t); %q_rho on same time base as psi_axis + b0tpsi = interpos(21,b0.t,b0.data,psi_axis.t); %q_rho on same time base as psi_axis if isempty(psi_axis.data) || isempty(psi_axis.dim) || isempty(q_rho.data) || isempty(q_rho.dim) if (gdat_params.nverbose>=1); warning(['problems loading data for ' nodenameeff ' for data_request= ' data_request_eff]); end return @@ -3560,7 +3560,7 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') % invert index of time and channel (rho) gdat_data.data = mpx.(gdat_data.gdat_params.camera(1:3)).signal.data'; gdat_data.t = mpx.(gdat_data.gdat_params.camera(1:3)).signal.dim{1}; - gdat_data.dim{1} = interp1(mpx.top.rho.time,mpx.top.rho.rhopsi,gdat_data.t)'; + gdat_data.dim{1} = interpos(21,mpx.top.rho.time,mpx.top.rho.rhopsi,gdat_data.t)'; gdat_data.dim{2} = mpx.(gdat_data.gdat_params.camera(1:3)).signal.dim{1}; gdat_data.x = gdat_data.dim{1}; gdat_data.(gdat_data.gdat_params.camera).data = gdat_data.data; @@ -3571,14 +3571,14 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') else gdat_data.data = mpx.signal.data'; gdat_data.t = mpx.signal.dim{1}; - gdat_data.dim{1} = interp1(mpx.top.rho.time,mpx.top.rho.rhopsi,gdat_data.t); + gdat_data.dim{1} = interpos(21,mpx.top.rho.time,mpx.top.rho.rhopsi,gdat_data.t); gdat_data.dim{2} = mpx.(gdat_data.gdat_params.camera(1:3)).signal.dim{1}; % gdat_data.top.data = mpx.top.signal.data'; gdat_data.top.x = gdat_data.dim{1}; gdat_data.top.channel = mpx.top.signal.dim{2}; gdat_data.bottom.data = mpx.bot.signal.data; - gdat_data.bottom.x = interp1(mpx.bot.rho.time,mpx.bot.rho.rhopsi,gdat_data.t); + gdat_data.bottom.x = interpos(21,mpx.bot.rho.time,mpx.bot.rho.rhopsi,gdat_data.t); gdat_data.bottom.channel = mpx.bottom.signal.dim{2}; gdat_data.(gdat_data.gdat_params.camera).channel = mpx.(gdat_data.gdat_params.camera(1:3)).signal.dim{2}; gdat_data.data_fullpath = ['MPX for ' gdat_data.gdat_params.camera ' camera in .data, "rho" in .x between [-1,1]' ... @@ -3849,7 +3849,7 @@ end if ~isempty(tracefirrat.data) && ~ischar(tracefirrat.data) && any(isfinite(tracefirrat.data)) ... && ~isempty(tracefirrat.dim) && ~isempty(tracefirrat.dim{1}) - firthomratio = interp1(tracefirrat.dim{1},tracefirrat.data,timebase); + firthomratio = interpos(21,tracefirrat.dim{1},tracefirrat.data,timebase); end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -4062,7 +4062,7 @@ switch numel(zshifteff) case 1 zshifteff=zshifteff * ones(size(t_th)); case numel(t_psi) - zshifteff=interp1(t_psi,zshifteff,t_th); + zshifteff=interpos(21,t_psi,zshifteff,t_th); case numel(t_th) % ok otherwise diff --git a/matlab/TCV/get_xtomo_data.m b/matlab/TCV/get_xtomo_data.m old mode 100755 new mode 100644 diff --git a/matlab/TCV/tcv_requests_mapping.m b/matlab/TCV/tcv_requests_mapping.m index 824348abb9c6997c13fe4206e93a67bdc80ab41f..7ac36f74ed46c4592e3f2c931c6916b3aa1a3f5f 100644 --- a/matlab/TCV/tcv_requests_mapping.m +++ b/matlab/TCV/tcv_requests_mapping.m @@ -280,10 +280,12 @@ switch lower(data_request) mapping.expression = ['params_eff = gdat_data.gdat_params;params_eff.data_request=''nel'';' ... 'gdat_tmp=gdat_tcv(shot,params_eff);params_eff.data_request=''ip'';' ... 'gdat_tmp2=gdat_tcv(shot,params_eff);ij=find(gdat_tmp2.data==0);gdat_tmp2.data(ij)=NaN;' ... - 'tmp_data2=interp1(gdat_tmp2.t,gdat_tmp2.data,gdat_tmp.t,[],NaN);' ... + 'if numel(gdat_tmp2.t)>1;tmp_data2=interp1(gdat_tmp2.t,gdat_tmp2.data,gdat_tmp.t,[],NaN);' ... + 'else;tmp_data2=gdat_tmp2.data;end;' ... 'params_eff.data_request=''a_minor'';' ... 'gdat_tmp3=gdat_tcv(shot,params_eff);ij=find(gdat_tmp3.data==0);gdat_tmp3.data(ij)=NaN;' ... - 'tmp_data3=interp1(gdat_tmp3.t,gdat_tmp3.data,gdat_tmp.t,[],NaN);' ... + 'if numel(gdat_tmp3.t)>1;tmp_data3=interp1(gdat_tmp3.t,gdat_tmp3.data,gdat_tmp.t,[],NaN);' ... + 'else;tmp_data3=gdat_tmp3.data;end;' ... 'gdat_tmp.data = abs(tmp_data2*1e-6./pi./(tmp_data3.^2+1e-5));' ... 'ij=find(gdat_tmp.data<0 | gdat_tmp.data>4);gdat_tmp.data(ij)=NaN;gdat_tmp.data = gdat_tmp.data * 1e20;']; case {'ngf','greenwald_fraction','f_greenwald','ng_fraction'} @@ -293,7 +295,8 @@ switch lower(data_request) mapping.expression = ['params_eff = gdat_data.gdat_params;params_eff.data_request=''nel'';' ... 'gdat_tmp=gdat_tcv(shot,params_eff);params_eff.data_request=''n_greenwald'';' ... 'gdat_tmp2=gdat_tcv(shot,params_eff);ij=find(gdat_tmp2.data==0);gdat_tmp2.data(ij)=NaN;' ... - 'tmp_data2=interp1(gdat_tmp2.t,gdat_tmp2.data,gdat_tmp.t,[],NaN);' ... + 'if numel(gdat_tmp2.t)>1;tmp_data2=interp1(gdat_tmp2.t,gdat_tmp2.data,gdat_tmp.t,[],NaN);' ... + 'else;tmp_data2=gdat_tmp2.data;end;' ... 'gdat_tmp.data = gdat_tmp.data./(tmp_data2+1e-5);' ... 'gdat_tmp.units='''';gdat_tmp.dimunits{1}=''s'';']; case {'ec_data', 'aux', 'h_cd', 'nbi_data', 'ic_data', 'lh_data', 'ohm_data', 'bs_data'} diff --git a/matlab/TCV_IMAS/tcv_get_ids_core_profiles.m b/matlab/TCV_IMAS/tcv_get_ids_core_profiles.m index a230c9351cf0fb4a1dadfbec902eb2903aed5d5f..ef07977cbe8560341dcd21c111841291ec62a4a8 100644 --- a/matlab/TCV_IMAS/tcv_get_ids_core_profiles.m +++ b/matlab/TCV_IMAS/tcv_get_ids_core_profiles.m @@ -239,23 +239,32 @@ end %% ion struct % assume only D if no CXRS (need to ask how to check if H...) params_eff_fit1.data_request = 'cxrs'; -temp_1d.cxrs_rho = gdat(params_cores_profiles.shot,params_eff_fit1); -temp_1d_desc.cxrs_rho = params_eff_fit1.data_request; +try + temp_1d.cxrs_rho = gdat(params_cores_profiles.shot,params_eff_fit1); + temp_1d_desc.cxrs_rho = params_eff_fit1.data_request; +catch + temp_1d.cxrs_rho.data = []; + temp_1d_desc.cxrs_rho = ['Problem with gdat ' params_eff_fit1.data_request ' ; no data']; +end params_eff_fit1.data_request = 'results.conf:ti'; temp_1d.ti_conf_rho = gdat(params_cores_profiles.shot,params_eff_fit1); temp_1d_desc.ti_conf_rho = params_eff_fit1.data_request; params_eff_fit1.data_request = 'results.conf:ni'; temp_1d.ni_conf_rho = gdat(params_cores_profiles.shot,params_eff_fit1); temp_1d_desc.ni_conf_rho = params_eff_fit1.data_request; -data_fullpath_raw = 'Ti(C sometimes B) from cxrs system 1 to 3'; -temp_1d.ti.raw = temp_1d.cxrs_rho.ti.raw; -temp_1d.ti.raw.shot = temp_1d.cxrs_rho.shot;temp_1d.ti.raw.gdat_params = temp_1d.cxrs_rho.gdat_params; -temp_1d.ti.raw.x =temp_1d.cxrs_rho.ti.raw.rho; temp_1d.ti.raw.t =temp_1d.cxrs_rho.t; -if ~isempty(temp_1d.cxrs_rho.ti.raw.data) - data_fullpath_fit = 'Ti from fit from cxrs thus Ti(C)'; - temp_1d.ti.raw =get_grids_1d(temp_1d.ti.raw,2,1); +if ~isempty(temp_1d.cxrs_rho.data) + data_fullpath_raw = 'Ti(C sometimes B) from cxrs system 1 to 3'; + temp_1d.ti.raw = temp_1d.cxrs_rho.ti.raw; + temp_1d.ti.raw.shot = temp_1d.cxrs_rho.shot;temp_1d.ti.raw.gdat_params = temp_1d.cxrs_rho.gdat_params; + temp_1d.ti.raw.x =temp_1d.cxrs_rho.ti.raw.rho; temp_1d.ti.raw.t =temp_1d.cxrs_rho.t; + if ~isempty(temp_1d.cxrs_rho.ti.raw.data) + data_fullpath_fit = 'Ti from fit from cxrs thus Ti(C)'; + temp_1d.ti.raw =get_grids_1d(temp_1d.ti.raw,2,1); + else + data_fullpath_fit = 'Ti from fit in CONF node'; + end else - data_fullpath_fit = 'Ti from fit in CONF node, using Te/Ti and equilibrium Wmhd'; + data_fullpath_fit = 'Ti from fit in CONF node'; end temp_1d_desc.ti.raw = data_fullpath_fit; temp_1d.ti.fit = temp_1d.ti_conf_rho; @@ -312,7 +321,7 @@ for it=1:length(ids_core_profiles.time) ids_core_profiles.profiles_1d{it}.pressure_thermal = ids_core_profiles.profiles_1d{it}.pressure_ion_total ... + ids_core_profiles.profiles_1d{it}.electrons.pressure_thermal; end -if ~isempty(temp_1d.cxrs_rho.ti.fit.data) +if ~isempty(temp_1d.cxrs_rho.data) && ~isempty(temp_1d.cxrs_rho.ti.fit.data) it_raw = iround_os(temp_1d.ti.raw.t,ids_core_profiles.time); for it=1:length(ids_core_profiles.time) % ids_core_profiles.profiles_1d{it}.ion{1}.temperature_fit = temp_1d.ti.fit(:,it_ti(it)); diff --git a/matlab/TCV_IMAS/tcv_get_ids_summary.m b/matlab/TCV_IMAS/tcv_get_ids_summary.m index e24b4ee20f0e52a73dd2b1751032eda58bc3efc7..7fc129ec744f25d449987331ba25a34bc791b501 100644 --- a/matlab/TCV_IMAS/tcv_get_ids_summary.m +++ b/matlab/TCV_IMAS/tcv_get_ids_summary.m @@ -99,8 +99,8 @@ for i=1:numel(boundary_fieldnames) if ~any(strcmp(boundary_fieldnames{i},special_fields)) if ~isstruct(ids_summary.boundary.(boundary_fieldnames{i}).value) ids_summary.boundary.(boundary_fieldnames{i}).value = boundary.(boundary_fieldnames{i}).data; - ids_summary.boundary.(boundary_fieldnames{i}).value = interp1(boundary.(boundary_fieldnames{i}).t, ... - boundary.(boundary_fieldnames{i}).data,ids_summary.time,'linear',NaN); + ids_summary.boundary.(boundary_fieldnames{i}).value = interpos(21,boundary.(boundary_fieldnames{i}).t, ... + boundary.(boundary_fieldnames{i}).data,ids_summary.time); ids_summary.boundary.(boundary_fieldnames{i}).source = ['gdat request: ' boundary_desc.(boundary_fieldnames{i})]; else special_fields{end+1} = boundary_fieldnames{i}; @@ -138,9 +138,9 @@ special_fields = {}; % fields needing non-automatic treatments for i=1:numel(gas_injection_rates_fieldnames) if ~any(strcmp(gas_injection_rates_fieldnames{i},special_fields)) if ~isstruct(ids_summary.gas_injection_rates.(gas_injection_rates_fieldnames{i}).value) - ids_summary.gas_injection_rates.(gas_injection_rates_fieldnames{i}).value = interp1( ... + ids_summary.gas_injection_rates.(gas_injection_rates_fieldnames{i}).value = interpos(21, ... gas_injection_rates.(gas_injection_rates_fieldnames{i}).t,gas_injection_rates.(gas_injection_rates_fieldnames{i}).data, ... - ids_summary.time,'linear',NaN); + ids_summary.time); ids_summary.gas_injection_rates.(gas_injection_rates_fieldnames{i}).source = ['gdat request: ' gas_injection_rates_desc.(gas_injection_rates_fieldnames{i})]; else special_fields{end+1} = gas_injection_rates_fieldnames{i}; @@ -253,9 +253,9 @@ for i=1:numel(global_quantities_fieldnames) if ~any(strcmp(global_quantities_fieldnames{i},special_fields)) if ~isstruct(ids_summary.global_quantities.(global_quantities_fieldnames{i}).value) && ... ~isempty(global_quantities.(global_quantities_fieldnames{i}).data) - ids_summary.global_quantities.(global_quantities_fieldnames{i}).value = interp1( ... + ids_summary.global_quantities.(global_quantities_fieldnames{i}).value = interpos(21, ... global_quantities.(global_quantities_fieldnames{i}).t,global_quantities.(global_quantities_fieldnames{i}).data, ... - ids_summary.time,'linear',NaN); + ids_summary.time); ids_summary.global_quantities.(global_quantities_fieldnames{i}).source = ['gdat request: ' global_quantities_desc.(global_quantities_fieldnames{i})]; elseif ~isempty(global_quantities.(global_quantities_fieldnames{i}).data) special_fields{end+1} = global_quantities_fieldnames{i}; @@ -278,9 +278,9 @@ volume_average_fieldnames = fieldnames(volume_average); for i=1:numel(volume_average_fieldnames) if ~any(strcmp(volume_average_fieldnames{i},special_fields)) if ~isstruct(ids_summary.volume_average.(volume_average_fieldnames{i}).value) - ids_summary.volume_average.(volume_average_fieldnames{i}).value = interp1( ... + ids_summary.volume_average.(volume_average_fieldnames{i}).value = interpos(21, ... volume_average.(volume_average_fieldnames{i}).t,volume_average.(volume_average_fieldnames{i}).data, ... - ids_summary.time,'linear',NaN); + ids_summary.time); ids_summary.volume_average.(volume_average_fieldnames{i}).source = ['gdat request: ' volume_average_desc.(volume_average_fieldnames{i})]; else special_fields{end+1} = volume_average_fieldnames{i}; @@ -298,9 +298,9 @@ line_average_fieldnames = fieldnames(line_average); for i=1:numel(line_average_fieldnames) if ~any(strcmp(line_average_fieldnames{i},special_fields)) if ~isstruct(ids_summary.line_average.(line_average_fieldnames{i}).value) - ids_summary.line_average.(line_average_fieldnames{i}).value = interp1( ... + ids_summary.line_average.(line_average_fieldnames{i}).value = interpos(21, ... line_average.(line_average_fieldnames{i}).t,line_average.(line_average_fieldnames{i}).data, ... - ids_summary.time,'linear',NaN); + ids_summary.time); ids_summary.line_average.(line_average_fieldnames{i}).source = ['gdat request: ' line_average_desc.(line_average_fieldnames{i})]; else special_fields{end+1} = line_average_fieldnames{i};