Skip to content

Commit

Permalink
timeseries to time_series
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewPlayer3 committed Sep 5, 2024
1 parent 56e70cd commit 1381c9e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion src/hyp3_srg/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`
)
Expand Down
12 changes: 6 additions & 6 deletions src/hyp3_srg/timeseries.py → src/hyp3_srg/time_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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)



Expand All @@ -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__':
Expand Down

0 comments on commit 1381c9e

Please sign in to comment.