eogrow.tasks.testing

Tasks used to generate test data.

class eogrow.tasks.testing.UniformDistribution(min_value: 'float', max_value: 'float')[source]

Bases: object

Parameters:
  • min_value (float) –

  • max_value (float) –

min_value: float
max_value: float
class eogrow.tasks.testing.NormalDistribution(mean: 'float', std: 'float')[source]

Bases: object

Parameters:
  • mean (float) –

  • std (float) –

mean: float
std: float
class eogrow.tasks.testing.GenerateRasterFeatureTask(*args, **kwargs)[source]

Bases: EOTask

Creates a raster feature with random values

Parameters:
  • feature (Feature) – A raster feature to be created.

  • shape (tuple[int, ...]) – Shape of the created feature array.

  • dtype (np.dtype | type) – A dtype of the feature.

  • distribution (UniformDistribution | NormalDistribution) – The distribution for generating values.

execute(eopatch, seed)[source]

Generates a raster feature randomly with a given seed.

Parameters:
  • eopatch (EOPatch) –

  • seed (int) –

Return type:

EOPatch

class eogrow.tasks.testing.GenerateTimestampsTask(*args, **kwargs)[source]

Bases: EOTask

Creates a timestamp feature with random timestamps

Parameters:
  • time_interval (TimePeriod) – A time interval [start, end) from where all timestamps will be generated.

  • timestamp_num – Number of timestamp in the created timestamp feature.

  • num_timestamps (int) –

execute(eopatch, seed)[source]

Generates timestamps randomly with a given seed.

Parameters:
  • eopatch (EOPatch) –

  • seed (int) –

Return type:

EOPatch