Skip to content

Commit

Permalink
tidy config wrapper calls
Browse files Browse the repository at this point in the history
  • Loading branch information
hardreddata committed Jul 27, 2022
1 parent f8cd5d8 commit 4ffbfff
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions contrib/stack/topsStack/Stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,7 @@ def unpackStackReferenceSLC(self, safe_dict):
configObj.topo('[Function-2]')
configObj.finalize()

line_cnt = 1
configObj.write_wrapper_config2run_file(configName, line_cnt)
configObj.write_wrapper_config2run_file(configName)
del configObj

def unpackSecondarysSLC(self, stackReferenceDate, secondaryList, safe_dict):
Expand All @@ -356,7 +355,8 @@ def unpackSecondarysSLC(self, stackReferenceDate, secondaryList, safe_dict):
configObj.finalize()

line_cnt += 1
configObj.write_wrapper_config2run_file(configName, line_cnt, secondary == secondaryList[-1], self.numProcess)
last_line = secondary == secondaryList[-1]
configObj.write_wrapper_config2run_file(configName, line_cnt, last_line = last_line, numProcess = self.numProcess)
del configObj

def averageBaseline(self, stackReferenceDate, secondaryList):
Expand All @@ -373,7 +373,8 @@ def averageBaseline(self, stackReferenceDate, secondaryList):
configObj.finalize()

line_cnt += 1
configObj.write_wrapper_config2run_file(configName, line_cnt, secondary == secondaryList[-1], self.numProcess)
last_line = secondary == secondaryList[-1]
configObj.write_wrapper_config2run_file(configName, line_cnt, last_line = last_line, numProcess = self.numProcess)
del configObj

def gridBaseline(self, stackReferenceDate, secondaryList):
Expand Down Expand Up @@ -402,8 +403,7 @@ def gridBaseline(self, stackReferenceDate, secondaryList):
configObj.computeGridBaseline('[Function-1]')
configObj.finalize()

line_cnt = 1
configObj.write_wrapper_config2run_file(configName, line_cnt)
configObj.write_wrapper_config2run_file(configName)
del configObj


Expand Down Expand Up @@ -438,7 +438,8 @@ def geo2rdr_offset(self, secondaryList, fullBurst='False'):
configObj.finalize()

line_cnt += 1
configObj.write_wrapper_config2run_file(configName, line_cnt, secondary == secondaryList[-1], self.numProcess)
last_line = secondary == secondaryList[-1]
configObj.write_wrapper_config2run_file(configName, line_cnt, last_line = last_line, numProcess = self.numProcess)
del configObj

def resample_with_carrier(self, secondaryList, fullBurst='False'):
Expand Down Expand Up @@ -468,7 +469,8 @@ def resample_with_carrier(self, secondaryList, fullBurst='False'):
configObj.finalize()

line_cnt += 1
configObj.write_wrapper_config2run_file(configName, line_cnt, secondary == secondaryList[-1], self.numProcess)
last_line = secondary == secondaryList[-1]
configObj.write_wrapper_config2run_file(configName, line_cnt, last_line = last_line, numProcess = self.numProcess)
del configObj


Expand Down Expand Up @@ -639,8 +641,8 @@ def mergeReference(self, stackReference, virtual='True'):
configObj.mergeBurst('[Function-1]')
configObj.finalize()

line_cnt = 1
configObj.write_wrapper_config2run_file(configName, line_cnt)
line_cnt = 1;
configObj.write_wrapper_config2run_file(configName)
del configObj

geometryList = ['lat*rdr', 'lon*rdr', 'los*rdr', 'hgt*rdr', 'shadowMask*rdr','incLocal*rdr']
Expand Down

0 comments on commit 4ffbfff

Please sign in to comment.