Skip to content

Commit

Permalink
Sped up examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwhite96 committed Jun 13, 2024
1 parent b728853 commit 7b5b826
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
14 changes: 2 additions & 12 deletions plots/mms/Example_MMS_Liouville_mapping.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
%% Set parameters and get data
% time interval
% tint = irf.tint('2015-09-19T10:08:14/2015-09-19T10:08:18');
tint = irf.tint('2018-05-05T17:12:18/2018-05-05T17:12:26');
tint = irf.tint('2018-05-05T17:12:21/2018-05-05T17:12:23');

% times to make lines
% t1 = irf.time_array('2015-09-19T10:08:16.275');
Expand Down Expand Up @@ -145,18 +145,8 @@
% End of ROI: from roi_a to end / scale_fact
% ROI array: from start to end of ROI, interpolated from warm_dist
scale_fact = 2.5;
% num_pts = 30;
% xbq = linspace(v_parb(idx1),v_parb(round(idx1+(end-idx1)/scale_fact)),num_pts);
yb_pts = f_eb(idxb:round(idxb+(end-idxb)/scale_fact));
xb_pts = v_parb(idxb:round(idxb+(end-idxb)/scale_fact));
% roi_array = interp1(xb_pts,yb_pts,xbq);

% find indices (idx2) of closest points in cold_dist
% idx2 = [];
% for k = 1:length(yb_pts)
% [~,idxk] = min(abs(f_ec_thr - yb_pts(k)));
% idx2 = [idx2 idxk]; % maybe find more efficient way to do this
% end

% find first/last indices (idx2a/b) of closest points in cold_dist to beam
[~,idxc_start] = min(abs(f_ec_thr - yb_pts(1)));
Expand Down Expand Up @@ -204,7 +194,7 @@
irf_legend(hca,{ePDist(it1).time.toUtc; ...
ePDist(it2).time.toUtc; ...
['Liouville Mapping, \Delta\phi_{||} = ' ...
num2str(phi_mean,3) '±' num2str(phi_err,3) ...
num2str(phi_mean,3) '±' num2str(phi_err,2) ...
'V']},[0.98,0.98])
% hca.XLim = [min(vg),max(vg)];
%labels
Expand Down
4 changes: 2 additions & 2 deletions plots/mms/Example_MMS_ele_dist_multi_SC.m
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
% Compare with: Wilder, F. D., et al. (2016), GRL, 43, 5909?5917,
% doi:10.1002/2016GL069473.
%
% The Example is fairly slow. Approx 2-4 mins.
% The Example is fairly slow. Approx 5 mins.
%
% Originally written for 1SC at two time intervals by A. Johlander
% Adapted for 2SC (or all SC) at a single time by J. D. White
Expand All @@ -14,7 +14,7 @@
tStart = tic;
% time interval
% tint = irf.tint('2017-07-06T00:54:12.000/2017-07-06T00:54:20.00Z');
tint = irf.tint('2018-05-05T17:12:18.00Z/2018-05-05T17:12:26.00Z');
tint = irf.tint('2018-05-05T17:12:21.00Z/2018-05-05T17:12:23.00Z');

% time to plot reduced electron distribution
% t1 = irf.time_array('2017-07-06T00:54:14.500');
Expand Down

0 comments on commit 7b5b826

Please sign in to comment.