File: sac2mseed.1

package info (click to toggle)
sac2mseed 1.12%2Bds1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 280 kB
  • sloc: ansic: 1,285; makefile: 53
file content (156 lines) | stat: -rw-r--r-- 5,977 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
.TH SAC2MSEED 1 2017/04/03
.SH NAME
sac2mseed \- SAC to miniSEED converter

.SH SYNOPSIS
.nf
sac2mseed [options] file1 [file2 file3 ...]

.fi
.SH DESCRIPTION
\fBsac2mseed\fP converts SAC waveform data to miniSEED format.  By
default the format of the input files is automatically detected: alpha
or binary (byte order autodetected).  The format can also be forced
with the \fI-f\fP option.  If an input file name is prefixed with an '@'
character the file is assumed to contain a list of input data files,
see \fILIST FILES\fP below.

If the input file name ends in ".sac" (not case sensitive) the default
output file name will be the same with the extension replace with
".mseed".  The output data may be re-directed to a single file or
stdout using the -o option.

.SH OPTIONS

.IP "-V         "
Print program version and exit.

.IP "-h         "
Print program usage and exit.

.IP "-v         "
Be more verbose.  This flag can be used multiple times ("-v -v" or
"-vv") for more verbosity.

.IP "-S         "
Include SEED blockette 100 in each output record with the sample rate
in floating point format.  The basic format for storing sample rates
in SEED data records is a rational approximation
(numerator/denominator).  Precision will be lost if a given sample
rate cannot be well approximated.  This option should be used in those
cases.

.IP "-n \fInetcode\fP"
Specify the SEED network code to use, if not specified the network
code will be the value of the KNETWK variable in the SAC header, if
KNETWK is not specified the network code will be blank.  It is highly
recommended to specify a network code if no network is defined in the
SAC file.

.IP "-s \fIstacode\fP"
Specify the SEED station code to use, if not specified the station
code will be the value of the KSTNM variable in the SAC header, if
KSTNM is not specified the location ID will be blank.

.IP "-l \fIlocid\fP"
Specify the SEED location ID to use, if not specified the location
ID will be the value of the KHOLE variable in the SAC header, if KHOLE
is not specified the location ID will be blank.

.IP "-c \fIchancodes\fP"
Specify the SEED channel codes to use, if not specified the channel
code will be the value of the KCMPNM variable in the SAC header, if
KCMPNM is not specified the location ID will be blank.  As a special
case a dot (.) will be interpreted as the same character as the input
channel name, for example, "L.." can be specified to only replace the
first code with 'L' and leave the other two codes as they are.

.IP "-r \fIbytes\fP"
Specify the miniSEED record length in \fIbytes\fP, default is 4096.

.IP "-e \fIencoding\fP"
Specify the miniSEED data encoding format, default is 11 (Steim-2
compression).  Other supported encoding formats include 10 (Steim-1
compression), 1 (16-bit integers) and 3 (32-bit integers).  The 16-bit
integers encoding should only be used if all data samples can be
represented in 16 bits.

.IP "-b \fIbyteorder\fP"
Specify the miniSEED byte order, default is 1 (big-endian or most
significant byte first).  The other option is 0 (little-endian or
least significant byte first).  It is highly recommended to always
create big-endian SEED.

.IP "-o \fIoutfile\fP"
Write all miniSEED records to \fIoutfile\fP, if \fIoutfile\fP is a
single dash (-) then all miniSEED output will go to stdout.  All
diagnostic output from the program is written to stderr and should
never get mixed with data going to stdout.

.IP "-m \fImetafile\fP"
For each input SAC file write a one-line summary of channel metadata
\fImetafile\fP.  The one-line summary is a comma-separated list
containing: network, station, location, channel, latitude, longitude,
elevation, depth, azimuth, incidence, instrument name, scale factor,
sampling rate and start and end times.  In SAC the component azimuth
is in degrees clockwise from north, the component incident angle is in
degrees from vertical and the elevation and depth are both in meters.

.IP "-me        "
When writing out a metadata file include the event name (kevnm) and
user strings 0, 1 and 2 (kuser0, kuser1 and kuser2).

.IP "-s \fIfactor\fP"
When writing data to an integer (miniSEED) encoding format apply this
scaling \fIfactor\fP to each input floating point data sample before
truncating to an integer.  By default autoscaling is used and a
scaling factor is determined that will scale the maximum sample value
to a minimum of 6 digits.  If none of the input sample values include
fractional components the scaling factor will be 1 and the floating
point data will simply be truncated to their integer components.

.IP "-f \fIformat\fP"
By default the format of each input file is autodetected, either alpha
or binary (little or big endian byte order autodetected as well).
This option forces the format for every input file:

.nf
0 : Autodetect SAC format (default)
1 : Alphanumeric SAC format
2 : Binary SAC format, autodetect byte order
3 : Binary SAC format, little-endian
4 : Binary SAC format, big-endian
.fi

.SH SEED LOCATION IDS
The contents of the SAC header variable KHOLE is used as the SEED
location ID if it is set.  While the definition of KHOLE and SEED
location ID are not officially the same, this is a known convention
when converting between these two formats.

.SH LIST FILES
If an input file is prefixed with an '@' character the file is assumed
to contain a list of file for input.  Multiple list files can be
combined with multiple input files on the command line.  The last,
space separated field on each line is assumed to be the file name to
be read.

An example of a simple text list:

.nf
TA.ELFS..LHE.SAC
TA.ELFS..LHN.SAC
TA.ELFS..LHZ.SAC
.fi

.SH ABOUT SAC
Seismic Analysis Code (SAC) is a general purpose interactive program
designed for the study of sequential signals, especially timeseries
data.  Originally developed at the Lawrence Livermore National
Laboratory the SAC software package is also available from IRIS.

.SH AUTHOR
.nf
Chad Trabant
IRIS Data Management Center
.fi