Skip to content

Commit

Permalink
Fix Codacy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
yjzhenglamarmota committed May 19, 2022
1 parent fadb0c2 commit 3939412
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 7 additions & 0 deletions mintpy/closure_phase_bias.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import os
import sys
import time
import argparse
import numpy as np
import glob
Expand Down Expand Up @@ -579,6 +580,7 @@ def biascorrection(ifgram_stack, nl, bw, max_memory, outdir, parallel):
"outdir" : outdir,
}
num_threads_dict = cluster.set_num_threads("1")
start_time = time.time()
for i, box in enumerate(box_list):
box_width = box[2] - box[0]
box_length = box[3] - box[1]
Expand Down Expand Up @@ -611,6 +613,11 @@ def biascorrection(ifgram_stack, nl, bw, max_memory, outdir, parallel):
data=tsbias/100,
datasetName='timeseries',
block=block)

# roll back to the original number of threads
cluster.roll_back_num_threads(num_threads_dict)
m, s = divmod(time.time() - start_time, 60)
print('time used: {:02.0f} mins {:02.1f} secs.\n'.format(m, s))
return


Expand Down
2 changes: 0 additions & 2 deletions mintpy/utils/isce_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1003,9 +1003,7 @@ def unwrap_snaphu(intfile,corfile,unwfile, meta ,cost='SMOOTH'):
'''
import isce
from contrib.Snaphu.Snaphu import Snaphu
from mintpy.utils import writefile

length = int(meta['length'])
width = int(meta['width'])
wavelength = float(meta['WAVELENGTH'])
altitude = float(meta['altitude'])
Expand Down

0 comments on commit 3939412

Please sign in to comment.