finam.data#

Specialized data types for exchanges between models/modules.

Grids#

Grid tools#

check_axes_monotonicity(axes)

Check axes to be strictly monotonic, and makes them strictly monotonic increasing.

check_axes_uniformity(axes)

Check axes to be uniform.

check_uniformity(values)

Checks for uniform spacing of values

Grid abstract base classes#

GridBase()

Abstract grid base.

Grid()

Abstract grid specification.

StructuredGrid()

Abstract structured grid specification.

Data tools#

assert_type(cls, slot, obj, types)

Type assertion.

check(xdata, info)

Check if data matches given info.

check_quantified(xdata[, routine])

Check if data is a quantified DataArray.

full(value, info)

Return a new data array with units according to the given info, filled with given value.

full_like(xdata, value)

Return a new data array with the same shape, type and units as a given object.

get_dimensionality(xdata)

Get dimensionality of the data.

get_magnitude(xdata)

Get magnitude of given data.

get_units(xdata)

Get units of the data.

has_time_axis(xdata, grid)

Check if the data array has a time axis.

is_quantified(xdata)

Check if data is a quantified DataArray.

prepare(data, info[, time_entries, ...])

Prepares data in FINAM's internal transmission format.

quantify(xdata[, units])

Quantifies data.

strip_time(xdata, grid)

Returns a view of the data with the time dimension squeezed if there is only a single entry

to_datetime(date)

Converts a numpy datetime64 object to a python datetime object

to_units(xdata, units[, check_equivalent, ...])

Convert data to given units.

is_masked_array(data)

Check if data is a masked array.

has_masked_values(data)

Determine whether the data has masked values.

filled(data[, fill_value])

Return input as an array with masked data replaced by a fill value.

to_masked(data, **kwargs)

Return a masked version of the data.

to_compressed(xdata[, order])

Return all the non-masked data as a 1-D array respecting the given array order.

from_compressed(xdata, shape[, order])

Fill a (masked) array following a given mask or shape with the provided data.

check_data_covers_domain(data[, mask])

Check if the given data covers a domain defined by a mask on the same grid.