Steim codecs, numeric miniSEED waveform I/O and archive queries
moon add kent131452777/steimpackimport {
"kent131452777/steimpack" @wave,
"kent131452777/steimpack/codec",
"kent131452777/steimpack/mseed",
"kent131452777/steimpack/timeline",
}moon run examples/records --target jsnode steimpack.cjs inspect tests/data/station.mseed -o records.jsonlcat tests/data/station.mseed tests/data/cola.mseed > stations.mseed
node steimpack.cjs timeline stations.mseed
node steimpack.cjs decode stations.mseed --sid FDSN:IU_COLA_00_B_H_Z -o cola.i32copy /b tests\data\station.mseed+tests\data\cola.mseed stations.mseednode steimpack.cjs decode tests/data/station.mseed --from 2010-02-27T06:32:00Z --until 2010-02-27T06:32:10Z -o event.i32
node steimpack.cjs select tests/data/station.mseed --from 2010-02-27T06:32:00Z --until 2010-02-27T06:32:10Z -o original-records.mseednode steimpack.cjs availability tests/data/cola.mseed --tolerance-ns 1000node steimpack.cjs decode tests/data/station.mseed --from 2010-02-27T06:32:00Z --until 2010-02-27T06:32:10Z --format csv -o event.csv
node steimpack.cjs decode tests/data/station.mseed --format f64le -o station.f64
python -c "import numpy as np; print(np.fromfile('station.f64', dtype='<f8').shape)"node steimpack.cjs repack tests/data/station.mseed --encoding preserve -o station-v3.mseed
node steimpack.cjs decode tests/data/station.mseed -o station.i32
node steimpack.cjs encode station.i32 -o continuous.mseed --sid FDSN:IU_ANMO_00_B_H_Z --start 2010-02-27T06:30:00.019538Z --rate 20 --encoding steim1base=https://github.com/kent131452777/steimpack/releases/download/v0.4.0
archive="steimcheck-linux-$(uname -m).tar.gz"
curl -fsSLO "$base/$archive"
curl -fsSLO "$base/SHA256SUMS"
sha256sum --check --ignore-missing SHA256SUMS && tar -xzf "$archive"
./steimcheck tests/data/station.mseed$base = 'https://github.com/kent131452777/steimpack/releases/download/v0.4.0'
$name = 'steimcheck-windows-x86_64.zip'
Invoke-WebRequest "$base/$name" -OutFile $name
Invoke-WebRequest "$base/SHA256SUMS" -OutFile SHA256SUMS
$hex = (Get-FileHash $name -Algorithm SHA256).Hash.ToLowerInvariant()
if ((Get-Content SHA256SUMS) -cnotcontains "$hex $name") { throw 'SHA-256 mismatch' }
Expand-Archive $name -DestinationPath steimcheck-win
.\steimcheck-win\steimcheck.exe tests\data\station.mseed| 能力 | 范围 |
|---|---|
| miniSEED 2 输入 | 128 字节至 16 MiB 的记录,独立识别头部和数据字节序,应用时间修正。迁移 200/201 事件检测、300/310/320/390/395 校准和 500 时钟异常信息 |
| miniSEED 3 输入、输出 | CRC-32C、UTC 纳秒、采样率或周期、标志、发布版本、JSON 扩展头 |
| 波形读取 | Steim-1、Steim-2、16/32 位有符号 PCM、IEEE binary32 和 binary64 |
| 波形写入 | 保留六种数值编码迁移到 miniSEED 3,或将整数采样压缩为 Steim-1、Steim-2 |
| 连续性检查 | 不同来源分别跟踪,支持重复与乱序记录、采样率或周期变化、纳秒容差 |
| 兼容性验证 | FDSN 官方样本、传统字节序组合、三个台站的波形或校准记录,以及 Steim-1、Steim-2 各一百万点的独立解码 |
type TimeWindowfn pack_record(header : Header, encoding : Encoding, input : ArrayView[Int], max_frames~ : Int) -> (Bytes, Int) raise WaveformError