Skip to content

Commit

Permalink
Print unwrapping options in show_versions (#430)
Browse files Browse the repository at this point in the history
* Print unwrapping options in `show_versions`

* Fix prints, remove unused private from `wrapped_phase`
  • Loading branch information
scottstanie authored Sep 17, 2024
1 parent 6dfff7e commit a16c6b5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
2 changes: 2 additions & 0 deletions src/dolphin/_show_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,7 @@ def show_versions() -> None:
_print_info_dict(_get_deps_info())
print("\nSystem:")
_print_info_dict(_get_sys_info())
print("Unwrapping packages:")
_print_info_dict(_get_unwrapping_options())
print("optional GPU info:")
_print_info_dict(_get_gpu_info())
2 changes: 1 addition & 1 deletion src/dolphin/workflows/single.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def run_wrapped_phase_single(
if shp_nslc is None:
shp_nslc = len(input_slc_files)

logger.info(f"{vrt_stack}: from {ministack.dates[0]} {ministack.file_list[-1]}")
logger.info(f"{vrt_stack}: from {ministack.dates[0]} to {ministack.dates[-1]}")

nrows, ncols = vrt_stack.shape[-2:]

Expand Down
17 changes: 0 additions & 17 deletions src/dolphin/workflows/wrapped_phase.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from pathlib import Path
from typing import Optional, Sequence, cast

import numpy as np
from opera_utils import get_dates, make_nodata_mask

from dolphin import Bbox, Filename, interferogram, masking, ps
Expand Down Expand Up @@ -398,22 +397,6 @@ def create_ifgs(
return ifg_file_list


def _get_reference_date_idx(
input_file_list: Sequence[Path],
is_compressed: Sequence[bool],
input_dates: Sequence[Sequence[datetime.datetime]],
) -> tuple[datetime.datetime, int]:
is_compressed = ["compressed" in str(f).lower() for f in input_file_list]
if not is_compressed[0]:
return input_dates[0][0], 0

# Otherwise use the last Compressed SLC as reference
reference_idx = np.where(is_compressed)[0][-1]
reference_date = input_dates[reference_idx][0]

return reference_date, reference_idx


def _get_input_dates(
input_file_list: Sequence[Path], is_compressed: Sequence[bool], date_fmt: str
) -> list[list[datetime.datetime]]:
Expand Down

0 comments on commit a16c6b5

Please sign in to comment.