Get SNR of SAC files in a specified time window.
Calculation of SNR of radial and tangential seismic records before estimating Receiver Functions(RFs)
sacio.h
: Head file for SAC file format, and prototype for SAC IO functions.sacio.c
: Definitions of several SAC IO functions.read_sac_head
: read SAC headerread_sac
: read SAC binary dataread_sac_xy
: read SAC binary XY dataread_sac_pdw
: read SAC data in a partial data window (cut option)write_sac
: write SAC binary datawrite_sac_xy
: write SAC binary XY datanew_sac_head
: create a minimal SAC headersac_head_index
: return the index of a SAC head fieldissac
: Check if a file in in SAC format
- sacsnr: Get SNR of SAC files in a specified time window.
Usage:
sacsnr [-Ttmark/s0/s1/n0/n1] sacfiles
tmark sac hearder t0~9
s0-s1 signal time window
n0-n1 noise time window
eg: sacsnr -T7/0/50/-50/0 CD2.BHN.2007.294.210257.SAC
Options:
-h show usage.
Use the command in this folder:
gcc -o sacsnr sacsnr.c sacio.c sacio.h -lm
Place the tool directly into the $SACHOME/bin.
SACHOME refers to the folder where the SAC is installed