geowatch.tasks.cold.tile_processing module

geowatch.tasks.cold.tile_processing.tileprocessing_report(result_log_path, stack_path, version, algorithm, config, startpoint, cold_timepoint, tz, n_cores, starting_date=0, n_cm_maps=0, year_lowbound=0, year_uppbound=0)[source]

output tile-based processing report :Parameters: * result_log_path (string) – outputted log path

  • stack_path (string) – stack path

  • version (string)

  • algorithm (string)

  • config (dictionary structure)

  • startpoint (a time point, when the program starts)

  • tz (string, time zone)

  • n_cores (the core number used)

  • starting_date (the first date of the total dataset)

  • n_cm_maps (the number of snapshots)

  • year_lowbound (the low bound of year range)

  • year_uppbound (the upper bound of year range)

geowatch.tasks.cold.tile_processing.reading_start_dates_nmaps(stack_path, cm_interval)[source]
Parameters:
  • stack_path (string) – stack_path for saving starting_last_dates.txt

  • cm_interval (interval) – day interval for outputting change magnitudes

Returns:

  • (starting_date, n_cm_maps)

  • starting_date - starting date is the first date of the whole dataset,

  • n_cm_maps - the number of change magnitudes to be outputted per pixel per band

geowatch.tasks.cold.tile_processing.is_finished_cold_blockfinished(result_path, nblocks)[source]

check if the COLD algorithm finishes all blocks :Parameters: * result_path (the path that save COLD results)

  • nblocks (the block number)

  • Returns (boolean)

  • ——- – True -> all block finished

geowatch.tasks.cold.tile_processing.is_finished_assemble_cmmaps(cmmap_path, n_cm, starting_date, cm_interval)[source]
Parameters:
  • cmmap_path (the path for saving change magnitude maps)

  • n_cm (the number of change magnitudes outputted per pixel)

  • starting_date (the starting date of the whole dataset)

  • cm_interval (the day interval for outputting change magnitudes)

  • Returns (boolean)

  • ——-

  • True -> assemble finished

geowatch.tasks.cold.tile_processing.get_stack_date(config, block_x, block_y, stack_path, low_datebound=0, high_datebound=0, nband=8)[source]
Parameters:
  • config – configure file

  • block_x – block id at x axis

  • block_y – block id at y axis

  • stack_path – stack path

  • low_datebound – ordinal data of low bounds of selection date range

  • high_datebound – ordinal data of upper bounds of selection date range

Returns:

img_tstack, img_dates_sorted img_tstack - 3-d array (block_width * block_height, nband, nimage)