2.2.27. addCalculation


Purpose

Add or alter column(s) with derived values according to user-defined arithmetic operation between column(s). Column labels are tagged by '#label#' in formulas. Use ';' for ',' in functions. Numpy is available as 'np'. Special variables: #_row_# -- row index Examples: (1) magnitude of vector -- "np.linalg.norm(#vec#)" (2) rounded root of row number -- "round(math.sqrt(#_row_#);3)"

parent_gray

Usage

> addCalculation options ASCII table(s) 

parent_gray

Options

-l / --label
(list of) new column labels
-f / --formula
(list of) formulas corresponding to labels
-c / --condition
condition to alter existing column data (optional)


parent_gray

Examples

  • distance between origin and node coordinates
    --label 'nodeDistance' --formula 'np.linalg.norm( #node# )'

This topic: Documentation > Processing > PostProcessing > AddCalculation
Topic revision: 19 Feb 2019, MartinDiehl
This site is powered by FoswikiCopyright by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding DAMASK? Send feedback
§ Imprint § Data Protection