mseed trace and sort

Dear community,

Assume that we have an obspy stream object, where the print statement shows the bellow output:

3 Trace(s) in Stream:
NT.STA..HHE | 2018-09-11T00:00:00.820000Z - 2018-09-11T15:42:59.990000Z

100.0 Hz, 5657918 samples

NT.STA..HHE | 2018-09-11T16:20:10.483647Z - 2018-09-11T16:23:52.473647Z

100.0 Hz, 22200 samples

NT.STA..HHE | 2018-09-11T16:24:20.483647Z - 2018-09-11T16:29:16.473647Z

100.0 Hz, 29600 samples

If the order is changed (let's say by merging), for instance like this:

3 Trace(s) in Stream:
NT.STA..HHE | 2018-09-11T16:20:10.483647Z - 2018-09-11T16:23:52.473647Z

100.0 Hz, 22200 samples

NT.STA..HHE | 2018-09-11T16:24:20.483647Z - 2018-09-11T16:29:16.473647Z

100.0 Hz, 29600 samples

NT.STA..HHE | 2018-09-11T00:00:00.820000Z - 2018-09-11T15:42:59.990000Z

100.0 Hz, 5657918 samples

and we save the mseed file.

Would that effect the sorting of the mseed file, by meaning the sequence of the fixed-size (typically 512 bytes) records. Is it assumed that the start time of each record is later than the start time of previous records, when it's getting saved?

Thanks,
Nikos

Hi Nikos,

I'm not 100% sure, but I believe that indeed the order of data in the
output mseed file would be different. Please be aware that many
low-level mseed aspects on record level will not be preserved when
reading and subsequently writing mseed files (e.g. all quality related
record level attributes or packet sequence numbers).

For most high level use cases the order of data in the mseed file should
not matter, though. If this is about archiving original raw data in a
data center though, you might want to avoid read/writing with obspy if
you intend to preserve record-level information details.

best,
T

P.S.: Lion can correct me if anything is not accurate above.. :wink: