scmssort

Read and manipulate miniSEED records

Description

scmssort reads unsorted (and possibly multiplexed) MiniSEED files and sorts the individual records by time. This is useful e.g. for simulating data acquisition and playbacks. Removing of duplicate data and trimming of time window is available.

scmssort reads single files and output to the command line. Cat many files to read them at the same time. In this way huge amount of data can be processed efficiently.

Applications to miniSEED records:

  • Sort by time, e.g. for playbacks

  • Remove duplicates and clean archives

  • Filter based on

    • time windows

    • stream lists

Hint

Combine with scart or msrtsimul to archive data or to make playbacks with real-time simulations.

Examples

  1. Read a single file. The records are sorted by endtime. Duplicated records are removed.

    scmssort -u -E -v unsorted.mseed > sorted.mseed
    
  2. Read all files ending with “.mseed” at the same time. The data are trimmed to a time window and duplicated data are removed

    cat *.mseed | scmssort -u -E -v -t '2020-03-28 15:48~2020-03-28 16:18' > sorted.mseed
    
  3. Extract streams by time, stream code and sort records by end time

    echo CX.PB01..BH? | scmssort -v -E -t '2007-03-28 15:48~2007-03-28 16:18' -u -l - test.mseed > sorted.mseed
    

Command-line

scmssort [options] input

Options

-h, --help

Show the command-line help and exit.

-v, --verbose

Run in verbose mode.

-l, --list

File with streams to filter the records. One stream per line. Instead of a file read the from stdin (-). Line format: NET.STA.LOC.CHA - wildcards and regular expressions are considered. Example: CX.*..BH? .

-E, --sort-by-end-time

Sort by end time.

-u, --uniqueness

Ensure uniqueness of output, i.e. skip duplicate records.

-t, --time-window

Specify time window (as one -properly quoted- string). Times are of course UTC and separated by a tilde ~

Example:

‘2020-03-28 15:48~2020-03-28 16:18’