function res = h3d_upsample(s, ratio) % Let's see how big they become test = interp2(squeeze(s.cube_hs(1,:,:)), ratio); oldsize = s.cube_ncells ; res.cube_ncells = size(test,1); res.angular_cell_size_deg = s.angular_cell_size_deg * (s.cube_ncells / res.cube_ncells); res.rho_min = s.rho_min; res.rho_max = s.rho_max; res.rho_ncells = s.rho_ncells; res.rho_cell_size = s.rho_cell_size; res.points = s.points; % Cube data structure % one side of the cube is about pi/2 rad for face=1:6 for i=1:res.cube_ncells for j=1:res.cube_ncells [face, u, v] = h3d_coords_cell_to_avg_cube(face, i, j, res.cube_ncells); normal = h3d_coords_cube_to_s2(face, u, v); s.cube_normals{face, i, j} = normal; end end end res.cube_ht = zeros(6, res.cube_ncells, res.cube_ncells, res.rho_ncells); res.cube_hs = zeros(6, res.cube_ncells, res.cube_ncells); for face=1:6 res.cube_hs(face,:,:) = interp2( squeeze(s.cube_hs(face,:,:)), ratio ); end