Skip to content

Commit

Permalink
CLN: output and docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Günther committed Mar 18, 2024
1 parent d4da24c commit 77f5ba4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
5 changes: 4 additions & 1 deletion pygimli/core/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ def getUrlFile(url, fileName, timeout=10, verbose=False):
# print(pg.pf(header))
length = int(header['Content-Length'])

p = pg.utils.ProgressBar(length)
if verbose:
p = pg.utils.ProgressBar(length)

blockSize = 1024 * 8
block = fp.read(blockSize)
blockCounter = 1
Expand All @@ -246,6 +248,7 @@ def getUrlFile(url, fileName, timeout=10, verbose=False):
with open(fileName, 'wb') as outFile:
if verbose:
p(min(length-1, blockCounter*blockSize))

md5_hash.update(block)
outFile.write(block)
while True:
Expand Down
16 changes: 8 additions & 8 deletions pygimli/physics/ert/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ def showERTData(data, vals=None, **kwargs):
can be strings ("a", "m", "mid", "sep") or lists of them ["a", "m"]
* style : str
predefined styles for choosing x and y arguments (x/y overrides)
"ab-mn" (default): any combination of current/potential electrodes
"a-m" : only a and m electrode (for unique dipole spacings like DD)
"a-mn" : a and combination of mn electrode (PD with different MN)
"ab-m" : a and combination of mn electrode
"sepa-m" : current dipole length with a and m (multi-gradient)
"a-sepm" : a and potential dipole length with m
- "ab-mn" (default): any combination of current/potential electrodes
- "a-m" : only a and m electrode (for unique dipole spacings like DD)
- "a-mn" : a and combination of mn electrode (PD with different MN)
- "ab-m" : a and combination of mn electrode
- "sepa-m" : current dipole length with a and m (multi-gradient)
- "a-sepm" : a and potential dipole length with m
* switchxy : bool
exchange x and y axes before plotting
Expand Down Expand Up @@ -334,9 +334,9 @@ def midconfERT(data, ind=None, rnum=1, circular=False, switch=False):
else:
# topography with probably missing electrodes
dx = np.floor(dx/np.round(dxM)) * dxM
pass

if max(dx) < 0.5:
print("Detecting small distances, using mm accuracy")
pg.debug("Detecting small distances, using mm accuracy")
rnum = 3
xe = np.hstack((0., np.cumsum(np.round(dx, rnum)), np.nan))

Expand Down

0 comments on commit 77f5ba4

Please sign in to comment.