This directory contains the matlab scripts that can
read and write data into SAC format.
Among them, fget_sac.m, sachdr.m is written by me,
sac.m is written by Dr. Xianglei Huang at umich.
I forgot where I got the rest from (maybe Jeff McGuire at WHOI?!).
Program Description
fget_sac.m main code to load sac data into matlab
sachdr.m subroutine to convert the sachdr into readble struture array
sac.m subroutine to load binary sac data
newSacHeader.m subroutine to generate a sac hdr
rdSacHead.m read header of SAC format data
rdSac.m read SAC format data
wtSac.m write SAC format data
sacfft.m a subroutine to compute FFT for SAC data
Example:
1. load SAC data N.MYJH.Z.sac using fget_sac.m
Command: [Ztime,Zdata,ZSAChdr] = fget_sac('N.MYJH.Z.sac');
Note: type ZSAChdr to take a look at the headers, to use info. p
arrival in the header, type ZSAChdr.times.a.
2. write ascii data (MYJH.dat) into SAC in matlab using wtSac.m
Command:
load MYJH.dat; % load the ascii data
N = length(MYJH); % get the total length
dt = 0.01; % sampling rate
tstart = 0; % starting time
MYJH_hd = newSacHeader(N,dt,tstart);
MYJH_sacfile = 'MYJH.sac';
wtSac(MYJH_sacfile,MYJH_hd,MYJH);
Note:
1. If you want to add info. into headers, you have to do it
by hand, check the binary header format at
http://www.iris.edu/manuals/sac/SAC_Manuals/FileFormatPt1.html
2. Other sac matlab program can be found at
http://www.aeic.alaska.edu/input/mthorne/software/index.html
Last updated by zpeng, Sun Nov 5 17:52:50 EST 2006
没有合适的资源?快使用搜索试试~ 我知道了~
MatSAC.tar.gz_matlab read sac_matlab sac_read_sac_sac_sac matl
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 3 下载量 89 浏览量
2022-07-14
07:17:27
上传
评论 1
收藏 1.1MB GZ 举报
温馨提示
共12个文件
m:8个
sac:2个
txt:1个
This directory contains the matlab scripts that can read and write data into SAC format.
资源详情
资源评论
资源推荐
收起资源包目录
MatSAC.tar.gz (12个子文件)
MatSAC
rdSacHead.m 428B
sachdr.m 5KB
MYJH.dat 2.07MB
fget_sac.m 514B
sacfft.m 2KB
MYJH.sac 704KB
rdSac.m 220B
wtSac.m 243B
newSacHeader.m 253B
sac.m 861B
N.MYJH.Z.sac 704KB
readme.txt 1KB
共 12 条
- 1
林当时
- 粉丝: 97
- 资源: 1万+
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论3