<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki-pnb.eri.ucsb.edu/index.php?action=history&amp;feed=atom&amp;title=Ac9cal.m</id>
	<title>Ac9cal.m - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki-pnb.eri.ucsb.edu/index.php?action=history&amp;feed=atom&amp;title=Ac9cal.m"/>
	<link rel="alternate" type="text/html" href="https://wiki-pnb.eri.ucsb.edu/index.php?title=Ac9cal.m&amp;action=history"/>
	<updated>2026-04-06T03:55:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>https://wiki-pnb.eri.ucsb.edu/index.php?title=Ac9cal.m&amp;diff=312&amp;oldid=prev</id>
		<title>Eriks: Created page with '&lt;pre&gt; % Title:        AC9CAL.M % Date:          % Author:       srw % Input:        ['par_name','par_value', etc] % Output:        % Files:        ac9cal_cb.m,ac9cal_gui.mat % As…'</title>
		<link rel="alternate" type="text/html" href="https://wiki-pnb.eri.ucsb.edu/index.php?title=Ac9cal.m&amp;diff=312&amp;oldid=prev"/>
		<updated>2011-03-17T20:07:57Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;&amp;lt;pre&amp;gt; % Title:        AC9CAL.M % Date:          % Author:       srw % Input:        [&amp;#039;par_name&amp;#039;,&amp;#039;par_value&amp;#039;, etc] % Output:        % Files:        ac9cal_cb.m,ac9cal_gui.mat % As…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
% Title:        AC9CAL.M&lt;br /&gt;
% Date:         &lt;br /&gt;
% Author:       srw&lt;br /&gt;
% Input:        ['par_name','par_value', etc]&lt;br /&gt;
% Output:       &lt;br /&gt;
% Files:        ac9cal_cb.m,ac9cal_gui.mat&lt;br /&gt;
% Assumes:      &lt;br /&gt;
% Purpose:      View and process ac9 calibration data&lt;br /&gt;
% Calls:        ac9cal_cb,&lt;br /&gt;
% Uses:         &lt;br /&gt;
% Example:      ac9cal or ac9cal('list_file','foo.txt')&lt;br /&gt;
% NOTES:        comments and caveats&lt;br /&gt;
%&lt;br /&gt;
% ac9cal returns the figure number of the ac9cal gui and the &lt;br /&gt;
% structure stored in the ac9calFig userdata,&lt;br /&gt;
%   ac9.par field initially contains acrcal_def.par values and is then&lt;br /&gt;
%      updated according to arguments passed to this function.&lt;br /&gt;
%   ac9.other fields are for each object in ac9calFig and contain a value&lt;br /&gt;
%      and a string field.&lt;br /&gt;
% Creates/raises ac9cal figure, initializes/gets ac9 structure.&lt;br /&gt;
% Assigns parameters passed through function call to ac9.par fields,&lt;br /&gt;
%   no need for define/default values here as there are taken care of&lt;br /&gt;
%   in ac9cal_cb('init').&lt;br /&gt;
% Updates userdata in ac9calFig.&lt;br /&gt;
% Raises QcaledFig1, if open, gets filename and properties from QcaledFig1.&lt;br /&gt;
% Good for finding ac9cal window from matlab prompt. &lt;br /&gt;
% Updates ac9calFig objects and userdata in ac9calFig.&lt;br /&gt;
% &lt;br /&gt;
% NOTE: Values in the userdata structure do reflect changes on the&lt;br /&gt;
% gui until an ac9cal_cb('par_update') is given. &lt;br /&gt;
&lt;br /&gt;
function [ac9calfig,ac9]=ac9cal(varargin)&lt;br /&gt;
  if nargin==1 &amp;amp; strcmp(varargin{1},'quit'),&lt;br /&gt;
    file_gui_cb('CloseAll');&lt;br /&gt;
    return&lt;br /&gt;
  end&lt;br /&gt;
  %Create/raise ac9cal figure&lt;br /&gt;
  ac9calfig=findall(0,'Tag','ac9calFig');&lt;br /&gt;
  if isempty(ac9calfig),&lt;br /&gt;
    ac9.par=ac9cal_cb('init');&lt;br /&gt;
    ac9calfig=ac9cal_cb('ac9cal_gui','par',ac9.par);&lt;br /&gt;
  else&lt;br /&gt;
    figure(ac9calfig);&lt;br /&gt;
    ac9=get(ac9calfig,'User');&lt;br /&gt;
  end&lt;br /&gt;
  ac9cal_cb('reset');&lt;br /&gt;
  %Update ac9.par fields with pairs passed to this function&lt;br /&gt;
  narg=length(varargin);&lt;br /&gt;
  nrow=narg/2;&lt;br /&gt;
  if nrow==round(nrow),&lt;br /&gt;
    for iarg=1:2:length(varargin),&lt;br /&gt;
      eval(['ac9.par.' varargin{iarg} '= varargin{iarg+1}']);&lt;br /&gt;
    end&lt;br /&gt;
  else&lt;br /&gt;
    display('ac9cal_cb: command line pairs not correctly formed');&lt;br /&gt;
    return&lt;br /&gt;
  end&lt;br /&gt;
  %Store in ac9calfig userdata&lt;br /&gt;
  set(ac9calfig,'User',ac9);&lt;br /&gt;
  %&lt;br /&gt;
  filename=ac9.par.list_file;&lt;br /&gt;
  %assign list_file in QcaledFig, the list_file editor, if there&lt;br /&gt;
  fig=findobj('Tag','QcaledFig1');&lt;br /&gt;
  if ~isempty(fig),&lt;br /&gt;
    get(findobj(fig,'Tag','list_file'),'String');&lt;br /&gt;
    if ~isempty(ans),&lt;br /&gt;
      filename=ans;&lt;br /&gt;
    end&lt;br /&gt;
    str=strvcat('prop','abs','fluid','air');&lt;br /&gt;
    %Update ac9calfig objects with values from QcaledFig1&lt;br /&gt;
    for ip=1:4,&lt;br /&gt;
      get(findobj(fig,'Tag',deblank(str(ip,:))),'Value');&lt;br /&gt;
      set(findobj(ac9calfig,'Tag',deblank(str(ip,:))),'Value',ans);&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
  set(findobj(ac9calfig,'Tag','list_file'),'String',filename);&lt;br /&gt;
  %Poll and parse all objects for sting and value, put into ac9&lt;br /&gt;
  ac9=ac9cal_cb('par_update');&lt;br /&gt;
  %Store in ac9calfig userdata  &lt;br /&gt;
  set(ac9calfig,'User',ac9);&lt;br /&gt;
  return&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[ac9cal]]&lt;/div&gt;</summary>
		<author><name>Eriks</name></author>
		
	</entry>
</feed>