sup3r.preprocessing

sup3r.preprocessing#

Sup3r preprocessing module. Here you will find things that have access to data, which we call Containers. Loaders, Rasterizers, Samplers, Derivers, Handlers, Batchers, etc, are all subclasses of Containers. Rather than having a single object that does everything - extract data, compute features, sample the data for batching, split into train and val, etc, we have fundamental objects that do one of these things and we build multi-purpose objects with class factories. These factory generated objects are DataHandlers and BatchHandlers.

If you want to extract a specific spatiotemporal extent from a data file then use Rasterizer. If you want to split into a test and validation set then use Rasterizer to extract different temporal extents separately. If you’ve already rasterized data and written that to a file and then want to sample that data for batches, then use a Loader (or a DataHandler), and give that object to a BatchHandler. If you want to have training and validation batches then load those separate data sets, and provide these to BatchHandler. If you want to have a BatchQueue containing pairs of low / high res data, rather than coarsening high-res to get low res, then load lr and hr data with separate Loaders or DataHandlers, use DualRasterizer to match the lr and hr grids, and provide this to DualBatchHandler.

accessor

Accessor for xarray.

base

Base classes - fundamental dataset objects and the base Container object, which just contains dataset objects.

batch_handlers

Composite objects built from batch queues and samplers.

batch_queues

Container collection objects used to build batches for training.

cachers

Basic Cacher container.

collections

Classes consisting of collections of containers.

data_handlers

Composite objects built from loaders, rasterizers, and derivers.

derivers

Loader subclass with methods for extracting and processing the contained data.

loaders

Container subclass with additional methods for loading the contained data.

names

Mappings from coord / dim / feature names to standard names and Dimension class for standardizing dimension orders and names.

rasterizers

Container subclass with methods for extracting a specific spatiotemporal extents from data.

samplers

Container subclass with methods for sampling contained data.

utilities

Methods used across container objects.