added output selection “rodrigues”
This commit is contained in:
parent
9c91ba4608
commit
ccf7530121
|
@ -19,7 +19,7 @@ Orientation is given by quaternion, Euler angles, rotation matrix, or crystal fr
|
|||
|
||||
""", version = scriptID)
|
||||
|
||||
outputChoices = ['quaternion','eulers']
|
||||
outputChoices = ['quaternion','rodrigues','eulers']
|
||||
parser.add_option('-o', '--output',
|
||||
dest = 'output',
|
||||
action = 'extend', metavar = '<string LIST>',
|
||||
|
@ -125,8 +125,9 @@ for name in filenames:
|
|||
|
||||
table.info_append(scriptID + '\t' + ' '.join(sys.argv[1:]))
|
||||
for output in options.output:
|
||||
if output == 'quaternion': table.labels_append(['{}_quat({})'.format( i+1,options.symmetry) for i in xrange(4)])
|
||||
if output == 'eulers': table.labels_append(['{}_eulers({})'.format(i+1,options.symmetry) for i in xrange(3)])
|
||||
if output == 'quaternion': table.labels_append(['{}_quat({})'.format( i+1,options.symmetry) for i in xrange(4)])
|
||||
if output == 'rodrigues': table.labels_append(['{}_rodrigues({})'.format(i+1,options.symmetry) for i in xrange(3)])
|
||||
if output == 'eulers': table.labels_append(['{}_eulers({})'.format( i+1,options.symmetry) for i in xrange(3)])
|
||||
table.head_write()
|
||||
|
||||
# ------------------------------------------ process data ------------------------------------------
|
||||
|
@ -152,6 +153,7 @@ for name in filenames:
|
|||
|
||||
for output in options.output:
|
||||
if output == 'quaternion': table.data_append(o.asQuaternion())
|
||||
if output == 'rodrigues': table.data_append(o.asRodrigues())
|
||||
if output == 'eulers': table.data_append(o.asEulers('Bunge', degrees=options.degrees))
|
||||
outputAlive = table.data_write() # output processed line
|
||||
|
||||
|
|
Loading…
Reference in New Issue