geowatch.tasks.cold.export_cold_result_kwcoco module

This is step 3/4 in predict.py

SeeAlso:

predict.py

prepare_kwcoco.py

tile_processing_kwcoco.py

export_cold_result_kwcoco.py *

assemble_cold_result_kwcoco.py

This script is for exporting COLD algorithm results (change vector, coefficients, RMSEs) to geotiff raster with kwcoco dataset. See original code: ~/code/pycold/src/python/pycold/imagetool/export_change_map.py

class geowatch.tasks.cold.export_cold_result_kwcoco.ExportColdKwcocoConfig(*args, **kwargs)[source]

Bases: DataConfig

The docstring will be the description in the CLI help

Valid options: []

Parameters:
  • *args – positional arguments for this data config

  • **kwargs – keyword arguments for this data config

default = {'coefs': <Value(None)>, 'coefs_bands': <Value(None)>, 'cold_time_span': <Value('1 year')>, 'combine': <Value(False)>, 'combined_coco_fpath': <Value(None)>, 'exclude_first': <Value(True)>, 'meta_fpath': <Value(None)>, 'n_cores': <Value(None)>, 'rank': <Value(None)>, 'reccg_path': <Value(None)>, 'sensors': <Value('L8')>, 'stack_path': <Value(None)>, 'timestamp': <Value(False)>, 'year_highbound': <Value(None)>, 'year_lowbound': <Value(None)>}
geowatch.tasks.cold.export_cold_result_kwcoco.export_cold_main(cmdline=1, **kwargs)[source]
Parameters:

cmdline (int, optional) – _description_. Defaults to 1.

Example:

>>> # xdoctest: +REQUIRES(env:TEST_COLD)
>>> from geowatch.tasks.cold.export_cold_result_kwcoco import export_cold_main
>>> from geowatch.tasks.cold.export_cold_result_kwcoco import *
>>> kwargs= dict(
>>>    rank = 0,
>>>    n_cores = 1,
>>>    stack_path = "/gpfs/scratchfs1/zhz18039/jws18003/new-repos/smart_data_dvc2/Drop6-MeanYear10GSD-V2/_pycold_combine2/stacked/KR_R001/",
>>>    reccg_path = "/gpfs/scratchfs1/zhz18039/jws18003/new-repos/smart_data_dvc2/Drop6-MeanYear10GSD-V2/_pycold_combine2/reccg/KR_R001/",
>>>    combined_coco_fpath = "/gpfs/scratchfs1/zhz18039/jws18003/new-repos/smart_data_dvc2/Drop6-MeanYear10GSD-V2/imgonly-KR_R001.kwcoco.zip",
>>>    coefs = 'cv,rmse,a0,a1,b1,c1',
>>>    year_lowbound = None,
>>>    year_highbound = None,
>>>    coefs_bands = '0,1,2,3,4,5',
>>>    timestamp = False,
>>>    combine = True,
>>>    )
>>> cmdline=0
>>> export_cold_main(cmdline, **kwargs)
exception geowatch.tasks.cold.export_cold_result_kwcoco.NoMatchingColdCurve[source]

Bases: Exception

geowatch.tasks.cold.export_cold_result_kwcoco.extract_features(cold_plot, band, ordinal_day_list, nan_val, timestamp, feature_outputs, feature_set)[source]
geowatch.tasks.cold.export_cold_result_kwcoco.read_json_metadata(stacked_path)[source]