.. _`Calculator Table`: .. _`org.sysess.sympathy.data.table.calculatortable`: Calculator Table ~~~~~~~~~~~~~~~~ .. image:: calculator.svg :width: 48 The Calculator nodes can perform calculation on Table(s). Accessing a column can be done either by using the ${} notation (${signal}) or by the :ref:`tableapi` (table.col('signal').data). When the option *Put results in common outputs* is enabled (the default) each input structure results in a single output table with all the new columns. This means that all the calculated columns must be the same length. When disabled each calculation instead generates a table with a single column. The length of the outgoing list therefore depends on the number of incoming structures and the number of operations that are applied to each structure. As an example, if the incoming list consist of five tables and there are two calculations, the number of tables in the outgoing list will be 5*2=10. Note that the incoming columns don't propagate to the output table by default. If the results of you calculations are of the same length as the input, and the option *Put results in common outputs* is enabled you can use the node :ref:`HJoin Tables` to add calculated results to the input table, or you can simply use the option 'Copy input' to do this automatically. Example calculations:: New signal = ${Old signal} + 1 area = ${width} * ${height} result = (${signal0} == 2) & ca.change_up(${signal1}) index = np.arange(len(${some signal})) sine = np.sin(${angle}) The whole input table is available in the calculations as `table`. This allows the entire :ref:`tableapi` to be used. For example you can get a list of a table's column names:: table_names = table.column_names() *Ports*: **Inputs**: :port0: table Input Table **Outputs**: :port1: table Table with results from the calculations. *Configuration*: **calc_list** List of calculations. **copy_input** If enabled the incoming data will be copied to the output before running the calculations. This requires that the results will all have the same length. An exception will be raised if the lengths of the outgoing results differ. **fail_strategy** Decide how a failed calculation should be handled .. automodule:: node_old_calculator .. class:: CalculatorTableNode Plugins ####### :ref:`StdPlugin`