📄 asufit.m
字号:
uicontrol(mainWindow,...
'Style', 'edit',...
'Units', 'normalized',...
'visible', 'off',...
'HorizontalAlignment', 'left',...
'BackgroundColor', [0.8 0.8 0.8],...
'ForegroundColor', [1 0 0],...
'position', [.35 .29 .6 .03],...
'CallBack', 'Asufit(''getAbsOptions'')'...
);
absNumAllTaoText = ... % Identifier for all rate constants box
uicontrol(mainWindow,...
'Style', 'text',...
'Units', 'normalized',...
'visible', 'off',...
'String', 'Total number of tao: ',...
'HorizontalAlignment', 'right',...
'BackgroundColor', [0.8 0.8 0.8],...
'ForegroundColor', [0 0 0],...
'Position', [.05 .26 .3 .03]...
);
absNumAllTaoBox = ... Display for all rate constants
uicontrol(mainWindow,...
'Style', 'text',...
'Units', 'normalized',...
'visible', 'off',...
'HorizontalAlignment', 'left',...
'BackgroundColor', [0.8 0.8 0.8],...
'ForegroundColor', [0 0 0],...
'position', [.35 .26 .6 .03]...
);
absAllTaoText = ... % Identifier for all rate constants box
uicontrol(mainWindow,...
'Style', 'text',...
'Units', 'normalized',...
'visible', 'off',...
'String', 'Tao values are: ',...
'HorizontalAlignment', 'right',...
'BackgroundColor', [0.8 0.8 0.8],...
'ForegroundColor', [0 0 0],...
'Position', [.05 .23 .3 .03]...
);
absAllTaoBox = ... Display for all rate constants
uicontrol(mainWindow,...
'Style', 'text',...
'Units', 'normalized',...
'visible', 'off',...
'HorizontalAlignment', 'left',...
'BackgroundColor', [0.8 0.8 0.8],...
'ForegroundColor', [0 0 0],...
'position', [.35 .23 .6 .03]...
);
absDisperText = ...
uicontrol(mainWindow,...
'Style', 'text',...
'Units', 'normalized',...
'visible', 'off',...
'String', 'Dispersion Correction: ',...
'HorizontalAlignment', 'right',...
'BackgroundColor', [0.8 0.8 0.8],...
'ForegroundColor', [0 0 0],...
'Position', [.05 .17 .3 .03]...
);
absDisper1Hypertext = ...
uicontrol(mainWindow,...
'Style', 'radiobutton',...
'Units', 'normalized',...
'visible', 'off',...
'String', 'None',...
'BackgroundColor', [0.8 0.8 0.8],...
'Position', [.35 .17 .1 .03],...
'Max', 1,...
'Min', 0,...
'Callback', 'Asufit(''noDispersion'');'...
);
absDisper2Hypertext = ...
uicontrol(mainWindow,...
'Style', 'radiobutton',...
'Units', 'normalized',...
'visible', 'off',...
'String', 'During fit',...
'BackgroundColor', [0.8 0.8 0.8],...
'Position', [.45 .17 .1 .03],...
'Max', 1, 'Min', 0,...
'Callback', 'Asufit(''dispersionDuringFit'');'...
);
abscheckboxtext = ...
uicontrol(mainWindow,...
'Style', 'text',...
'Units', 'normalized',...
'visible', 'off',...
'String', 'Set constant:',...
'BackgroundColor', [0.8 0.8 0.8],...
'ForegroundColor', [0 0 0],...
'Position', [.6 .17 .2 .03]);
absDisperCoeffsText = ... % Identifier for
uicontrol(mainWindow,...
'Style', 'text',...
'Units', 'normalized',...
'visible', 'off',...
'String', '[a,b,c] = ',...
'HorizontalAlignment', 'right',...
'BackgroundColor', [0.8 0.8 0.8],...
'ForegroundColor', [0 0 0],...
'Position', [.05 .14 .3 .03]...
);
absDisperCoeffsBox = ... % Rate constant display text box
uicontrol(mainWindow,...
'Style', 'edit',...
'Units', 'normalized',...
'visible', 'off',...
'HorizontalAlignment','left',...
'BackgroundColor', [0.8 0.8 0.8],...
'ForegroundColor', [1 0 0],...
'position', [.35 .14 .3 .03],...
'Callback', 'Asufit(''getAbsOptions'');'...
);
abscheckbox1 = ...
uicontrol(mainWindow,...
'Style', 'checkbox',...
'Units', 'normalized',...
'visible', 'off',...
'HorizontalAlignment','left',...
'BackgroundColor', [0.8 0.8 0.8],...
'position', [.7 .14 .03 .03],...
'Callback', 'Asufit(''getAbsOptions'');'...
);
absPulseWidthText = ... % Identifier for pulsewidth box
uicontrol(mainWindow,...
'Style', 'text',...
'Units', 'normalized',...
'visible', 'off',...
'String', 'FWHM of IRF : ',...
'HorizontalAlignment', 'right',...
'BackgroundColor', [0.8 0.8 0.8],...
'ForegroundColor', [0 0 0],...
'Position', [.05 .11 .3 .03]...
);
absPulseWidthBox = ... % Input and display for pulse width
uicontrol(mainWindow,...
'Style', 'edit',...
'Units', 'normalized',...
'Visible', 'off',...
'HorizontalAlignment','left',...
'BackgroundColor', [0.8 0.8 0.8],...
'ForegroundColor', [1 0 0],...
'Position', [.35 .11 .3 .03],...
'Callback', 'Asufit(''getAbsOptions'')'...
);
abscheckbox2 = ...
uicontrol(mainWindow,...
'Style', 'checkbox',...
'Units', 'normalized',...
'visible', 'off',...
'HorizontalAlignment','left',...
'BackgroundColor', [0.8 0.8 0.8],...
'position', [.7 .11 .03 .03],...
'Callback', 'Asufit(''getAbsOptions'');'...
);
absShiftGuessText = ... % Identifier for delay zero
uicontrol(mainWindow,...
'Style', 'text',...
'Units', 'normalized',...
'visible', 'off',...
'String', 'Zero delay: ',...
'HorizontalAlignment', 'right',...
'BackgroundColor', [0.8 0.8 0.8],...
'ForegroundColor', [0 0 0],...
'Position', [.05 .08 .3 .03]...
);
absShiftGuessBox = ... % Input and display for delay zero
uicontrol(mainWindow,...
'Style', 'edit',...
'Units', 'normalized',...
'visible', 'off',...
'HorizontalAlignment','left',...
'BackgroundColor', [0.8 0.8 0.8],...
'ForegroundColor', [1 0 0],...
'position', [.35 .08 .3 .03],...
'Callback', 'Asufit(''getAbsOptions'')'...
);
abscheckbox3 = ...
uicontrol(mainWindow,...
'Style', 'checkbox',...
'Units', 'normalized',...
'visible', 'off',...
'HorizontalAlignment','left',...
'BackgroundColor', [0.8 0.8 0.8],...
'position', [.7 .08 .03 .03],...
'Callback', 'Asufit(''getAbsOptions'');'...
);
absMaxItText = ... %Identifer for maximum number of iterations box
uicontrol(mainWindow,...
'Style', 'text',...
'Units', 'normalized',...
'visible', 'off',...
'String', 'Maximum iterations: ',...
'HorizontalAlignment', 'right',...
'BackgroundColor', [0.8 0.8 0.8],...
'ForegroundColor', [0 0 0],...
'Position', [.05 .05 .3 .03]...
);
absMaxItBox = ... % Input and display for maximum number of iterations
uicontrol(mainWindow,...
'Style', 'edit',...
'Units', 'normalized',...
'visible', 'off',...
'HorizontalAlignment','left',...
'BackgroundColor', [0.8 0.8 0.8],...
'ForegroundColor', [1 0 0],...
'position', [.35 .05 .3 .03],...
'Callback', 'Asufit(''getAbsOptions'');'...
);
% --- The following commands display the configured Asufit figure window
promptStr='Open file(s) to begin analysis.';
set(textBox,'String',promptStr);
set(mainWindow,'visible','on');
% --- The followiwng commands check to see if data is present and acts
% --- approptiately
if (~isempty(analysisType))
if (analysisType == 1)
Asufit('spc')
elseif (analysisType == 2)
Asufit('abs')
elseif (analysisType == 3)
Asufit('svd')
end
end
elseif strcmp(action,'spc')
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% This action argument sets up the Asufit window for SPC data in the workspace
% for the SPC data present
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% Enable SPC menu items
set(expFile,'enable','off');
set(kineticsFile,'enable','off');
set(spectrumFile,'enable','off');
set(plot3D,'enable','off');
set(ampSpecPlot,'enable','off');
set(ampSpecFile,'enable','off');
set(absDispersion,'enable','off');
set(abstimeaxis,'enable','off');
set(subtract,'enable','on');
if (~isempty(fit))
set(spcFitSave,'Enable','on');
end
if (isempty(spcLeftEnd))
spcLeftEnd = 1;
end
if (isempty(spcRightEnd))
spcRightEnd = length(t);
end
if (isempty(spcPlotMode))
spcPlotMode = 1;
end
% Display text to command window
promptStr='SPC/IRF data present in workspace.';
set(textBox,'String',promptStr);
set(optionsbutton,'visible', 'on');
set(plotbutton,'Visible', 'on');
set(svdbutton,'Visible', 'off');
Asufit('setSpcOptions')
elseif strcmp(action,'abs')
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% This action argument seta up the Asufit window for absorbance data in the
% workspace
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% Enable absorbance menu items
set(expFile,'enable','on');
set(kineticsFile,'enable','on');
set(spectrumFile,'enable','on');
set(plot3D,'enable','on');
set(ampSpecFile,'enable','on');
set(absDispersion,'enable','on');
set(abstimeaxis,'enable','on');
set(subtract,'Enable','On');
set(restore,'Enable','On');
% Activate absorbance controls
if (isempty(spcLeftEnd))
spcLeftEnd = 1;
end
if (isempty(spcRightEnd))
spcRightEnd = length(t);
end
if (isempty(spcPlotMode))
spcPlotMode = 1;
end
% Display text to command window
set(optionsbutton,'Visible', 'on');
set(plotbutton,'Visible', 'on');
if (isempty(absLeftEnd1))
absLeftEnd1 = 1;
end
if (isempty(absRightEnd1))
absRightEnd1 = length(t);
end
if (isempty(absLeftEnd2))
absLeftEnd2 = 1;
end
if (isempty(absRightEnd2))
absRightEnd2 = length(wavelength);
end
% Display text to command window
set(svdbutton,'Visible', 'on');
set(action1button,'String','Fit');
set(action1button,'Callback','Asufit(''fit'');');
set(action1button,'Visible','on');
set(action3button,'Visible','on');
set(action3button,'String','Model');
set(action3button,'Callback','Asufit(''selectfitmodel'');');
set(action2button,'Visible','On');
set(action2button,'String','DispCorr');
set(action2button,'Callback','Asufit(''dispersionNow'');');
Asufit('setAbsOptions')
elseif strcmp(action, 'allOff')
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
% This action turns off
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -