eolearn.core.eotask

This module implements the core class hierarchy for implementing EO tasks. An EO task is any class the inherits from the abstract EOTask class. Each EO task has to implement the execute method; invoking __call__ on a EO task instance invokes the execute method. EO tasks are meant primarily to operate on EO patches (i.e. instances of EOPatch).

EO task classes are generally lightweight (i.e. not too complicated), short, and do one thing well. For example, an EO task might take as input an EOPatch containing cloud mask and return as a result the cloud coverage for that mask.

class eolearn.core.eotask.EOTask[source]

Bases: abc.ABC

Base class for EOTask.

Stores initialization parameters and the order to the instance attribute init_args.

execute_and_monitor(*eopatches, **kwargs)[source]

In the current version nothing additional happens in this method

abstract execute(*eopatches, **kwargs)[source]

Implement execute function

class eolearn.core.eotask.CompositeTask(eotask1, eotask2)[source]

Bases: eolearn.core.eotask.EOTask

Creates a task that is composite of two tasks.

Note: Instead of directly using this task it might be more convenient to use ‘*’ operation between tasks. Example: composite_task = task1 * task2

Parameters
  • eotask1 (EOTask) – Task which will be executed first

  • eotask2 (EOTask) – Task which will be executed on results of first task

Stores initialization parameters and the order to the instance attribute init_args.

execute(*eopatches, **kwargs)[source]

Implement execute function