Skip to content

Add crs and bin size metadata fields to VariableMetadata#794

Open
keylgonz wants to merge 2 commits into
TGSAI:mainfrom
keylgonz:feature/add-crs-and-bin-size-metadata
Open

Add crs and bin size metadata fields to VariableMetadata#794
keylgonz wants to merge 2 commits into
TGSAI:mainfrom
keylgonz:feature/add-crs-and-bin-size-metadata

Conversation

@keylgonz

Copy link
Copy Markdown

Adds three optional fields to VariableMetadata for seismic survey geometry:

  • crs: Coordinate Reference System (e.g., "EPSG:32610")
  • bin_inl: Inline bin size
  • bin_xl: Crossline bin size

Includes test coverage.

Add crs, bin_inl, and bin_xl optional fields to support coordinate
reference system and bin size metadata for seismic data variables.

Made-with: Cursor
@codecov

codecov Bot commented Mar 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.99%. Comparing base (c3ba558) to head (1b9ffb4).
⚠️ Report is 243 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #794      +/-   ##
==========================================
+ Coverage   85.30%   92.99%   +7.68%     
==========================================
  Files          46      143      +97     
  Lines        2219     8162    +5943     
  Branches      306      462     +156     
==========================================
+ Hits         1893     7590    +5697     
- Misses        281      498     +217     
- Partials       45       74      +29     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

description="Minimal summary statistics.",
)

crs: str | None = Field(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think a string CRS will be sufficient here. We should have support for the most common expected systems. An example of making it more usable might be:

{
  "CRS": {
    "type": "EPSG",
    "code": 1234
  }
}

There are probably several projection systems that we should support, if you could please take a look.

You can see how we might want to structure this as a set of enums similar to unitsV1. We will want to leave an escape hatch for custom free-form CRS data as well.

description="Coordinate Reference System as an EPSG code (e.g., 'EPSG:4326').",
)

bin_inl: float | None = Field(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bin_inl and bin_xl are too specific to a use-cases with 3D poststack data. I would recommend looking into adding it in dimensions.py and updating its key to be nominal_bin to support non-binned data as well.

@BrianMichell BrianMichell added the enhancement New feature or request label Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants