You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: +gemini3d/+plot/cart2d.m
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -46,21 +46,21 @@ function cart2d(time,xg,parm,parmlbl,caxlims,sourceloc, h, cmap)
46
46
47
47
48
48
%SIZE OF PLOT GRID THAT WE ARE INTERPOLATING ONTO
49
-
meantheta=mean(xg.theta(:));
50
-
%meanphi=mean(xg.phi(:));
49
+
meantheta=mean(xg.theta, 'all');
50
+
%meanphi=mean(xg.phi, 'all');
51
51
y=-1*(xg.theta-meantheta); %this is a mag colat. coordinate and is only used for defining grid in linspaces below, runs backward from north distance, hence the negative sign
yp=linspace(miny,maxy,lyp); %should be interpreted as northward distance (in rads.). Irrespective of ordering of xg.theta, this will be monotonic increasing!!!
%%SIZE OF PLOT GRID THAT WE ARE INTERPOLATING ONTO
49
-
meantheta=mean(xg.theta(:));
50
-
meanphi=mean(xg.phi(:));
49
+
meantheta=mean(xg.theta, 'all');
50
+
meanphi=mean(xg.phi, 'all');
51
51
y=-1*(xg.theta-meantheta); %this is a mag colat. coordinate and is only used for defining grid in linspaces below, runs backward from north distance, hence the negative sign
yp=linspace(miny,maxy,lyp); %should be interpreted as northward distance (in rads.). Irrespective of ordering of xg.theta, this will be monotonic increasing!!!
%ix1s=floor(lx1/2):lx1; %only valide for a grid which is symmetric aboutu magnetic equator... (I think)
69
69
ix1s=find(xg.x1(inds1)>=0); %works for asymmetric grids
70
70
minz=0;
71
-
maxz=max(xg.alt(:));
71
+
maxz=max(xg.alt, 'all');
72
72
[tmp,ix1]=min(abs(xg.alt(ix1s,1,1)-maxz*1e3));
73
73
ix1=ix1s(ix1);
74
74
thetavals=xg.theta(ix1:lx1,:,:);
75
-
meantheta=mean(thetavals(:));
75
+
meantheta=mean(thetavals, 'all');
76
76
phivals=xg.phi(ix1:lx1,:,:);
77
-
meanphi=mean(phivals(:));
77
+
meanphi=mean(phivals, 'all');
78
78
x=(thetavals-meantheta); %this is a mag colat. coordinate and is only used for defining grid in linspaces below and the parametric surfaces in the plots
Copy file name to clipboardExpand all lines: +gemini3d/+plot/cart3d_long_enu.m
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -46,21 +46,21 @@ function cart3d_long_enu(time,xg,parm,parmlbl,caxlims,sourceloc,hf,cmap)
46
46
plotparams.altref=300;
47
47
48
48
%%SIZE OF PLOT GRID THAT WE ARE INTERPOLATING ONTO
49
-
meantheta=mean(xg.theta(:));
50
-
%meanphi=mean(xg.phi(:));
49
+
meantheta=mean(xg.theta, 'all');
50
+
%meanphi=mean(xg.phi, 'all');
51
51
y=-1*(xg.theta-meantheta); %this is a mag colat. coordinate and is only used for defining grid in linspaces below, runs backward from north distance, hence the negative sign
yp=linspace(miny,maxy,lyp); %should be interpreted as northward distance (in rads.). Irrespective of ordering of xg.theta, this will be monotonic increasing!!!
@@ -69,23 +69,23 @@ function cart3d_long_enu(time,xg,parm,parmlbl,caxlims,sourceloc,hf,cmap)
69
69
%ix1s=floor(lx1/2):lx1; %only valide for a grid which is symmetric aboutu magnetic equator... (I think)
70
70
ix1s=find(xg.x1(inds1)>=0); %works for asymmetric grids
71
71
minz=0;
72
-
maxz=max(xg.alt(:));
72
+
maxz=max(xg.alt, 'all');
73
73
[tmp,ix1]=min(abs(xg.alt(ix1s,1,1)-maxz*1e3));
74
74
ix1=ix1s(ix1);
75
75
thetavals=xg.theta(ix1:lx1,:,:);
76
-
meantheta=mean(thetavals(:));
76
+
meantheta=mean(thetavals, 'all');
77
77
phivals=xg.phi(ix1:lx1,:,:);
78
-
meanphi=mean(phivals(:));
78
+
meanphi=mean(phivals, 'all');
79
79
x=(thetavals-meantheta); %this is a mag colat. coordinate and is only used for defining grid in linspaces below and the parametric surfaces in the plots
Copy file name to clipboardExpand all lines: +gemini3d/+plot/curv2d.m
+16-16Lines changed: 16 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ function curv2d(time,xg,parm,parmlbl,caxlims, sourceloc, h, cmap)
26
26
sourcemlat=sourceloc(1);
27
27
%sourcemlon=sourceloc(2);
28
28
else
29
-
sourcemlat=mean(90-xg.theta(:)*180/pi); %just take avg. over the grid
29
+
sourcemlat=mean(90-rad2deg(xg.theta), 'all'); %just take avg. over the grid
30
30
end%if
31
31
32
32
@@ -45,22 +45,22 @@ function curv2d(time,xg,parm,parmlbl,caxlims, sourceloc, h, cmap)
45
45
46
46
47
47
%SIZE OF PLOT GRID THAT WE ARE INTERPOLATING ONTO
48
-
meantheta=mean(xg.theta(:));
49
-
%meanphi=mean(xg.phi(:));
48
+
meantheta=mean(xg.theta, 'all');
49
+
%meanphi=mean(xg.phi, 'all');
50
50
%meanphi=xg.x3(inds3(1)); %dont' forget that x3 has ghost cells!!!
51
51
x=(xg.theta-meantheta); %this is a mag colat. coordinate and is only used for defining grid in linspaces below
52
52
%y=(xg.phi-meanphi); %mag. lon coordinate
53
53
z=xg.alt/1e3;
54
54
lxp=1500;
55
55
%lyp=500;
56
56
lzp=1500;
57
-
minx=min(x(:));
58
-
maxx=max(x(:));
59
-
%miny=min(y(:));
60
-
%maxy=max(y(:));
61
-
%minz=min(z(:));
57
+
minx=min(x, 'all');
58
+
maxx=max(x, 'all');
59
+
%miny=min(y, 'all');
60
+
%maxy=max(y, 'all');
61
+
%minz=min(z, 'all');
62
62
minz=0;
63
-
maxz=max(z(:));
63
+
maxz=max(z, 'all');
64
64
xp=linspace(minx,maxx,lxp);
65
65
%yp=linspace(miny,maxy,lyp);
66
66
zp=linspace(minz,maxz,lzp)';
@@ -69,23 +69,23 @@ function curv2d(time,xg,parm,parmlbl,caxlims, sourceloc, h, cmap)
69
69
%ix1s=floor(lx1/2):lx1; %only valide for a grid which is symmetric aboutu magnetic equator... (I think)
70
70
ix1s=find(xg.x1(inds1)>=0); %works for asymmetric grids
71
71
minz=0;
72
-
maxz=max(xg.alt(:));
72
+
maxz=max(xg.alt, 'all');
73
73
[tmp,ix1]=min(abs(xg.alt(ix1s,1,1)-maxz*1e3));
74
74
ix1=ix1s(ix1);
75
75
thetavals=xg.theta(ix1:lx1,:,:);
76
-
meantheta=mean(thetavals(:));
76
+
meantheta=mean(thetavals, 'all');
77
77
phivals=xg.phi(ix1:lx1,:,:);
78
-
meanphi=mean(phivals(:));
78
+
meanphi=mean(phivals, 'all');
79
79
x=(thetavals-meantheta); %this is a mag colat. coordinate and is only used for defining grid in linspaces below and the parametric surfaces in the plots
%ix1s=floor(lx1/2):lx1; %only valide for a grid which is symmetric aboutu magnetic equator... (I think)
91
91
ix1s=find(xg.x1(inds1)>=0); %works for asymmetric grids
92
92
minz=0;
93
-
maxz=max(xg.alt(:));
93
+
maxz=max(xg.alt, 'all');
94
94
[tmp,ix1]=min(abs(xg.alt(ix1s,1,1)-maxz*1e3));
95
95
ix1=ix1s(ix1);
96
96
thetavals=xg.theta(ix1:lx1,:,:);
97
-
meantheta=mean(thetavals(:));
97
+
meantheta=mean(thetavals, 'all');
98
98
phivals=xg.phi(ix1:lx1,:,:);
99
-
meanphi=mean(phivals(:));
99
+
meanphi=mean(phivals, 'all');
100
100
x=(thetavals-meantheta); %this is a mag colat. coordinate and is only used for defining grid in linspaces below and the parametric surfaces in the plots
0 commit comments