<?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=Ac9bt.m</id>
	<title>Ac9bt.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=Ac9bt.m"/>
	<link rel="alternate" type="text/html" href="https://wiki-pnb.eri.ucsb.edu/index.php?title=Ac9bt.m&amp;action=history"/>
	<updated>2026-04-04T19:14:40Z</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=Ac9bt.m&amp;diff=310&amp;oldid=prev</id>
		<title>Eriks at 19:53, 17 March 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki-pnb.eri.ucsb.edu/index.php?title=Ac9bt.m&amp;diff=310&amp;oldid=prev"/>
		<updated>2011-03-17T19:53:52Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 19:53, 17 March 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l162&quot; &gt;Line 162:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 162:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;not_ac9_files&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;not_ac9_files&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[ac9bt]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Eriks</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-pnb.eri.ucsb.edu/index.php?title=Ac9bt.m&amp;diff=309&amp;oldid=prev</id>
		<title>Eriks: Created page with '&lt;pre&gt; % AC9BT % FEB 98,FEB 99 % Stephen Wolfe % Input:	none % Look for:	list_ac9 % Output: 	z*.lcd.?, z*.lcd.strip % Assumptions:	fixed for either single casts or yo-yo's. Have t…'</title>
		<link rel="alternate" type="text/html" href="https://wiki-pnb.eri.ucsb.edu/index.php?title=Ac9bt.m&amp;diff=309&amp;oldid=prev"/>
		<updated>2011-03-17T19:49:58Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;&amp;lt;pre&amp;gt; % AC9BT % FEB 98,FEB 99 % Stephen Wolfe % Input:	none % Look for:	list_ac9 % Output: 	z*.lcd.?, z*.lcd.strip % Assumptions:	fixed for either single casts or yo-yo&amp;#039;s. Have t…&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;
% AC9BT&lt;br /&gt;
% FEB 98,FEB 99&lt;br /&gt;
% Stephen Wolfe&lt;br /&gt;
% Input:	none&lt;br /&gt;
% Look for:	list_ac9&lt;br /&gt;
% Output: 	z*.lcd.?, z*.lcd.strip&lt;br /&gt;
% Assumptions:	fixed for either single casts or yo-yo's. Have to&lt;br /&gt;
%               pick something for at least 1 profile of each yo-yo&lt;br /&gt;
%               for the profile numbers to work correctly. Can't tell&lt;br /&gt;
%               if you skip a down-up pair.&lt;br /&gt;
%		&lt;br /&gt;
% Purpose:	pick tops and bottoms &lt;br /&gt;
%		&lt;br /&gt;
% Calls:	bt_ac9&lt;br /&gt;
% Maintain: 	{filename, columnarraylist, disp_text}&lt;br /&gt;
% Uses:     	perfect for ac9 processing, ref: ac9.ins&lt;br /&gt;
% Example:  	ac9bt&lt;br /&gt;
% Notes:        This will run on NT if the call to bbopstrip is&lt;br /&gt;
%               commented out and the files are already stripped&lt;br /&gt;
%               Should label direction in castid table as well as&lt;br /&gt;
%               profile number. Work from left to right. If you&lt;br /&gt;
%               choose not to save points for a profile, you can&lt;br /&gt;
%               repick them and choose save and then go on.&lt;br /&gt;
% TO DO:        The archive scheme does not work due to changes in&lt;br /&gt;
%               naming convention. Doesn't create the log directory&lt;br /&gt;
%               if it's not there either.&lt;br /&gt;
&lt;br /&gt;
a=1;&lt;br /&gt;
clf;&lt;br /&gt;
list_ac9=[];&lt;br /&gt;
ac9_files=[];&lt;br /&gt;
not_ac9_files=[];&lt;br /&gt;
tmpfile=fullfile(pwd,'goac9bt_tmp')                                              % check for list_ac9 in pwd&lt;br /&gt;
[s,m]=unix('ls list_ac9');&lt;br /&gt;
&lt;br /&gt;
if isempty(m)&lt;br /&gt;
 msg=sprintf('Check your list_ac9.');&lt;br /&gt;
 disp(msg)&lt;br /&gt;
 return&lt;br /&gt;
end&lt;br /&gt;
clear s m&lt;br /&gt;
						% load list_ac9&lt;br /&gt;
fid=fopen('list_ac9','r');&lt;br /&gt;
while fid,&lt;br /&gt;
  check=fgetl(fid);&lt;br /&gt;
  if check == -1, break, end&lt;br /&gt;
  list_ac9=[list_ac9; check];&lt;br /&gt;
end&lt;br /&gt;
list_ac9;&lt;br /&gt;
clear fid check&lt;br /&gt;
						% check presence of ac9 files&lt;br /&gt;
badfilectr=0;&lt;br /&gt;
for i=1:size(list_ac9,1)&lt;br /&gt;
 [s,m]=unix(['ls ',list_ac9(i,:)]);&lt;br /&gt;
 if s&lt;br /&gt;
  badfilectr=badfilectr+1;&lt;br /&gt;
 end&lt;br /&gt;
end&lt;br /&gt;
clear i&lt;br /&gt;
if badfilectr&lt;br /&gt;
 if badfilectr==1&lt;br /&gt;
  msg=sprintf('%i missing ac9 file.',badfilectr);&lt;br /&gt;
  disp(msg)&lt;br /&gt;
  error('Your ac9list includes a file not in pwd.')&lt;br /&gt;
 else&lt;br /&gt;
  msg=sprintf('%i missing ac9 files.',badfilectr);&lt;br /&gt;
  disp(msg)&lt;br /&gt;
  error('Your ac9list includes files not in pwd.')&lt;br /&gt;
 end&lt;br /&gt;
end&lt;br /&gt;
clear s m badfilectr msg&lt;br /&gt;
						% loop through &lt;br /&gt;
for i=1:size(list_ac9,1)&lt;br /&gt;
  ac9_lcd=list_ac9(i,:); %changes directory in and out&lt;br /&gt;
						% strip em&lt;br /&gt;
  ac9_strip=[ac9_lcd '.strip'];&lt;br /&gt;
 % cd ..&lt;br /&gt;
 &lt;br /&gt;
  %eval(['E_BBstrip -sz 1mer_time 1depth', ac9_lcd ' ' ac9_strip]); %modified from BBopstrip to E_BBstrip removed ! -sz&lt;br /&gt;
  E_BBstrip(a,ac9_lcd,'1mer_time','1depth')&lt;br /&gt;
  ac9_strip;&lt;br /&gt;
 &lt;br /&gt;
  %cd .. &lt;br /&gt;
  &lt;br /&gt;
  [fileA,headA]=read_strip(ac9_strip);&lt;br /&gt;
  pwd;&lt;br /&gt;
  %eval(['!rm ''ac9_strip']);&lt;br /&gt;
  %cd ..&lt;br /&gt;
  [bt_pts]=bt_ac9(fileA);&lt;br /&gt;
&lt;br /&gt;
  if ~isempty(bt_pts),&lt;br /&gt;
    %create header, castid matrix&lt;br /&gt;
    %castid  index   1mer_time       1depth&lt;br /&gt;
    %zub11008adt1     7.5000000e+01   2.1710000e+04   2.0443990e+02&lt;br /&gt;
    %zub11008adb1     1.2810000e+03   3.7655000e+05   1.3007170e+00 &lt;br /&gt;
    %castdir={ 'dt','db','ub','ut' };&lt;br /&gt;
    %castdir=[castdir castdir castdir castdir]; %  good for 4 yoyo's&lt;br /&gt;
    %if size(bt_pts,1)&amp;gt;size(castdir,2),&lt;br /&gt;
    %  error('ac9bt: increase size of castdir.');&lt;br /&gt;
    %end&lt;br /&gt;
    dd=[];&lt;br /&gt;
    idir=[];&lt;br /&gt;
    dd=diff(bt_pts(:,3));&lt;br /&gt;
    dd=[dd; 0];&lt;br /&gt;
    id=1;&lt;br /&gt;
    %cd('pb218')&lt;br /&gt;
   %------------------------------------------have to change&lt;br /&gt;
    &lt;br /&gt;
    fid=fopen( 'bt.pts', 'w' );&lt;br /&gt;
    fprintf(fid,'castid	index	1mer_time	1depth\n');&lt;br /&gt;
    for i=1:2:size(bt_pts,1),&lt;br /&gt;
      if dd(i)&amp;gt;0,&lt;br /&gt;
	if idir==1,&lt;br /&gt;
	  id=id+1;&lt;br /&gt;
	end&lt;br /&gt;
	idir=1;&lt;br /&gt;
	castdir1(i:i+1,:)=['dt'; 'db'];&lt;br /&gt;
      else,&lt;br /&gt;
	idir=2;&lt;br /&gt;
	castdir1(i:i+1,:)=['ub'; 'ut'];&lt;br /&gt;
      end&lt;br /&gt;
      bt_castname=[ ac9_lcd(1:9),castdir1(i,:),num2str(id) ];&lt;br /&gt;
      fprintf(fid,'%s %1.7e %1.7e %1.7e \n',bt_castname,bt_pts(i,:));&lt;br /&gt;
      bt_castname=[ ac9_lcd(1:9),castdir1(i+1,:),num2str(id) ];&lt;br /&gt;
      fprintf(fid,'%s %1.7e %1.7e %1.7e \n',bt_castname,bt_pts(i+1,:));&lt;br /&gt;
      if idir==2,&lt;br /&gt;
	id=id+1;&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    fclose(fid);&lt;br /&gt;
   % cd .. %-------------------------------------------------------have to change&lt;br /&gt;
   &lt;br /&gt;
    %do this by calling a script that takes care of the awk and archive&lt;br /&gt;
  %changed this &lt;br /&gt;
    eval([ '!awk &amp;lt; ' ac9_lcd ' &amp;gt; ' tmpfile...&lt;br /&gt;
	  ' ''$1==&amp;quot;&amp;lt;sampled_parameters&amp;gt;&amp;quot;{system(&amp;quot;cat bt.pts&amp;quot;)}{print $0}''']);&lt;br /&gt;
    eval([ '!mv ' tmpfile ' ' ac9_lcd ]);&lt;br /&gt;
    &lt;br /&gt;
    %archive&lt;br /&gt;
    %cruisename=eval(['echo ' ac9_lcd ' | cut -b 3-6'])&lt;br /&gt;
    cruisename=ac9_lcd(3:6);&lt;br /&gt;
   % mkdir(strcat(pwd,'/ARCHIVE/'))&lt;br /&gt;
    archive=[ pwd '/ARCHIVE/' ];&lt;br /&gt;
    %archive=[ '/home/data92/bbop/ARCHIVE/' ];&lt;br /&gt;
    %cp $lcd_file /home/data92/bbop/ARCHIVE/$cruisename/ac9&lt;br /&gt;
    %eval(['!cp ' ac9_lcd ' ' archive cruisename '/ac9']);&lt;br /&gt;
    %echo $lcd_file has been archived to /home/data92/bbop/ARCHIVE/$cruisename/ac9&lt;br /&gt;
    eval(['!echo ' ac9_lcd ' has been archived to ' archive cruisename '/ac9']);&lt;br /&gt;
&lt;br /&gt;
    ac9_files=[ac9_files; ac9_lcd];&lt;br /&gt;
  else&lt;br /&gt;
    not_ac9_files=[not_ac9_files; ac9_lcd];&lt;br /&gt;
  end&lt;br /&gt;
      &lt;br /&gt;
  %cleanup&lt;br /&gt;
  %clear ac9_lcd bt_pts fileA headA ac9_strip;&lt;br /&gt;
  %eval('!rm bt.pts');&lt;br /&gt;
end&lt;br /&gt;
%cd ..&lt;br /&gt;
ac9_files&lt;br /&gt;
not_ac9_files&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eriks</name></author>
		
	</entry>
</feed>