diff --git a/crpptbx/TCV/gdat_tcv.m b/crpptbx/TCV/gdat_tcv.m index 08b7ed605e04d7c602d084670c2572808a22a63e..15383de08eaf550d4d844002c23798c9b4604b0b 100644 --- a/crpptbx/TCV/gdat_tcv.m +++ b/crpptbx/TCV/gdat_tcv.m @@ -592,23 +592,45 @@ elseif strcmp(mapping_for_tcv.method,'switchcase') cxrs_plot = 0; end gdat_data.gdat_params.cxrs_plot = cxrs_plot; + if isfield(params_eff,'source') && ~isempty(params_eff.source) + source = params_eff.source; + else + source = [1 2 3]; + end + gdat_data.gdat_params.source = source; if isfield(params_eff,'time_interval') && ~isempty(params_eff.time_interval) && length(params_eff.time_interval)>=2 - time_interval = params_eff.time_interval(1:2); + time_interval = params_eff.time_interval; cxrs_plot=1; else time_interval = []; end gdat_data.gdat_params.time_interval = time_interval; gdat_data.gdat_params.cxrs_plot = cxrs_plot; + fit_tension_default = -100.; if isfield(params_eff,'fit_tension') fit_tension = params_eff.fit_tension; else - fit_tension = -100.; + fit_tension = fit_tension_default; + end + if ~isstruct(fit_tension) + fit_tension_eff.ti = fit_tension; + fit_tension_eff.vi = fit_tension; + fit_tension_eff.ni = fit_tension; + fit_tension_eff.zeff = fit_tension; + fit_tension = fit_tension_eff; + else + if ~isfield(fit_tension,'ti'); fit_tension.ti = fit_tension_default; end + if ~isfield(fit_tension,'vi'); fit_tension.vi = fit_tension_default; end + if ~isfield(fit_tension,'ni') && ~isfield(fit_tension,'nc'); fit_tension.ni = fit_tension_default; end + if ~isfield(fit_tension,'zeff'); fit_tension.zeff = fit_tension_default; end end gdat_data.gdat_params.fit_tension = fit_tension; - cxrs_params.prof.Ti.taus = fit_tension; cxrs_params.prof.vi.taus = fit_tension; cxrs_params.prof.nc.taus = fit_tension; cxrs_params.prof.zeff.taus = fit_tension; + cxrs_params.prof.Ti.taus = fit_tension.ti; + cxrs_params.prof.vi.taus = fit_tension.vi; + cxrs_params.prof.nc.taus = fit_tension.ni; + cxrs_params.prof.zeff.taus = fit_tension.zeff; cxrs_params.k_plot = cxrs_plot; - cxrs_profiles = CXRS_get_profiles(shot,[1 2 3],time_interval,cxrs_params); + cxrs_profiles = CXRS_get_profiles(shot,source,time_interval,cxrs_params); inb_times = length(cxrs_profiles.Times); gdat_data.cxrs_params = cxrs_profiles.param; if isempty(cxrs_profiles.Times) || ~isfield(cxrs_profiles,'proffit') diff --git a/crpptbx/TCV/tcv_help_parameters.m b/crpptbx/TCV/tcv_help_parameters.m index 8c292b39a0f6a686b3733b8704f6383453bdf980..e56ced754892182cbf7fcf4cde86f2d343f4e050 100644 --- a/crpptbx/TCV/tcv_help_parameters.m +++ b/crpptbx/TCV/tcv_help_parameters.m @@ -24,11 +24,12 @@ help_struct_all = struct(... % TCV related help_struct_all.cxrs_plot = '0 (default) no plots, 1 get plots from CXRS_get_profiles see ''help CXRS_get_profiles'' for k_plot values'; -help_struct_all.time_interval = ['if provided sets a specific time interval [tstart tend], assumes 2 values provided to be used.' ... - char(10) 'cxrs: take data and average over this time interval only, plots from CXRS_get_profiles are then provided' ... +help_struct_all.time_interval = ['if provided sets a specific time interval [tstart tend].' ... + char(10) 'cxrs: (time_interval can have several nbs) take data and average over time interval(s) only, plots from CXRS_get_profiles are then provided' ... ' as well']; help_struct_all.fit_tension = ['smoothing value used in interpos fitting routine, -30 means ''30 times default value'', thus -1 often a' ... - ' good value']; + ' good value' char(10) ... + 'cxrs: if numeric, default for all cases, if structure, default for non given fields']; help_struct_all.time = 'time(s) value(s) if relevant, for example eqdsk is provided by default only for time=1.0s'; help_struct_all.zshift = 'vertical shift of equilibrium, either for eqdsk or for mapping measurements on to rho surfaces [m]'; help_struct_all.cocos = ['cocos value desired in output, uses eqdsk_cocos_transform. Note should use latter if a specific Ip and/or B0 sign' ... @@ -37,7 +38,7 @@ help_struct_all.edge = '0 (default), 1 to get edge Thomson values'; help_struct_all.fit = '0, no fit profiles, 1 (default) if fit profiles desired as well, relevant for _rho profiles. See also fit_type'; help_struct_all.fit_type = 'provenance of fitted profiles ''conf'' (default) from conf nodes, ''avg'' or ''local'' for resp. proffit: nodes'; help_struct_all.trialindx = 'value of trialindx desired to get a specific one when relevant, otherwise gets ok_trialindx, that is 1 usually'; -help_struct_all.source = 'sxr: main source: ''MPX'' (default) or ''XTOMO'', case insensitive'; +help_struct_all.source = 'cxrs: [1 2 3] (default systems); sxr: main source: ''MPX'' (default) or ''XTOMO'', case insensitive'; help_struct_all.camera = ['sxr: for MPX: ''central'', ''top'' (default), ''bottom'' or ''both'' ; ' ... ' for XTOMO: ''central'' (a central chord only), defaults if empty, [1 3 5] if only camera 1, 3 and 5 are desired']; help_struct_all.freq = '''slow'', default, lower sampling; ''fast'' full samples for both mpx and xtomo';