Skip to content

Conversation

@d-v-b
Copy link
Contributor

@d-v-b d-v-b commented Nov 6, 2025

this PR adds pydantic models for the sentinel1 and sentinel2 zarr hierarchies. These models can be used as the basis for an API against these data products.

@d-v-b d-v-b marked this pull request as ready for review November 7, 2025 16:55
@d-v-b
Copy link
Contributor Author

d-v-b commented Nov 7, 2025

@emmanuelmathot have a look. this adds pydantic models for the structure of the sentinel1 and sentinel2 zarr hierarchies. These models also have reprs for jupyter notebooks that make browsing the structure of the hierarchy intuitive:

image

@d-v-b
Copy link
Contributor Author

d-v-b commented Nov 7, 2025

these models are not refined because I have not started using them yet in the other parts of the codebase, and also I am not yet sure which aspects of sentinel1 and sentinel2 data are invariant. but they will be a solid declarative foundation for a conversion API.

@emmanuelmathot emmanuelmathot self-requested a review November 12, 2025 13:41
Copy link
Contributor

@emmanuelmathot emmanuelmathot left a comment

Choose a reason for hiding this comment

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

I actually would love to have some examples to test as linked in the readme

@d-v-b
Copy link
Contributor Author

d-v-b commented Nov 13, 2025

I added separate models for the different sentinel1 / 2 platforms, added tests for our python examples in the docs, and added some simple demos of the models for the docs

@d-v-b
Copy link
Contributor Author

d-v-b commented Nov 13, 2025

I actually would love to have some examples to test as linked in the readme

I think I will need another PR before i have good examples -- right now these models are pretty low-level; once they are integrated into the higher-level API, then this process will inform the shape of useful examples

Copy link
Contributor

@emmanuelmathot emmanuelmathot left a comment

Choose a reason for hiding this comment

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

LGTM. Just have Sentinel1 and 2 without platform distinctions

"Sentinel2ReflectanceGroup",
"Sentinel2ResolutionDataset",
"Sentinel2Root",
"Sentinel2ARoot",
Copy link
Contributor

Choose a reason for hiding this comment

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

We should not make any distinction in the Sentinel A, B or C platform. There is no difference, they are just twins.


This document demonstrates the basic usage of models for Sentinel-1 L2 data products. These models only describe the Zarr hierarchy; they do not support reading and writing array values.

## Sentinel-1A
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to distinguish the platforms.

Copy link
Contributor Author

@d-v-b d-v-b Nov 13, 2025

Choose a reason for hiding this comment

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

there are some s1a exclusive fields:

Quality Group

  • noise_azimuth - Noise characteristics in azimuth direction
  • noise_range - Noise characteristics in range direction

Antenna Pattern Group

  • count - Count of antenna pattern elements
  • slant_range_time_ap - Slant range time specifically for antenna pattern
  • swath - Swath designation

GCP (Ground Control Points) Group

  • azimuth_time_gcp - GCP-specific azimuth time array
  • ground_range - Ground range values
  • slant_range_time_gcp - Slant range time specific to GCP

S1C replaces some of these S1A-specific fields with simpler alternatives:

  • Uses slant_range_time instead of slant_range_time_ap and slant_range_time_gcp
  • Removes GCP-specific metadata (azimuth_time_gcp, ground_range)
  • Removes antenna pattern metadata (count, swath)
  • Removes noise azimuth/range subgroups entirely

Copy link
Contributor Author

Choose a reason for hiding this comment

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

are these consistent differences or is this just drift in the zarr structure?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants