2.2.14. groupTable
Purpose
Apply a user-specified function to condense into a single row all those rows for which columns 'label' have identical values. Output table will contain as many rows as there are different (unique) values in the grouping column(s). Periodic domain averaging of coordinate values is supported. Examples: For grain averaged values, replace all rows of particular 'texture' with a single row containing their average. groupTable --label texture --function np.average data.txt
Usage
> groupTable options ASCII table(s)
Options
General
-
-l
/ --label
- column label(s) for grouping rows
-
-f
/ --function
[ np.average ] - mapping function
-
-a
/ --all
- apply mapping function also to grouping column(s)
periodic averaging
-
-p
/ --periodic
- coordinate label(s) to average across periodic domain
-
--limits
[ 0.0, 1.0 ] - min and max of periodic domain
Example
1 head
id 1_vector 2_vector 3_vector
12 1.0 2.0 3.0
2 4.0 4.0 4.0
12 4.0 6.0 -1.0
--label id --function np.sum
1 head
id 1_vector 2_vector 3_vector
2 4.0 4.0 4.0
12 5.0 8.0 2.0