sioseis << eof
procs diskin plot end
diskin
   fno 2135 lno 2500 allno no
   ipath l35f1-real-envel.segy   end
end
prout
   fno 0 lno 9999 ftr 0 ltr 999 end
end
plot
!   colors .001 gray0 .01 gray2 .02 gray4 .03 gray7
  colors gray
   stime 1.4 
   dptr 1 opath siofil
   ann gmtint anninc 1
   nibs 2859 trpin 300 def .01 srpath sunfil.ras
   vscale 10 nsecs .15 tlines .01 .05 .1 wiggle 0
   end
end
end
eof
sio2sun siofil sunfil.ras
#xloadimage -r 90 sunfil.ras &
open -a /Applications/GraphicConverter\ US/GraphicConverter.app sunfil.ras
sioseis << eof
procs diskin header weight t2f f2t gains diskoa plot end 
diskin
    ipath l35f1-decim2.segy end
end
header
   fno 0 lno 99999
   r59 = r51 / 32767
   r60 = r59 * 1.41E-14
   end
end
weight
   fno 0 lno 999999 hdr 60 end
end
gains
   type 7 end  ! complex modulus
end
t2f
   end
end
f2t
   type analytic
    end
end
diskoa
   opath env-decim2.segy end
end
plot
!   colors .001 gray0 .01 gray2 .02 gray4 .03 gray7
  colors gray
   stime 1.4 
   dptr 1 opath siofil
   ann gmtint anninc 1
   nibs 2859 trpin 300 def .004 srpath sunfil.ras
   vscale 10 nsecs .15 tlines .01 .05 .1 wiggle 0
   end
end
end
eof
sio2sun siofil sunfil.ras
#xloadimage -r 90 sunfil.ras &
open -a /Applications/GraphicConverter\ US/GraphicConverter.app sunfil.ras
sioseis << eof
procs diskin t2f f2t gains diskoa plot end 
diskin
    ipath l35f1-mkreal.segy end
end
gains
   type 7 end  ! complex modulus
end
t2f
   end
end
f2t
   type analytic
    end
end
diskoa
   opath envelope-mkreal.segy end
end
plot
!   colors .001 gray0 .01 gray2 .02 gray4 .03 gray7
  colors gray
   stime 1.4 
   dptr 1 opath siofil
   ann gmtint anninc 1
   nibs 2859 trpin 300 def .004 srpath sunfil.ras
   vscale 10 nsecs .15 tlines .01 .05 .1 wiggle 0
   end
end
end
eof
sio2sun siofil sunfil.ras
#xloadimage -r 90 sunfil.ras &
open -a /Applications/GraphicConverter\ US/GraphicConverter.app sunfil.ras
sioseis << eof
procs diskin xstar diskoa end
diskin
   ipath l35f1.segy
!   format edgetech end
   end
end
xstar
   type 1 mkreal yes end
end
diskoa
   opath l35f1-mkreal.segy end
end
prout
   fno 0 lno 999999 ftr 0 ltr 999 end
end
end
eof
sioseis << eof
procs diskin t2f f2t gains diskoa end 
diskin
    ipath l35f1-mkreal.segy end
end
gains
   type 7 end  ! complex modulus
end
t2f
   end
end
f2t
   type analytic
    end
end
diskoa
   opath l35f1-real-envel.segy end
end
end

matlab << eof
a = zeros(1801,2);
a(1:1801) = (0:.000100:.18);
rdsegy l35f1-decim2.segy 2135 1;
a(1:1801,2) = ans(1:1801,1);
plot(a(:,1),a(:,2));
xlabel('time');
ylabel('counts');
title('ping 2135, decimated (reals only)');

matlab << eof
a = zeros(1801,2);
a(1:1801) = (0:.000100:.18);
rdsegy l35f1-afterxstar.segy  2135 1;
a(1:1801,2) = ans(1:1801,1);
plot(a(:,1),a(:,2));
xlabel('time');
ylabel('counts');
title('ping 2135, envelope (instantaneous amplitude)');

matlab << eof
a = zeros(1801,2);
a(1:1801) = (0:.000100:.18);
rdsegy l35f1-mkreal.segy 2135 1;
a(1:1801,2) = ans(1:1801,1);
plot(a(:,1),a(:,2));
xlabel('time');
ylabel('counts');
title('ping 2135, mkreal yes');

rdsegy env-decim2.segy 2135 1;
Y=fft(ans(:,1),2048);
f=10000*(0:1023)/2048;
Pyy=Y.*conj(Y)/2048;
plot(f,Pyy(1:1024));
title('ping 2135, decimated, envelope')
xlabel('Hz.')
ylabel('power')

rdsegy l35f1-afterxstar.segy 2135 1;
Y=fft(ans(:,1),2048);
f=10000*(0:1023)/2048;
Pyy=Y.*conj(Y)/2048;
plot(f,Pyy(1:1024));
title('ping 2135, envelope (instantaneous amplitude)')
xlabel('Hz.')
ylabel('power')

rdsegy l35f1-mkreal.segy 2135 1;
Y=fft(ans(:,1),2048);
f=10000*(0:1023)/2048;
Pyy=Y.*conj(Y)/2048;
plot(f,Pyy(1:1024));
title('ping 2135, mkreal')
xlabel('Hz.')
ylabel('power')