Skip to content

Commit

Permalink
bumped isis version, add step kwargs to hirise notebook (#30)
Browse files Browse the repository at this point in the history
* bumped isis version, add step kwargs to hirise notebook
* fix case if step_kwargs is none
  • Loading branch information
AndrewAnnex committed Sep 15, 2021
1 parent 899fef9 commit d91738f
Show file tree
Hide file tree
Showing 4 changed files with 205 additions and 201 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2020, Andrew Michael Annex
Copyright (c) 2020-2021, Andrew Michael Annex
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
8 changes: 6 additions & 2 deletions asap_stereo/asap.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BSD 3-Clause License
#
# Copyright (c) 2020, Andrew Michael Annex
# Copyright (c) 2020-2021, Andrew Michael Annex
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -156,6 +156,8 @@ def isis3_to_dict(instr: str)-> Dict:


def kwarg_parse(kwargs: Dict, key: str)-> str:
if kwargs is None:
return ''
key_args = kwargs.get(key, {})
if isinstance(key_args, str):
return key_args
Expand Down Expand Up @@ -1275,7 +1277,7 @@ def generate_hirise_pair_list(self, one, two):
o.write('\n')

@staticmethod
def notebook_pipeline_make_dem(left: str, right: str, config: str, refdem: str, gcps: str = '', maxdisp: float = None, downsample: int = None, demgsd: float = 1.0, imggsd: float = 0.25, max_ba_iterations: int = 50, alignment_method = 'rigid', working_dir ='./', out_notebook=None, **kwargs):
def notebook_pipeline_make_dem(left: str, right: str, config: str, refdem: str, gcps: str = '', maxdisp: float = None, downsample: int = None, demgsd: float = 1.0, imggsd: float = 0.25, max_ba_iterations: int = 50, alignment_method = 'rigid', step_kwargs = None, working_dir ='./', out_notebook=None, **kwargs):
"""
First step in HiRISE DEM pipeline that uses papermill to persist log
Expand All @@ -1295,6 +1297,7 @@ def notebook_pipeline_make_dem(left: str, right: str, config: str, refdem: str,
:param demgsd: desired GSD of output DEMs (4x image GSD)
:param imggsd: desired GSD of output ortho images
:param max_ba_iterations: maximum number of BA steps to use per run (defaults to 50 for slow running hirise BA)
:param step_kwargs: Arbitrary dict of kwargs for steps following {'step_#' : {'key': 'value}}
"""
if not out_notebook:
out_notebook = f'{working_dir}/log_asap_notebook_pipeline_make_dem_hirise.ipynb'
Expand All @@ -1314,6 +1317,7 @@ def notebook_pipeline_make_dem(left: str, right: str, config: str, refdem: str,
'alignment_method': alignment_method,
'downsample': downsample,
'max_ba_iterations': max_ba_iterations,
'step_kwargs' : step_kwargs
},
request_save_on_cell_execute=True,
**kwargs
Expand Down

0 comments on commit d91738f

Please sign in to comment.