Home > functions > job > job_plot_currentmap_dir > job_plot_cmap_change_Jplot.m

job_plot_cmap_change_Jplot

PURPOSE ^

Check Jplot range and update spatial pattern

SYNOPSIS ^

function job_plot_cmap_change_Jplot(inst_id)

DESCRIPTION ^

 Check Jplot range and update spatial pattern

 [syntax]
 job_plot_cmap_change_Jplot(inst_id)

 [history]
 2008-12-16 Taku Yoshioka
 2011-01-29 taku-y
  [enhancement] Activity map plot supported. 
 2011-03-16 taku-y
  [debug] Colorbar scale check is ignored when 'Fix' is checked on GUI.

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function job_plot_cmap_change_Jplot(inst_id)
0002 % Check Jplot range and update spatial pattern
0003 %
0004 % [syntax]
0005 % job_plot_cmap_change_Jplot(inst_id)
0006 %
0007 % [history]
0008 % 2008-12-16 Taku Yoshioka
0009 % 2011-01-29 taku-y
0010 %  [enhancement] Activity map plot supported.
0011 % 2011-03-16 taku-y
0012 %  [debug] Colorbar scale check is ignored when 'Fix' is checked on GUI.
0013 %
0014 % Copyright (C) 2011, ATR All Rights Reserved.
0015 % License : New BSD License(see VBMEG_LICENSE.txt)
0016 
0017 global vbmeg_inst; 
0018 if isempty(vbmeg_inst.plotcmap{inst_id}.V), return; end
0019 %if isempty(vbmeg_inst.plotcmap{inst_id}.Jact), return; end
0020 
0021 %
0022 % Global variables
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 % Check activity map
0035 %
0036 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0037 if ~isempty(xxP) && get(cb7,'Value'), 
0038   Jmax = max(abs(xxP));
0039 end
0040 
0041 %
0042 % Check value
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 % Change axis and Update spatial pattern
0064 %
0065 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0066 %set(h_cbar,'Ylim',[0 Jmax_plot]);
0067 job_plot_cmap_update_spatialpattern(inst_id);

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005