'buffered' has no effect any more
This commit is contained in:
parent
a8e2ee0a86
commit
e93f5c84ff
|
@ -66,7 +66,7 @@ if filenames == []: filenames = [None]
|
|||
|
||||
for name in filenames:
|
||||
try:
|
||||
table = damask.ASCIItable(name = name, buffered = False)
|
||||
table = damask.ASCIItable(name = name)
|
||||
except IOError:
|
||||
continue
|
||||
damask.util.report(scriptName,name)
|
||||
|
|
|
@ -61,8 +61,8 @@ if filenames == []: filenames = [None]
|
|||
|
||||
for name in filenames:
|
||||
try:
|
||||
table = damask.ASCIItable(name = name, buffered = False)
|
||||
except:
|
||||
table = damask.ASCIItable(name = name)
|
||||
except IOError:
|
||||
continue
|
||||
damask.util.report(scriptName,name)
|
||||
|
||||
|
|
|
@ -47,9 +47,7 @@ if options.link is None:
|
|||
|
||||
if options.asciitable is not None and os.path.isfile(options.asciitable):
|
||||
|
||||
linkedTable = damask.ASCIItable(name = options.asciitable,
|
||||
buffered = False,
|
||||
readonly = True)
|
||||
linkedTable = damask.ASCIItable(name = options.asciitable, readonly = True)
|
||||
linkedTable.head_read() # read ASCII header info of linked table
|
||||
linkDim = linkedTable.label_dimension(options.link[1]) # dimension of linking column
|
||||
|
||||
|
@ -72,9 +70,10 @@ else:
|
|||
if filenames == []: filenames = [None]
|
||||
|
||||
for name in filenames:
|
||||
try: table = damask.ASCIItable(name = name,
|
||||
buffered = False)
|
||||
except: continue
|
||||
try:
|
||||
table = damask.ASCIItable(name = name)
|
||||
except IOError:
|
||||
continue
|
||||
damask.util.report(scriptName,"{} {} <== {} {}".format(name,damask.util.deemph('@ '+options.link[0]),
|
||||
options.asciitable,damask.util.deemph('@ '+options.link[1])))
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ if filenames == []: filenames = [None]
|
|||
|
||||
for name in filenames:
|
||||
try:
|
||||
table = damask.ASCIItable(name = name, buffered = False)
|
||||
table = damask.ASCIItable(name = name)
|
||||
except IOError:
|
||||
continue
|
||||
damask.util.report(scriptName,name)
|
||||
|
|
|
@ -182,9 +182,10 @@ slip_normal /= np.tile(np.linalg.norm(slip_normal ,axis=1),(3,1)).T
|
|||
if filenames == []: filenames = [None]
|
||||
|
||||
for name in filenames:
|
||||
try: table = damask.ASCIItable(name = name,
|
||||
buffered = False)
|
||||
except: continue
|
||||
try:
|
||||
table = damask.ASCIItable(name = name)
|
||||
except IOError:
|
||||
continue
|
||||
damask.util.report(scriptName,name)
|
||||
|
||||
# ------------------------------------------ read header ------------------------------------------
|
||||
|
|
|
@ -90,13 +90,14 @@ if options.weight is not None: labels += [options.weight]
|
|||
if filenames == []: filenames = [None]
|
||||
|
||||
for name in filenames:
|
||||
try: table = damask.ASCIItable(name = name,
|
||||
outname = os.path.join(os.path.dirname(name),
|
||||
'binned-{}-{}_'.format(*options.data) +
|
||||
('weighted-{}_'.format(options.weight) if options.weight else '') +
|
||||
os.path.basename(name)) if name else name,
|
||||
buffered = False)
|
||||
except: continue
|
||||
try:
|
||||
table = damask.ASCIItable(name = name,
|
||||
outname = os.path.join(os.path.dirname(name),
|
||||
'binned-{}-{}_'.format(*options.data) +
|
||||
('weighted-{}_'.format(options.weight) if options.weight else '') +
|
||||
os.path.basename(name)) if name else name)
|
||||
except IOError:
|
||||
continue
|
||||
damask.util.report(scriptName,name)
|
||||
|
||||
# ------------------------------------------ read header ------------------------------------------
|
||||
|
|
|
@ -66,9 +66,10 @@ parser.set_defaults(condition = None,
|
|||
if filenames == []: filenames = [None]
|
||||
|
||||
for name in filenames:
|
||||
try: table = damask.ASCIItable(name = name,
|
||||
buffered = False)
|
||||
except: continue
|
||||
try:
|
||||
table = damask.ASCIItable(name = name)
|
||||
except IOError:
|
||||
continue
|
||||
damask.util.report(scriptName,name)
|
||||
|
||||
# ------------------------------------------ assemble info ---------------------------------------
|
||||
|
|
|
@ -87,9 +87,10 @@ if not hasattr(mapFunction,'__call__'):
|
|||
if filenames == []: filenames = [None]
|
||||
|
||||
for name in filenames:
|
||||
try: table = damask.ASCIItable(name = name,
|
||||
buffered = False)
|
||||
except: continue
|
||||
try:
|
||||
table = damask.ASCIItable(name = name)
|
||||
except IOError:
|
||||
continue
|
||||
damask.util.report(scriptName,name)
|
||||
|
||||
# ------------------------------------------ sanity checks ---------------------------------------
|
||||
|
|
|
@ -76,10 +76,10 @@ else:
|
|||
if filenames == []: filenames = [None]
|
||||
|
||||
for name in filenames:
|
||||
try: table = damask.ASCIItable(name = name,
|
||||
buffered = False,
|
||||
readonly = True)
|
||||
except: continue
|
||||
try:
|
||||
table = damask.ASCIItable(name = name, readonly = True)
|
||||
except IOError:
|
||||
continue
|
||||
damask.util.report(scriptName,name)
|
||||
|
||||
# ------------------------------------------ read header ------------------------------------------
|
||||
|
|
|
@ -117,11 +117,9 @@ if filenames == []: filenames = [None]
|
|||
|
||||
for name in filenames:
|
||||
try:
|
||||
table = damask.ASCIItable(name = name,
|
||||
buffered = False,
|
||||
labeled = options.label is not None,
|
||||
readonly = True)
|
||||
except: continue
|
||||
table = damask.ASCIItable(name = name, labeled = options.label is not None, readonly = True)
|
||||
except IOError:
|
||||
continue
|
||||
damask.util.report(scriptName,name)
|
||||
|
||||
# ------------------------------------------ read header ------------------------------------------
|
||||
|
|
|
@ -114,11 +114,10 @@ if filenames == []: filenames = [None]
|
|||
|
||||
for name in filenames:
|
||||
try:
|
||||
table = damask.ASCIItable(name = name,
|
||||
buffered = False,
|
||||
labeled = options.label is not None,
|
||||
readonly = True)
|
||||
except: continue
|
||||
table = damask.ASCIItable(name = name, readonly = True,
|
||||
labeled = options.label is not None)
|
||||
except IOError:
|
||||
continue
|
||||
table.report_name(scriptName,name)
|
||||
|
||||
# ------------------------------------------ read header ------------------------------------------
|
||||
|
|
|
@ -82,11 +82,10 @@ if filenames == []: filenames = [None]
|
|||
|
||||
for name in filenames:
|
||||
try:
|
||||
table = damask.ASCIItable(name = name,
|
||||
buffered = False,
|
||||
labeled = options.label is not None,
|
||||
readonly = True)
|
||||
except: continue
|
||||
table = damask.ASCIItable(name = name, readonly = True,
|
||||
labeled = options.label is not None)
|
||||
except IOError:
|
||||
continue
|
||||
damask.util.report(scriptName,name)
|
||||
|
||||
# ------------------------------------------ read header ------------------------------------------
|
||||
|
|
|
@ -51,8 +51,7 @@ if filenames == []: filenames = [None]
|
|||
|
||||
for name in filenames:
|
||||
try:
|
||||
table = damask.ASCIItable(name = name,
|
||||
buffered = False)
|
||||
table = damask.ASCIItable(name = name)
|
||||
except IOError:
|
||||
continue
|
||||
damask.util.report(scriptName,name)
|
||||
|
|
|
@ -52,9 +52,9 @@ if filenames == []: filenames = [None]
|
|||
|
||||
for name in filenames:
|
||||
try:
|
||||
table = damask.ASCIItable(name = name,
|
||||
buffered = False)
|
||||
except: continue
|
||||
table = damask.ASCIItable(name = name)
|
||||
except IOError:
|
||||
continue
|
||||
damask.util.report(scriptName,name)
|
||||
|
||||
# --- interpret header ----------------------------------------------------------------------------
|
||||
|
|
|
@ -60,9 +60,9 @@ if filenames == []: filenames = [None]
|
|||
|
||||
for name in filenames:
|
||||
try:
|
||||
table = damask.ASCIItable(name = name,
|
||||
buffered = False, labeled = options.labeled, readonly = True)
|
||||
except: continue
|
||||
table = damask.ASCIItable(name = name, labeled = options.labeled, readonly = True)
|
||||
except IOError:
|
||||
continue
|
||||
details = ', '.join(
|
||||
(['header'] if options.table else []) +
|
||||
(['info'] if options.head or options.info else []) +
|
||||
|
|
|
@ -234,7 +234,7 @@ if filenames == []: filenames = [None]
|
|||
|
||||
for name in filenames:
|
||||
try:
|
||||
table = damask.ASCIItable(name = name, buffered = False, readonly=True)
|
||||
table = damask.ASCIItable(name = name, readonly=True)
|
||||
except IOError:
|
||||
continue
|
||||
damask.util.report(scriptName,name)
|
||||
|
|
|
@ -966,9 +966,7 @@ if any(output in options.output for output in ['spectral','mentat']):
|
|||
if 'spectral' in options.output:
|
||||
fftdata = fftbuild(rcData, options.size, options.xmargin, options.ymargin, options.grid, options.extrusion)
|
||||
|
||||
table = damask.ASCIItable(outname = myName+'_'+str(int(fftdata['grid'][0]))+'.geom',
|
||||
labeled = False,
|
||||
buffered = False)
|
||||
table = damask.ASCIItable(outname = myName+'_'+str(int(fftdata['grid'][0]))+'.geom', labeled = False)
|
||||
table.labels_clear()
|
||||
table.info_clear()
|
||||
table.info_append([
|
||||
|
|
|
@ -132,9 +132,10 @@ random.seed(options.randomSeed)
|
|||
if filenames == []: filenames = [None]
|
||||
|
||||
for name in filenames:
|
||||
try: table = damask.ASCIItable(outname = name,
|
||||
buffered = False)
|
||||
except: continue
|
||||
try:
|
||||
table = damask.ASCIItable(outname = name)
|
||||
except IOError:
|
||||
continue
|
||||
damask.util.report(scriptName,name)
|
||||
|
||||
# --- sanity checks -------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue