From 6adc8b39345b976716bf53a192e86e629989e710 Mon Sep 17 00:00:00 2001 From: Kanahiro Date: Sat, 9 Dec 2023 11:05:13 +0900 Subject: [PATCH] improve naming --- README.md | 8 +++++--- csmap/__main__.py | 4 ++-- csmap/process.py | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ebe534b..9efa058 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,9 @@ module to process CSMap, based on https://www.rinya.maff.go.jp/j/seibi/sagyoudo/attach/pdf/romou-12.pdf ``` -usage: __main__.py [-h] [--chunk_size CHUNK_SIZE] [--gf_size GF_SIZE] [--gf_sigma GF_SIGMA] - [--cvt_size CVT_SIZE] [--height_scale HEIGHT_SCALE HEIGHT_SCALE] +usage: __main__.py [-h] [--chunk_size CHUNK_SIZE] [--max_workers MAX_WORKERS] [--gf_size GF_SIZE] + [--gf_sigma GF_SIGMA] [--curvature_size CURVATURE_SIZE] + [--height_scale HEIGHT_SCALE HEIGHT_SCALE] [--slope_scale SLOPE_SCALE SLOPE_SCALE] [--curvature_scale CURVATURE_SCALE CURVATURE_SCALE] input_dem_path output_path @@ -16,9 +17,10 @@ positional arguments: options: -h, --help show this help message and exit --chunk_size CHUNK_SIZE + --max_workers MAX_WORKERS --gf_size GF_SIZE --gf_sigma GF_SIGMA - --cvt_size CVT_SIZE + --curvature_size CURVATURE_SIZE --height_scale HEIGHT_SCALE HEIGHT_SCALE --slope_scale SLOPE_SCALE SLOPE_SCALE --curvature_scale CURVATURE_SCALE CURVATURE_SCALE diff --git a/csmap/__main__.py b/csmap/__main__.py index f282671..0cced51 100644 --- a/csmap/__main__.py +++ b/csmap/__main__.py @@ -11,7 +11,7 @@ def parse_args(): parser.add_argument("--max_workers", type=int, default=1) parser.add_argument("--gf_size", type=int, default=12) parser.add_argument("--gf_sigma", type=int, default=3) - parser.add_argument("--cvt_size", type=int, default=1) + parser.add_argument("--curvature_size", type=int, default=1) parser.add_argument("--height_scale", type=float, nargs=2, default=[0.0, 1000.0]) parser.add_argument("--slope_scale", type=float, nargs=2, default=[0.0, 1.5]) parser.add_argument("--curvature_scale", type=float, nargs=2, default=[-0.1, 0.1]) @@ -21,7 +21,7 @@ def parse_args(): params = CsmapParams( gf_size=args.gf_size, gf_sigma=args.gf_sigma, - cvt_size=args.cvt_size, + curvature_size=args.curvature_size, height_scale=args.height_scale, slope_scale=args.slope_scale, curvature_scale=args.curvature_scale, diff --git a/csmap/process.py b/csmap/process.py index 0cf70aa..fcf2b04 100644 --- a/csmap/process.py +++ b/csmap/process.py @@ -15,7 +15,7 @@ class CsmapParams: gf_size: int gf_sigma: int - cvt_size: int + curvature_size: int height_scale: (float, float) slope_scale: (float, float) curvature_scale: (float, float) @@ -26,7 +26,7 @@ def csmap(dem: np.ndarray, params: CsmapParams) -> np.ndarray: # calclucate elements slope = calc.slope(dem) g = calc.gaussianfilter(dem, params.gf_size, params.gf_sigma) - curvature = calc.curvature(g, params.cvt_size) + curvature = calc.curvature(g, params.curvature_size) # rgbify dem_rgb = color.rgbify(dem, color.height_blackwhite, scale=params.height_scale)