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