Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gdat
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 26
    • Issues 26
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • SPC
  • gdat
  • Issues
  • #47

Closed
Open
Created Dec 09, 2021 by Matteo Vallar@vallarDeveloper

Error when calling gdat in a loop for different shots

@osauter I don't get why this code is not working. It looks like the second time gdat runs, it fails to fetch ne_rho data.

%% ne, te profiles
shots=[72338, 72101];%, 68669];
trial_indx=1;
% shots=[68773, 68779];%, 68669];
delta_shots=[1, 1];
time_analysis = [0.7, 1.5];%, 1.554];
col=['k', 'r', 'b'];
leg=[];
time_out = [[0,2.]; [0,2]];%; [0,2]];

linewidth=2.5;
figure('Position', [10, 10, 1000, 600]);
[ha, ~] = tight_subplot(2, 2, 0.1, 0.1, [0.1, 0.01]);
% xxticks=0.2:0.2:1.2;
ax1=ha(1); ax2=ha(2); ax3=ha(3); ax4=ha(4);
for aa=[ax1,ax2,ax3,ax4], hold(aa, 'on'); end
% ax1=subplot(4,1,1);

for ss=1:numel(shots)
  ne=gdat_tcv(shots(ss), 'ne_rho', 'time_out', time_analysis(ss), 'trial_indx', trial_indx);
  plot(ax1, ne.fit.x, ne.fit.data*1e-19, col(ss), 'LineWidth', linewidth);
  te=gdat_tcv(shots(ss), 'te_rho', 'time_out', time_analysis(ss), 'trial_indx', trial_indx);
  plot(ax2, te.fit.x, te.fit.data*1e-3, col(ss), 'LineWidth', linewidth);
  cxrs=gdat_tcv(shots(ss), 'cxrs', 'time_out', time_analysis(ss), 'trial_indx', trial_indx);
  plot(ax3, cxrs.ti.fit.rho, cxrs.ti.fit.data*1e-3, col(ss), 'LineWidth', linewidth);
  plot(ax4, cxrs.vtor.fit.rho, cxrs.vtor.fit.data, col(ss), 'LineWidth', linewidth);
  label=sprintf('#%i (\\delta<0); t=%.2f s', shots(ss), time_analysis(ss));
  if delta_shots(ss)>0
    label=sprintf('#%i (\\delta>0); t=%.2f s', shots(ss), time_analysis(ss));
  end
  leg = [leg; label];
  clear label ne te cxrs;
end
% ylim(ax1, [200, 300]); 
ylabel(ax1, 'n_e [10^{19} m^{-3}]'); 
% xticklabels(ax1, []); xticks(ax1, xxticks);
% ax2=subplot(4,1,2);
ylabel(ax2,'T_e [keV]');
ylabel(ax3,'T_i [keV]');
ylabel(ax4,'V_{\phi} [km/s]');

I get the following error

>> Warning: !!!!!!!!!!!!!!!!!!!!!!!!!\results::thomson:times  is empty? Check
> In gdat_tcv>get_thomson_raw_data (line 3535)
  In gdat_tcv (line 2083)
!!!!!!!!!!!!!!!!!!!!!!!!! cannot continue with ne_rho
Undefined function or variable 'is'.

Error in iround_os (line 17)
sigi=sig(is);

Error in gdat_tcv>psi_scatvol_zshift (line 3726)
t_eq = t_psi(iround_os(t_psi,t_th));

Error in gdat_tcv (line 2097)
      [psiscatvol,psi_max] = psi_scatvol_zshift(gdat_data, zshift, psitbx_str, gdat_params);
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking