fixed bug for non-present "microstructure" info in header.

This commit is contained in:
Philip Eisenlohr 2013-10-15 12:36:52 +00:00
parent 47577e3d11
commit 705d23a5ed
1 changed files with 2 additions and 2 deletions

View File

@ -161,8 +161,8 @@ for file in files:
extra_header.append(header) extra_header.append(header)
if info['microstructures'] != len(grainIDs): if info['microstructures'] != len(grainIDs):
file['croak'].write('grain data not matching grain count...\n') file['croak'].write('grain data not matching grain count (%i)...\n'%(len(grainIDs)))
info['microstructures'] = min(info['microstructures'],len(grainIDs)) info['microstructures'] = len(grainIDs)
if 0 not in options.grid: # user-specified grid if 0 not in options.grid: # user-specified grid
info['grid'] = numpy.array(options.grid) info['grid'] = numpy.array(options.grid)