{"id":22346,"library":"segyio","title":"segyio","description":"segyio is a library for simple and fast reading and writing of SEG-Y files, a standard format for seismic data. Version 1.9.14 requires Python >=3.10. It is widely used in geoscience for efficient seismic data I/O. Release cadence is irregular.","status":"active","version":"1.9.14","language":"python","source_language":"en","source_url":"https://github.com/equinor/segyio","tags":["SEG-Y","seismic","geophysics","data-io"],"install":[{"cmd":"pip install segyio","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"Direct import of the top-level module.","wrong":null,"symbol":"segyio","correct":"import segyio"}],"quickstart":{"code":"import segyio\nwith segyio.open('data.sgy') as segyfile:\n    print(f'Number of traces: {segyfile.tracecount}')","lang":"python","description":"Open a SEG-Y file and display the number of traces."},"warnings":[{"fix":"Always use integer trace indices or slice objects. For example: header = segyfile.header[0].","message":"Trace headers are accessed via numpy structured arrays; use segyfile.header[trace_index] and to modify use segyfile.header[trace_index] = new_values. Incorrect indexing can cause silent corruptions.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Use segyio.open('file.sgy', 'r+') for read/write on existing files or segyio.create('new.sgy') for new files.","message":"The segyio.open() mode parameter defaults to 'r'. For writing, explicitly pass segyio.open('file.sgy', 'r+') or segyio.create(). Doing the wrong mode can cause permission errors.","severity":"gotcha","affected_versions":">=1.0"},{"fix":"Use segyio.open() and segyio.create() directly instead of segyio.tools.","message":"The segyio.tools module (e.g., segyio.tools.wrap) is deprecated. Prefer using the main segyio functions.","severity":"deprecated","affected_versions":">=1.9"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Update code to use the main segyio functions: segyio.open() instead of segyio.tools.wrap().","cause":"segyio.tools module was removed in version 1.9 or later.","error":"ImportError: cannot import name 'tools' from 'segyio'"},{"fix":"Use segyfile.tracecount instead of segyfile.trace_count.","cause":"The correct attribute is 'tracecount' (no underscore).","error":"AttributeError: 'SegyFile' object has no attribute 'trace_count'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}