Skip to content

Commit

Permalink
only create cor/conncomp reader if doing L2
Browse files Browse the repository at this point in the history
  • Loading branch information
scottstanie committed Nov 8, 2024
1 parent e434ba9 commit 680846d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dolphin/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ def invert_unw_network(
cor_vrt_name = Path(output_dir) / "cor_network.vrt"
conncomp_vrt_name = Path(output_dir) / "conncomp_network.vrt"

if conncomp_file_list is not None:
if conncomp_file_list is not None and method == "L2":
conncomp_reader = io.VRTStack(
file_list=conncomp_file_list,
outfile=conncomp_vrt_name,
Expand All @@ -973,7 +973,7 @@ def invert_unw_network(
)
readers = [unw_reader, conncomp_reader]
logger.info("Masking unw pixels during inversion using connected components.")
elif cor_file_list is not None:
elif cor_file_list is not None and method == "L2":
cor_reader = io.VRTStack(
file_list=cor_file_list, outfile=cor_vrt_name, skip_size_check=True
)
Expand Down

0 comments on commit 680846d

Please sign in to comment.