Skip to content

Commit

Permalink
change input parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerkuou committed Oct 21, 2024
1 parent 934c4f3 commit ecbd7be
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions examples/scripts/script_ps_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,23 @@ def get_free_port():
return freesock


# ---- Config 1: Path Configuration ----
# Paths
path_slc_zarr = Path("/project/caroline/slc_file.zarr") # SLC zarr file
# ---- Config 1: Human Input ----


# Parameters
method = 'nmad' # Method for selection
threshold = 0.45 # Threshold for selection

# Input data paths
path_slc_zarr = Path("/project/caroline/slc_file.zarr") # Zarr file of all SLCs

# Output config
overwrite_zarr = False # Flag for zarr overwrite
chunk_space = 10000 # Output chunk size in space dimension
path_figure = Path("./figure") # Output path for figure
path_figure.mkdir(exist_ok=True) # Make figure directory if not exists

path_ps_zarr = Path("./ps.zarr") # output file for selected PS

path_figure.mkdir(exist_ok=True) # Make figure directory if not exists

# ---- Config 2: Dask configuration ----

Expand Down Expand Up @@ -110,7 +114,7 @@ def get_free_port():
# slcs = slcs.chunk({"azimuth":1000, "range":1000, "time":-1})

# Select PS
stm_ps = ps_selection(slcs, 0.45, method='nmad', output_chunks=chunk_space)
stm_ps = ps_selection(method, threshold, method='nmad', output_chunks=chunk_space)

# Re-order the PS to make the spatially adjacent PS in the same chunk
stm_ps_reordered = stm_ps.stm.reorder(xlabel='lon', ylabel='lat')
Expand Down

0 comments on commit ecbd7be

Please sign in to comment.