-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreplication_ig_large.m
More file actions
39 lines (34 loc) · 1.24 KB
/
replication_ig_large.m
File metadata and controls
39 lines (34 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
direc = '//dartfs-hpc/rc/lab/L/LynchK/public_html/Gemini3D/isinglass_81';
cfg = gemini3d.read.config(direc);
direc_rep = fullfile(direc,'ext');
cfg_rep = gemini3d.read.config(direc_rep);
xg_rep = gemini3d.grid.cartesian(cfg_rep);
load(fullfile('data','replicate_data_isinglass.mat'),'in_situ','image')
[phi,mlon,mlat,E2_bg,E3_bg] = jules.tools.replicate(in_situ,image,xg_rep ...
,flow_smoothing_window = 16 ...
,boundary_smoothing_window = 64 ...
,show_plots = false ...
,save_plots = [0 0 0] ...
,save_data = false ...
,direc = '.' ...
,suffix = 'large' ...
,starting_letter = 'A' ...
,add_phi_background = false ...
,fit_harmonic = true ...
,num_replications = 1000 ... %32 or 512
,arc_definition = "conductance" ...
,edge_method = "contour" ...
,do_rotate = 1 ...
,do_scale = 1 ...
,harmonic_mask = [8,8,20]*1e3 ...
,contour_values = [10.5,19.1] ...
);
phi_old = phi;
[X2_rep,X3_rep] = ndgrid(xg_rep.x2(3:end-2),xg_rep.x3(3:end-2));
clear('xg_rep')
clear('xg')
xg = gemini3d.grid.cartesian(cfg);
[X2,X3] = ndgrid(xg.x2(3:end-2),xg.x3(3:end-2));
fphi = griddedInterpolant(X2_rep,X3_rep,phi,'spline');
phi = fphi(X2,X3);
save(fullfile(direc,'ext','potential_map.mat'),'phi','E2_bg','E3_bg')