Earth2Studio is now OSS!

earth2studio.utils: Utils#

earth2studio.utils: Coordinates#

A collection of utilities to manipulate and check coordinate systems dictionaries.

utils.coords.handshake_dim(input_coords, ...)

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

utils.coords.handshake_coords(input_coords, ...)

Simple check to see if the required dimensions have the same coordinate system

utils.coords.handshake_size(input_coords, ...)

Simple check to see if a coordinate system of a given dimension is a required size

utils.coords.map_coords(x, input_coords, ...)

A basic interpolation util to map between coordinate systems with common dimensions.

utils.coords.split_coords(x, coords[, dim])

A utility function to split a dimension from a (x,coords) pair and convert it into a list of tensors, a CoordSystem, and the dimension that extract from coords.

earth2studio.utils: Time#

A collection of utilities to help interact with time coordinate arrays. Earth2Studio uses np.datetime64[ns] to represent time. The following functions can be used to convert to and from these numpy arrays.

utils.time.timearray_to_datetime(time)

Simple converter from numpy datetime64 array into a list of datetimes

utils.time.to_time_array(time)

A general converter for various time iterables into a numpy datetime64 array