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".
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.
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
…
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:
Please see its description for details how ObsPy will handle empty
records in the future.