Skip to content

Commit

Permalink
Update Huber_Weight_calculation_IGRF14.m
Browse files Browse the repository at this point in the history
Remove references to coast.dat and to lat and long
  • Loading branch information
ciaranbe authored Dec 15, 2024
1 parent e781a1b commit b3c1144
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions matlab/Huber_Weight_calculation_IGRF14.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
% Uses the Matlab Statistical Toolbox robustfit.m
%
% This approach is described and used in:
% Thébault, E., Finlay, C.C., Alken, P. et al.
% Thébault, E., Finlay, C.C., Alken, P. et al.
% Evaluation of candidate geomagnetic field models for IGRF-12.
% Earth Planet Sp 67, 112 (2015) doi:10.1186/s40623-015-0273-4
% Original code from E. Thebault (October 2014)
Expand Down Expand Up @@ -267,10 +267,6 @@
VOID = [];
C_max = 1;

load('~ciar/work/Swarm/coast.dat');
lat = coast(:,2);
long = coast(:,1);

for i=1:max(size(TAB))
TAB_values = TAB{i};

Expand All @@ -291,15 +287,13 @@
pole_width = .3;
axes('Position', [0 0.45 pole_width pole_width], 'Box', 'off')
axesm('MapProjection', 'ortho', 'Origin', [90 0], 'FLatLimit',[-Inf 40.01])
plotm(lat, long, '-k', 'Linewidth', 1)
scatterm(TAB_values(:,2),TAB_values(:,1),15,w_tmp,'filled');
tightmap
caxis([-C_max C_max])
set(gca, 'Box', 'off', 'Visible', 'off')

axes('Position', [1-pole_width 0.45 pole_width pole_width ], 'Box', 'off')
axesm('MapProjection', 'ortho', 'Origin', [-90 0], 'FLatLimit',[-Inf 39.9])
plotm(lat, long, '-k', 'Linewidth', 1)
scatterm(TAB_values(:,2),TAB_values(:,1),15,w_tmp,'filled');
tightmap
caxis([-C_max C_max])
Expand All @@ -308,7 +302,6 @@
axes('Position', [0 0 1 .5], 'Box', 'off')
axesm('MapProjection', 'hammer', 'Frame', 'off')
scatterm(TAB_values(:,2),TAB_values(:,1),15,w_tmp,'filled');
plotm(lat, long, '-k', 'Linewidth', 1)
gridm
tightmap
set(gca, 'Box', 'off', 'Visible', 'off')
Expand Down Expand Up @@ -833,10 +826,7 @@

a = 6371.2;
C_max = 10; dC = 2;
load('~ciar/work/Swarm/coast.dat')

lat = coast(:,2);
long = coast(:,1);

if size(TAB,2) ~= 2
for i=1:size(TAB,2)
Expand All @@ -856,15 +846,13 @@
pole_width = .3;
axes('Position', [0 0.45 pole_width pole_width], 'Box', 'off')
axesm('MapProjection', 'ortho', 'Origin', [90 0], 'FLatLimit',[-Inf 40.01])
plotm(lat, long, '-k', 'Linewidth', 1)
meshm(B_tmp, B_ref)
tightmap
caxis(C_max*[-1 1])
set(gca, 'Box', 'off', 'Visible', 'off')

axes('Position', [1-pole_width 0.45 pole_width pole_width ], 'Box', 'off')
axesm('MapProjection', 'ortho', 'Origin', [-90 0], 'FLatLimit',[-Inf 39.9])
plotm(lat, long, '-k', 'Linewidth', 1)
meshm(B_tmp, B_ref)
tightmap
caxis(C_max*[-1 1])
Expand All @@ -873,7 +861,6 @@
axes('Position', [0 0 1 .5], 'Box', 'off')
axesm('MapProjection', 'hammer', 'Frame', 'off')
meshm(B_tmp, B_ref)
plotm(lat, long, '-k', 'Linewidth', 1)
gridm
tightmap
set(gca, 'Box', 'off', 'Visible', 'off')
Expand Down Expand Up @@ -982,15 +969,13 @@
pole_width = .3;
axes('Position', [0 0.45 pole_width pole_width], 'Box', 'off')
axesm('MapProjection', 'ortho', 'Origin', [90 0], 'FLatLimit',[-Inf 40.01])
plotm(lat, long, '-k', 'Linewidth', 1)
meshm(B_tmp, B_ref)
tightmap
caxis(C_max*[-1 1])
set(gca, 'Box', 'off', 'Visible', 'off')

axes('Position', [1-pole_width 0.45 pole_width pole_width ], 'Box', 'off')
axesm('MapProjection', 'ortho', 'Origin', [-90 0], 'FLatLimit',[-Inf 39.9])
plotm(lat, long, '-k', 'Linewidth', 1)
meshm(B_tmp, B_ref)
tightmap
caxis(C_max*[-1 1])
Expand All @@ -999,7 +984,6 @@
axes('Position', [0 0 1 .5], 'Box', 'off')
axesm('MapProjection', 'hammer', 'Frame', 'off')
meshm(B_tmp, B_ref)
plotm(lat, long, '-k', 'Linewidth', 1)
gridm
tightmap
set(gca, 'Box', 'off', 'Visible', 'off')
Expand Down

0 comments on commit b3c1144

Please sign in to comment.