Skip to content
Snippets Groups Projects
Commit 600af99c authored by Charlotte Bond's avatar Charlotte Bond
Browse files

updating functions

parent e9aac044
Branches
Tags
No related merge requests found
%
%--------------------------------------------------------------------------
% function [map_out,Rc_out, delta_x0, delta_y0] =
% function [map_out,Rc_out, zoffset] =
% FT_remove_curvature_from_mirror_map(map_in,Rc_in,w, display)
%
% A function for Matlab which tries to fit a sphere to the mirror surface
......@@ -64,7 +64,7 @@ function [map_out,Rc_out,zoffset]=FT_remove_curvature_from_mirror_map(map,Rc_in,
% set options for fminsearch ('help optimset' gives the list of options)
options=optimset('Display',disp_str, 'TolX', 1e-03, 'TolFun',1e-09, 'MaxIter', 100000);
options=optimset('Display',disp_str, 'TolX', 1e-02, 'TolFun',1e-09, 'MaxIter', 100000);
% create link to test function below
f=@testfunc;
......
......@@ -43,8 +43,8 @@ function [map] = FT_remove_elements_outside_map(map)
D=2*radius;
% Remove unnecessary points (nan points) outside the valid map grid.
Rx = round((ceil(D+2)/2));
Ry = round((ceil(D+2)/2));
Rx = round((ceil(D+4)/2));
Ry = round((ceil(D+4)/2));
if 2*Ry<mygrid.ypoints && 2*Rx<mygrid.xpoints
x0 = round(map.x0);
y0 = round(map.y0);
......
......@@ -106,7 +106,7 @@ c_max=max(abs([z_max z_min]));
set(gca, 'CLim', [-c_max c_max]);
set(gca, 'ZLim', [-c_max c_max]);
cmap=flip_colormap;
cmap=FT_flip_colormap;
colormap(cmap);
% Set a tile and align it to the left in order to leave enough space
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment