diff --git a/pyproject.toml b/pyproject.toml index e1d4492..6404d46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ Documentation = "https://hyp3-docs.asf.alaska.edu" [project.entry-points.hyp3] back_projection = "hyp3_srg.back_projection:main" -timeseries = "hyp3_srg.timeseries:main" +time_series = "hyp3_srg.time_series:main" [tool.pytest.ini_options] testpaths = ["tests"] diff --git a/src/hyp3_srg/__main__.py b/src/hyp3_srg/__main__.py index 2ebb1d6..6d863a4 100644 --- a/src/hyp3_srg/__main__.py +++ b/src/hyp3_srg/__main__.py @@ -14,7 +14,7 @@ def main(): parser = argparse.ArgumentParser(prefix_chars='+', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument( '++process', - choices=['back_projection', 'timeseries'], + choices=['back_projection', 'time_series'], default='back_projection', help='Select the HyP3 entrypoint to use', # HyP3 entrypoints are specified in `pyproject.toml` ) diff --git a/src/hyp3_srg/timeseries.py b/src/hyp3_srg/time_series.py similarity index 95% rename from src/hyp3_srg/timeseries.py rename to src/hyp3_srg/time_series.py index 30e27f9..b5ecd02 100644 --- a/src/hyp3_srg/timeseries.py +++ b/src/hyp3_srg/time_series.py @@ -144,14 +144,14 @@ def compute_sbas_velocity_solution( -def create_timeseries( +def create_time_series( looks: tuple[int] = (10, 10), baselines: tuple[int] = (1000, 1000), threshold: float = 0.5, do_tropo_correction: bool = True, work_dir: Path | None = None ) -> None: - """ Creates a timeseries from a stack of GSLCs consisting of interferograms and a velocity solution + """ Creates a time series from a stack of GSLCs consisting of interferograms and a velocity solution Args: looks: tuple containing the number range looks and azimuth looks @@ -174,13 +174,13 @@ def create_timeseries( ) -def timeseries( +def time_series( granules: Iterable[str], bucket: str = None, bucket_prefix: str = '', work_dir: Optional[Path] = None, ): - """Create and package a timeseries stack from a set of Sentinel-1 GSLCs. + """Create and package a time series stack from a set of Sentinel-1 GSLCs. Args: granules: List of Sentinel-1 GSLCs @@ -201,7 +201,7 @@ def timeseries( utils.call_stanford_module('util/merge_slcs.py', work_dir=work_dir) - create_timeseries(work_dir=work_dir) + create_time_series(work_dir=work_dir) @@ -219,7 +219,7 @@ def main(): parser.add_argument('granules', type=str.split, nargs='+', help='GSLC granules.') args = parser.parse_args() args.granules = [item for sublist in args.granules for item in sublist] - timeseries(**args.__dict__) + time_series(**args.__dict__) if __name__ == '__main__':