obspy-scan

Hi All,

I am using obspy-scan to look at the data availability and gaps for an experiment we have carried out. I am getting an error I don't fully understand, as it doesn't seem to be related to a particular trace.

In the first case, all data for one station during 2011 (365 traces) is scanned. It gets to the last one, IA.IA002..HHN.D.2011.365, and the error below occurs:
[aschaeff@triton IE_Array_MSEED]$ obspy-scan -f MSEED 2011/IA/IA002/HHN.D/IA.IA002..HHN.D.2011.*
365 2011/IA/IA002/HHN.D/IA.IA002..HHN.D.2011.365Traceback (most recent call last):
   File "/usr/bin/obspy-scan", line 9, in <module>
     load_entry_point('obspy==0.8.3-dirty', 'console_scripts', 'obspy-scan')()
   File "/usr/lib/pymodules/python2.6/obspy/imaging/scripts/scan.py", line 270, in main
     startend_compressed = compressStartend(startend, 1000)
   File "/usr/lib/pymodules/python2.6/obspy/imaging/scripts/scan.py", line 67, in compressStartend
     x = np.delete(x, inds_del, 0)
   File "/usr/lib/python2.6/dist-packages/numpy/lib/function_base.py", line 3055, in delete
     obj = setdiff1d(all, obj)
   File "/usr/lib/python2.6/dist-packages/numpy/lib/arraysetops.py", line 380, in setdiff1d
     aux = setmember1d(ar1,ar2)
   File "/usr/lib/python2.6/dist-packages/numpy/lib/arraysetops.py", line 306, in setmember1d
     ar = np.concatenate( (ar1, ar2 ) )
ValueError: arrays must have same number of dimensions
[aschaeff@triton IE_Array_MSEED]$

However, if the same command is run, but only for days 300-365, then the command completes and the plot window opens:
[aschaeff@triton IE_Array_MSEED]$ obspy-scan -f MSEED 2011/IA/IA002/HHN.D/IA.IA002..HHN.D.2011.3*
66 2011/IA/IA002/HHN.D/IA.IA002..HHN.D.2011.365
[aschaeff@triton IE_Array_MSEED]$

It would seem that the error isn't related to the trace for day 365, as the second command completes without error. Has anyone else come across this, and if so, what did you do to fix it?

Thanks,
Andrew

Hi Andrew,

this looks like a bug (probably some edge case) in obspy-scan. Can you
please open an issue at github to track this?

To me it looks like it is caused by a file in between 001 and 300 (and
probably the problem only occurs in combination with a "normal" file).
The routine that pops the error runs after reading all single files. It
would be good if you could isolate which file causes this (e.g. $ for I
in `seq 1 300`; do obspy-scan `printf "*.%03d *.%03d" $I $((I+1))`;
done) and make them available for download somehow.

best,
Tobias