Miniseed Blockette 201

Hi all,

I have a problem related to a Q330HR. Obspy will not accept the attached miniseed file. The error message is:
obspy.io.mseed.core.InternalMSEEDReadingError: msr_unpack_data((null)): data offset value is not valid: 0

Some examination of the file has shown, that the problem are the interspersed 201 blockettes ("Murdock event detection blockette"). You will find them easily by searching for "SEIS_L_RATE".

Opening it in a hex editor shows this:

ch.panix…lhz.mseed (163 KB)

Sorry, I accidentally pushed the send button before completing the mail:

Opening it in a hex editor shows this:

/* Data only seed header */
00003200 30 30 30 30 30 31 44 20 50 41 4e 49 58 20 20 4c |000001D PANIX L|
00003210 48 5a 43 48 07 e0 00 ea 01 2b 25 00 00 00 00 00

HZCH.....+%.....|

00003220 00 01 00 01 04 00 00 02 00 00 00 00 00 00 00 30

...............0|

00003230 03 e8 00 40 0b 01 09 00 00 00 00 00 00 00 00 00

...@............|

/* Blockette 201 starts here */
00003240 00 c9 00 00 42 fe 00 00 42 0c 00 00 42 10 00 00

....B...B...B...|

00003250 01 00 07 e0 00 ea 01 2b 25 00 00 00 01 02 03 04

.......+%.......|

00003260 03 00 00 00 53 45 49 53 5f 4c 5f 52 41 54 45 20

....SEIS_L_RATE |

00003270 20 20 20 20 20 20 20 20 20 20 20 20 83 7f 00 00 | ....|
00003280 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

................|

So in essence, this is technically a valid blockette, but it is not accepted by obspy. I would suggest to ignore blockettes which are not known to obspy or at least give the user the option to do so.

Regards

Roman

You can easily see the records with ‘msi’ or similar tool (no hex needed). As Roman says they are valid, they just do not contain any time series data:

CH_PANIX__LHZ, 000001, D
start time: 2016,234,01:43:37.000000
number of samples: 0
sample rate factor: 1 (1 samples per second)
sample rate multiplier: 1
activity flags: [00100000] 8 bits
[Bit 2] Beginning of an event, station trigger
I/O and clock flags: [00000000] 8 bits
data quality flags: [00000000] 8 bits
number of blockettes: 2
time correction: 0
data offset: 0
first blockette offset: 48
BLOCKETTE 1000: (Data Only SEED)
next blockette: 64
encoding: STEIM 2 Compression (val:11)
byte order: Big endian (val:1)
record length: 512 (val:9)
reserved byte: 0
BLOCKETTE 201: (Murdock Event Detection)
next blockette: 0
signal amplitude: 127
signal period: 35
background estimate: 36
event detection flags: [10000000] 8 bits
[Bit 0] 1: Dilation wave
reserved byte: 0
signal onset time: 2016,234,01:43:37.0000
SNR values: 1 2 3 4 3 0
loopback value: 0
pick algorithm: 0
detector name: SEIS_L_RATE
CH_PANIX__LHZ, 000189, D
start time: 2016,234,01:45:31.000000
number of samples: 262
sample rate factor: 1 (1 samples per second)
sample rate multiplier: 1
activity flags: [00100010] 8 bits
[Bit 2] Beginning of an event, station trigger
[Bit 6] Event in progress
I/O and clock flags: [00000100] 8 bits
[Bit 5] Clock locked
data quality flags: [00000000] 8 bits
number of blockettes: 2
time correction: 0
data offset: 64
first blockette offset: 48
BLOCKETTE 1000: (Data Only SEED)

next blockette: 56
encoding: STEIM 2 Compression (val:11)
byte order: Big endian (val:1)
record length: 512 (val:9)
reserved byte: 0
BLOCKETTE 1001: (Data Extension)
next blockette: 0
timing quality: 100%
micro second: 0
reserved byte: 70
frame count: 7

Hi all,

the issue here is not the Blockette 201 - ObsPy does mostly ignore most
blockettes by default. The problem here is that field 17 in the fixed
header (17 Beginning of data) is set to zero as the whole record has no
data.

I guess this is somehow valid MiniSEED? At least the spec does not
explicitly forbid it.

In any case: It is fixed in ObsPy with this PR:

https://github.com/obspy/obspy/pull/1509

Please see its description for details how ObsPy will handle empty
records in the future.

Cheers!

Lion