Skip to main content

netcdf_segy

https://img.shields.io/pypi/v/netcdf_segy.svg

Convert between SEG-Y and NetCDF

This is currently only a research/demonstration tool. It is not “industrial strength”. In particular, it does not run in parallel, so will likely be slow on very large datasets (if it runs at all). Also, only the SEG-Y -> NetCDF direction is implemented.

To install: pip install netcdf_segy

SegyIO is a dependency.

To convert a SEG-Y file to NetCDF from the command line: segy2netcdf <path to input SEG-Y file> <path to output NetCDF file>. For additional options, look at the help: segy2netcdf --help.

The tool can also be called from a Python script:

from netcdf_segy.segy2netcdf import segy2netcdf

segy2netcdf(segy_path, netcdf_path)

I have created a Jupyter Notebook to discuss the advantages of NetCDF compared to SEG-Y, show an example of segy2netcdf being used, and demonstrate the attractions of loading the resulting NetCDF file with xarray: Alternatives to SEG-Y.

One of the “additional options” mentioned above is to use specified headers as dimensions. This allows you to use ‘FieldRecord’ as a dimension if your data is stored as shot gathers, for example (as in the Notebook). If you don’t do this, the NetCDF file will store the data as a 2D array with Time/Depth/SampleNumber and Traces as the dimensions. As netcdf_segy currently uses SegyIO to read the SEG-Y file, the header names are those used by that package. For your convenience, here is the list (from segyio.TraceField):

‘AliasFilterFrequency’, ‘AliasFilterSlope’, ‘CDP’, ‘CDP_TRACE’, ‘CDP_X’, ‘CDP_Y’, ‘CROSSLINE_3D’, ‘CoordinateUnits’, ‘Correlated’, ‘DataUse’, ‘DayOfYear’, ‘DelayRecordingTime’, ‘ElevationScalar’, ‘EnergySourcePoint’, ‘FieldRecord’, ‘GainType’, ‘GapSize’, ‘GeophoneGroupNumberFirstTraceOrigField’, ‘GeophoneGroupNumberLastTraceOrigField’, ‘GeophoneGroupNumberRoll1’, ‘GroupStaticCorrection’, ‘GroupUpholeTime’, ‘GroupWaterDepth’, ‘GroupX’, ‘GroupY’, ‘HighCutFrequency’, ‘HighCutSlope’, ‘HourOfDay’, ‘INLINE_3D’, ‘InstrumentGainConstant’, ‘InstrumentInitialGain’, ‘LagTimeA’, ‘LagTimeB’, ‘LowCutFrequency’, ‘LowCutSlope’, ‘MinuteOfHour’, ‘MuteTimeEND’, ‘MuteTimeStart’, ‘NStackedTraces’, ‘NSummedTraces’, ‘NotchFilterFrequency’, ‘NotchFilterSlope’, ‘OverTravel’, ‘ReceiverDatumElevation’, ‘ReceiverGroupElevation’, ‘ScalarTraceHeader’, ‘SecondOfMinute’, ‘ShotPoint’, ‘ShotPointScalar’, ‘SourceDatumElevation’, ‘SourceDepth’, ‘SourceEnergyDirectionExponent’, ‘SourceEnergyDirectionMantissa’, ‘SourceGroupScalar’, ‘SourceMeasurementExponent’, ‘SourceMeasurementMantissa’, ‘SourceMeasurementUnit’, ‘SourceStaticCorrection’, ‘SourceSurfaceElevation’, ‘SourceType’, ‘SourceUpholeTime’, ‘SourceWaterDepth’, ‘SourceX’, ‘SourceY’, ‘SubWeatheringVelocity’, ‘SweepFrequencyEnd’, ‘SweepFrequencyStart’, ‘SweepLength’, ‘SweepTraceTaperLengthEnd’, ‘SweepTraceTaperLengthStart’, ‘SweepType’, ‘TRACE_SAMPLE_COUNT’, ‘TRACE_SAMPLE_INTERVAL’, ‘TRACE_SEQUENCE_FILE’, ‘TRACE_SEQUENCE_LINE’, ‘TaperType’, ‘TimeBaseCode’, ‘TotalStaticApplied’, ‘TraceIdentificationCode’, ‘TraceIdentifier’, ‘TraceNumber’, ‘TraceValueMeasurementUnit’, ‘TraceWeightingFactor’, ‘TransductionConstantMantissa’, ‘TransductionConstantPower’, ‘TransductionUnit’, ‘UnassignedInt1’, ‘UnassignedInt2’, ‘WeatheringVelocity’, ‘YearDataRecorded’,

Metadata

Release files for netcdf-segy 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netcdf-segy 1.0.1
File Size Uploaded Provenance Actions
netcdf_segy-1.0.1.tar.gz 10.8 kB Without provenance Details for netcdf_segy-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for netcdf-segy 1.0.1
File Interpreter ABI Platform Actions
netcdf_segy-1.0.1-py3-none-any.whl Python 3 none any Details for netcdf_segy-1.0.1-py3-none-any.whl

Total release size: 18.2 kB

Release files / netcdf_segy-1.0.1.tar.gz

Download URL netcdf_segy-1.0.1.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
20b6883ba2ade54d1b5a66921ddb04abd0cd3b03dd60cebadd420a13ba6df2fa
BLAKE2b-256 checksum
How to use checksums
e8a3f0bfdf9bfc23238241f9582776c8d88ccaf1a9eb8f0a3aea809da2575045
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

Release files / netcdf_segy-1.0.1-py3-none-any.whl

Download URL netcdf_segy-1.0.1-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
872c982a530adb8cd0b2cf7fd17ba5a5e74042bed55444042ca3d2698eeb1255
BLAKE2b-256 checksum
How to use checksums
61b6d60a9b9a6aabfcb9158472b75bf129e0a99264427d807256207afebd6b6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

Security for netcdf-segy 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page