Earth2Studio is now OSS!

earth2studio.utils.coords.handshake_dim#

earth2studio.utils.coords.handshake_dim(input_coords, required_dim, required_index=None)[source]#

Simple check to see if coordinate system has a dimension in a particular index

Parameters:
  • input_coords (CoordSystem) – Input coordinate system to validate

  • required_dim (str) – Required dimension (name of coordinate)

  • required_index (int, optional) – Required index of dimension if needed, by default None

Raises:
  • KeyError – If required dimension is not found in the input coordinate system

  • ValueError – If the required index is outside the dimensionality of the input coordinate system

  • ValueError – If dimension is not in the required index

Return type:

None