jpvantassel / hvsrweb

HVSRweb: An Open-Source, Web-Based Application for Horizontal-To-Vertical Spectral Ratio Processing
https://hvsrweb.designsafe-ci.org/
14 stars 0 forks source link

Combine Three One-Component Miniseed Files to a Single Three-Component File #3

Closed jpvantassel closed 2 years ago

jpvantassel commented 2 years ago

Problem Summary

Some seismic testing instruments save their measurements into three one-component miniseed files (one for north, east, and vertical). hvsrpy and the associated web-application hvsrweb assume a three-component miniseed file (i.e., all three traces are saved in the same miniseed file) by default. While Sensor3c's .from_mseed classmethod allows for the provision of three one-component files in lieu of a single three-component file (see docs for details), this feature has not yet been added to hsvrweb and remains a frequent point of inquiry.

Proposed Solution

Fortunately, combining three one-component miniseed files into a single three-component miniseed file is quite straightforward using obspy. I have posted code demonstrating how to do this as a gist here. I hope that if you are reading this you find it helpful.