Skip to content

Commit

Permalink
io.gcf: fix bitmask for getting compression code
Browse files Browse the repository at this point in the history
fixes #2290
  • Loading branch information
megies committed Feb 14, 2019
1 parent baa8ac5 commit 5ff4ed2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.txt
Expand Up @@ -44,6 +44,8 @@
object to CNV (see #2001)
- obspy.io.css:
* Fix automatic filetype detection (see #2160 and #2162)
- obspy.io.gcf:
* Fix bitmask in getting compression code (see #2290, #2310)
- obspy.io.mseed:
* Ability to read files that have embedded chunks of non SEED data.
(see #1981, #2057).
Expand Down
2 changes: 1 addition & 1 deletion obspy/io/gcf/libgcf.py
Expand Up @@ -104,7 +104,7 @@ def read_data_block(f, headonly=False, channel_prefix="HH", **kwargs):
# number of 32bit records (num_records)
reserved, sps, compress, num_records = np.frombuffer(f.read(4), count=4,
dtype='>u1')
compression = compress & 0b00001111 # get compression code
compression = compress & 0b00000111 # get compression code
t_offset = compress >> 4 # get time offset
if t_offset > 0:
starttime = starttime + t_offset / TIME_OFFSETS_D[sps]
Expand Down

0 comments on commit 5ff4ed2

Please sign in to comment.