Created
January 5, 2022 14:22
-
-
Save jpvantassel/bebf146dadf90444ef8830063fce1985 to your computer and use it in GitHub Desktop.
Combine Three One-Component Miniseed Files to a Single Three-Component File
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import obspy | |
input_fnames = [f"AA.STN01.HN{c}.mseed" for c in list("ENZ")] | |
output_fname = "combined.mseed" | |
traces = [] | |
for file in input_fnames: | |
stream = obspy.read(file) | |
traces.append(stream[0]) | |
combined = obspy.Stream(traces) | |
combined.write(output_fname, format="MSEED") |
Hi @Adnan-Barkat,
This is gist is just to combine three, one-component miniSEED files to a single three-component miniSEED file.
All the best,
Joe
Thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How about multiple files?