<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki-pnb.eri.ucsb.edu/index.php?action=history&amp;feed=atom&amp;title=Lisstcheck</id>
	<title>Lisstcheck - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki-pnb.eri.ucsb.edu/index.php?action=history&amp;feed=atom&amp;title=Lisstcheck"/>
	<link rel="alternate" type="text/html" href="http://wiki-pnb.eri.ucsb.edu/index.php?title=Lisstcheck&amp;action=history"/>
	<updated>2026-06-01T22:28:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>http://wiki-pnb.eri.ucsb.edu/index.php?title=Lisstcheck&amp;diff=854&amp;oldid=prev</id>
		<title>Eriks: Created page with &quot;&lt;pre&gt; function lisstcheck(filename) %Written by Erik Stassinos 10/08/2011 %This function is designed to look at IOP fram lisst data. %file names are DH4 waped LISST names fp =...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki-pnb.eri.ucsb.edu/index.php?title=Lisstcheck&amp;diff=854&amp;oldid=prev"/>
		<updated>2015-10-27T21:34:58Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;pre&amp;gt; function lisstcheck(filename) %Written by Erik Stassinos 10/08/2011 %This function is designed to look at IOP fram lisst data. %file names are DH4 waped LISST names fp =...&amp;quot;&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;
function lisstcheck(filename)&lt;br /&gt;
%Written by Erik Stassinos 10/08/2011&lt;br /&gt;
%This function is designed to look at IOP fram lisst data.&lt;br /&gt;
%file names are DH4 waped LISST names&lt;br /&gt;
fp = fopen(filename)&lt;br /&gt;
i=1;&lt;br /&gt;
startbrak(i)  = 1;&lt;br /&gt;
count =1;&lt;br /&gt;
deptharray =0;&lt;br /&gt;
while ~feof(fp) %to get size of file&lt;br /&gt;
    databuff = fgets(fp);&lt;br /&gt;
    count = count +1;&lt;br /&gt;
end&lt;br /&gt;
frewind(fp)&lt;br /&gt;
ind =1;&lt;br /&gt;
clsind =1;&lt;br /&gt;
for i = 1:count&lt;br /&gt;
    databuff = fgets(fp);&lt;br /&gt;
    %size(databuff)&lt;br /&gt;
    &lt;br /&gt;
    if strncmp(databuff,'{',1) % == 1 %index to find open bracket&lt;br /&gt;
        disp('found it first');&lt;br /&gt;
        startbrack(ind) =i;&lt;br /&gt;
        ind = ind +1;&lt;br /&gt;
&lt;br /&gt;
    end&lt;br /&gt;
%     if ind &amp;lt; 3&lt;br /&gt;
&lt;br /&gt;
        if i == (startbrack(ind-1)) + 37 %finding the depth&lt;br /&gt;
            disp('found depth')&lt;br /&gt;
            depth = databuff;&lt;br /&gt;
            depth  = str2num(depth)*.01;&lt;br /&gt;
            deparr(ind)  = depth;&lt;br /&gt;
        end&lt;br /&gt;
%    end&lt;br /&gt;
    &lt;br /&gt;
    if strncmp(databuff,'}',1) %== 1 %index to find close bracket&lt;br /&gt;
        endbrack(clsind) = i;&lt;br /&gt;
        disp('found close bracket')&lt;br /&gt;
        clsind = clsind +1;&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
deparr;&lt;br /&gt;
dlmwrite(strcat('lisstdepth',filename),deparr',''); %write the depth array&lt;br /&gt;
&lt;br /&gt;
%read just data loop&lt;br /&gt;
%checking for indexes&lt;br /&gt;
%endbrack&lt;br /&gt;
%startbrack&lt;br /&gt;
&lt;br /&gt;
rp = fopen(filename);&lt;br /&gt;
goodindex =1;&lt;br /&gt;
np = fopen('lisstnobrack','w+')&lt;br /&gt;
&lt;br /&gt;
for rpi =1:count % loop to print without brackets&lt;br /&gt;
    num = fgets(rp)&lt;br /&gt;
&lt;br /&gt;
              if strncmp(num,'{',1) == 1&lt;br /&gt;
                  disp('passing')&lt;br /&gt;
                  continue&lt;br /&gt;
              end&lt;br /&gt;
              if strncmp(num,'}',1) == 1&lt;br /&gt;
                  continue&lt;br /&gt;
              end&lt;br /&gt;
              fprintf(np,'%s',num)&lt;br /&gt;
              lisstnumbers(rpi) = {num};&lt;br /&gt;
              count&lt;br /&gt;
              rpi&lt;br /&gt;
              &lt;br /&gt;
 end&lt;br /&gt;
 fclose all&lt;br /&gt;
 ct =1;&lt;br /&gt;
 r=1;&lt;br /&gt;
 t=1;&lt;br /&gt;
lisstdat = load('lisstnobrack'); %put data into parallel columns&lt;br /&gt;
%40 columns in all&lt;br /&gt;
while t &amp;lt;= length(lisstdat)&lt;br /&gt;
       &lt;br /&gt;
       holder(r,:) = lisstdat(t,:);&lt;br /&gt;
       r=r+1;&lt;br /&gt;
       if t == 40*ct %|| t ==1 cycle through 40 columns then restart to get data&lt;br /&gt;
           indexarr(ct,:) = holder';&lt;br /&gt;
           ct = ct +1;&lt;br /&gt;
           clear holder&lt;br /&gt;
           r=1;&lt;br /&gt;
       end&lt;br /&gt;
       t = t +1;&lt;br /&gt;
       if t == length(lisstdat)&lt;br /&gt;
           dlmwrite('LISST_indexarr',indexarr,' ')&lt;br /&gt;
          return&lt;br /&gt;
       end&lt;br /&gt;
       &lt;br /&gt;
end&lt;br /&gt;
%save('indexarr', indexarr)&lt;br /&gt;
return&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Eriks</name></author>
		
	</entry>
</feed>