0001 function job_plot_cmap_change_Jplot(inst_id)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 global vbmeg_inst;
0018 if isempty(vbmeg_inst.plotcmap{inst_id}.V), return; end
0019
0020
0021
0022
0023
0024
0025 h_cbar = vbmeg_inst.plotcmap{inst_id}.h_cbar;
0026 Jmax = vbmeg_inst.plotcmap{inst_id}.Jmax;
0027 Jmax_plot_edit = vbmeg_inst.plotcmap{inst_id}.Jmax_plot_edit;
0028 Jmin_plot_edit = vbmeg_inst.plotcmap{inst_id}.Jmin_plot_edit;
0029 cb1 = vbmeg_inst.plotcmap{inst_id}.cb1;
0030 cb7 = vbmeg_inst.plotcmap{inst_id}.cb7;
0031 xxP = vbmeg_inst.plotcmap{inst_id}.xxP;
0032
0033
0034
0035
0036
0037 if ~isempty(xxP) && get(cb7,'Value'),
0038 Jmax = max(abs(xxP));
0039 end
0040
0041
0042
0043
0044
0045 Jmax_plot = str2num(get(Jmax_plot_edit,'String'));
0046 Jmin_plot = str2num(get(Jmin_plot_edit,'String'));
0047
0048 if get(cb1,'Value')~=get(cb1,'Max'),
0049 if Jmin_plot>=0.9*Jmax, Jmin_plot = 0.9*Jmax;
0050 elseif Jmin_plot<0, Jmin_plot = 0; end
0051
0052 if Jmax_plot>Jmax, Jmax_plot = Jmax;
0053 elseif Jmax_plot<Jmin_plot, Jmax_plot = Jmin_plot;
0054 elseif Jmax_plot<1e-10*Jmax, Jmax_plot = 1e-10*Jmax; end
0055 end
0056
0057 vbmeg_inst.plotcmap{inst_id}.Jmax_plot = Jmax_plot;
0058 vbmeg_inst.plotcmap{inst_id}.Jmin_plot = Jmin_plot;
0059 set(Jmax_plot_edit,'String',num2str(Jmax_plot));
0060 set(Jmin_plot_edit,'String',num2str(Jmin_plot));
0061
0062
0063
0064
0065
0066
0067 job_plot_cmap_update_spatialpattern(inst_id);