Skip to content

Commit

Permalink
fix -g to generate template
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarah Mirzaee committed Aug 24, 2023
1 parent 472fdff commit a791b13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/miaplpy/miaplpyApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def __init__(self, customTemplateFile=None, workDir=None, inps=None):
if not customTemplateFile is None:
custom_mintpy_temp = os.path.dirname(customTemplateFile) + '/custom_smallbaselineApp.cfg'
else:
custom_mintpy_temp = os.path.dirname(inps.templateFile) + '/custom_smallbaselineApp.cfg'
custom_mintpy_temp = os.getcwd() + '/custom_smallbaselineApp.cfg'

if os.path.exists(custom_mintpy_temp):
super().__init__(custom_mintpy_temp, workDir)
Expand Down Expand Up @@ -183,10 +183,10 @@ def open(self):
self.ifgram_dir, self.pairs = self.get_interferogram_pairs()
os.makedirs(self.ifgram_dir, exist_ok=True)

if 'sensor_type' in self.metadata:
self.sensor_type = self.metadata['sensor_type']
else:
self.sensor_type = 'tops'
if 'sensor_type' in self.metadata:
self.sensor_type = self.metadata['sensor_type']
else:
self.sensor_type = 'tops'

os.chdir(self.workDir)
shutil.rmtree(self.workDir + '/pic')
Expand Down
2 changes: 1 addition & 1 deletion src/miaplpy/objects/arg_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def read_inps2run_steps(self, inps):
path1 = os.path.dirname(inps.customTemplateFile)
inps.workDir = path1 + '/miaplpy'
else:
inps.workDir = os.path.dirname(inps.templateFile)
inps.workDir = os.getcwd() #os.path.dirname(inps.templateFile)

inps.workDir = os.path.abspath(inps.workDir)

Expand Down

0 comments on commit a791b13

Please sign in to comment.