diff --git a/matlab/TCV_IMAS/tcv_get_ids_core_sources.m b/matlab/TCV_IMAS/tcv_get_ids_core_sources.m index 11e00e6973d2ec82dc107c3afa9819c2de5dbda6..68d0ef27e07be9b49dde0c088040ee96a71d2c8b 100644 --- a/matlab/TCV_IMAS/tcv_get_ids_core_sources.m +++ b/matlab/TCV_IMAS/tcv_get_ids_core_sources.m @@ -14,10 +14,11 @@ tens_rho = -0.1; if exist('gdat_params','var') [ids_core_sources, params_core_sources] = ... - tcv_ids_headpart(shot,ids_equil_empty,'cores_sources','gdat_params',gdat_params,varargin{:}); + tcv_ids_headpart(shot,ids_equil_empty,'cores_sources','gdat_params',gdat_params,... + 'homogeneous_time',0,varargin{:}); else [ids_core_sources, params_core_sources] = ... - tcv_ids_headpart(shot,ids_equil_empty,'cores_sources',varargin{:}); + tcv_ids_headpart(shot,ids_equil_empty,'cores_sources','homogeneous_time',0,varargin{:}); aa=gdat_tcv; gdat_params = aa.gdat_params; % to get default params end @@ -27,14 +28,23 @@ try params_eff_ref=rmfield(params_eff_ref,'source');catch;end % make sure no sou % initialize description ids_core_sources_description = []; +%% fill vacuum_toroidal field +params_eff = params_eff_ref; params_eff.data_request='b0'; +b0_gdat=gdat(params_core_sources.shot,params_eff); +ids_core_sources.vacuum_toroidal_field.r0 = b0_gdat.r0; +ids_core_sources.vacuum_toroidal_field.b0 = b0_gdat.data; +ids_core_sources_description.vacuum_toroidal_field = b0_gdat.request_description; +ids_core_sources.time = b0_gdat.t; %% % save source template to fill for differnet source options source_template = ids_core_sources.source{1}; profiles_template = source_template.profiles_1d{1}; globals_template = source_template.global_quantities{1}; %% get time grid and data from gdat -ohm_gdat = gdat(shot,'ohm_data'); -powers_gdat = gdat(shot,'powers'); +params_eff = params_eff_ref; params_eff.data_request='ohm_data'; +ohm_gdat = gdat(params_core_sources.shot,params_eff); +params_eff = params_eff_ref; params_eff.data_request='powers'; +powers_gdat = gdat(params_core_sources.shot,params_eff); % fix time grid to ohm time grid, same as bs last_index = 0; diff --git a/matlab/TCV_IMAS/tcv_get_ids_summary.m b/matlab/TCV_IMAS/tcv_get_ids_summary.m index b5571a17ea75430aec6623f37ddcd998dc495bbd..e24b4ee20f0e52a73dd2b1751032eda58bc3efc7 100644 --- a/matlab/TCV_IMAS/tcv_get_ids_summary.m +++ b/matlab/TCV_IMAS/tcv_get_ids_summary.m @@ -16,7 +16,7 @@ end % As a general rule, for a new substructure under the main ids, construct a local structure like: % "global_quantities" with subfields being the relevant data to get and a local structure: -% "global_quantities_desc" which contains the same subfields themselves containing the gdat string aftre shot used +% "global_quantities_desc" which contains the same subfields themselves containing the gdat string after shot used % % vacuum_toroidal_field and time, using homogeneous %