Data manipulation

Data manipulation

Data management nodes modifies table entities. They take one or more tables as an input and one table as an output.

Basic

Accumulate Records

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • LoopName (Text)

  • PreviewMode (Number)

Append Columns

2D/3D
Parameters
Input
  • A, B, … (Table, Multiple)
Output
  • R (Table)
Control

Calculated Column

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • declType (Text)

  • featureName (Text)

  • featureUnit (Text)

  • codeExpression (Text)

Modify Columns

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnNames (ListModel)

Reduce Records

2D/3D

This node reduces the rows of the table by calculating statistics like mean, median, min, max, stdev or any-value for each column of the table. Input and output is one table.

Parameters:

  • entities: dimension or entity to be aggregated. Typically all others than the one to kept. Can be one or more.
  • aggregation statistic for each column
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnStats (ListModel)

  • groupByList (ListModel)

Scale Column Data

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ScaledColumns (ListModel)

Grouping

Aggregate Rows

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnStats (ListModel)

Filter Groups

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnName (Text)

  • Statistics (Number)

Group Records

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • SelectedColumns (ListModel)

Ungroup Records

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control

Sort & Select

Current Records

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control

Filter Records

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • Comparator (Number)

  • Value (Text)

  • ColumnName (Text)

  • ColumnTitle (Text)

Pivot Table

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnStats (ListModel)

  • ColumnName (Text)

  • ColumnSuffix (Text)

  • ColumnCount (Number)

  • ColumnOrder (Number)

Select First & Last

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control

Select Records

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • RowIndex (Number)

  • RowCount (Number)

Select Top

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • Ascending (Number)

  • RowCount (Number)

  • ColumnName (Text)

Sort Records

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnName (Text)

  • Order (Number)

Table Manipulation

Append Records

2D/3D
Parameters
Input
  • A, B, … (Table, Multiple)
Output
  • R (Table)
Control

Compact Columns

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control

Copy Column ID

2D/3D
Parameters
Input
  • A (Table)

  • B (Table)

Output
  • R (Table)
Control
  • RelatedColumns (ListModel)

Duplicate Column

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnName (Text)

  • NewColumnName (Text)

  • Unit (Text)

Join Records

2D/3D
Parameters
Input
  • A (Table)

  • B (Table)

Output
  • R (Table)
Control
  • JoinType (Number)

  • RelatedColumns (ListModel)

New Column ID

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • SelectedColumns (ListModel)

Shift Records

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • SelectedColumns (ListModel)

  • Shift (Number)

  • Mode (Number)

Statistics

Aggregate Columns

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnTitle (Text)

  • Aggregation (Number)

  • SelectedColumns (ListModel)

Binning

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • columnName (Text)

  • newColumnName (Text)

  • newColumnUnit (Text)

  • addEmptyBins (Number)

  • newColumnType (Text)

  • binning (ListModel)

Binning (simple)

2D/3D

Equidistant binning of numerical values

Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • min (Number)

  • max (Number)

  • count (Number)

  • source (Text)

  • label (Number)

  • name (Text)

Frequency Table

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control

Generate Distribution

2D/3D
Parameters
Input
Output
  • R (Table)
Control
  • Distribution (Number)

  • Param1 (Number)

  • Param2 (Number)

  • CDF (Number)

  • Begin (Number)

  • End (Number)

  • Step (Number)

  • ShowCRLow (Number)

  • CRLow (Number)

  • ShowCRHigh (Number)

  • CRHigh (Number)

  • ShowTestValue (Number)

  • TestValue (Number)

Statistics

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • Stats (ListModel)

UMAP

2D/3D

Reduces the selected input columns to a specified number of new components using UMAP (Uniform Manifold Approximation and Projection). UMAP is a general-purpose manifold learning and dimensionality reduction algorithm that preserves local neighborhood structure and is commonly used for visualization and feature compression. For details, see the UMAP project on GitHub.

UMAP dialog

  • Number of components: Number of output dimensions (new component columns).

  • Number of neighbours: Neighborhood size used to build the graph. Smaller = more local detail; larger = more global structure.

  • Minimal distance: How tightly points can be packed together. Lower = tighter clusters; higher = more spread out.

  • Metric: Distance used in the input space (e.g., euclidean, manhattan, cosine).

  • Additional parameters: Advanced UMAP options passed through to the backend (key–value overrides).

  • Column selection: Input columns used to compute UMAP (currently only numeric columns).

    Some metrics require extra settings (e.g., Minkowski needs parameter p). Specify them in Additional parameters, for example:

    {"metric_kwds": {"p": 1}}
Parameters
Input
  • A0 (Table)
Output
  • R0 (Table)
Control
  • mode (Number)

  • code (Text)

  • refresh (Number)

  • environmentDesc (Text)

  • outprocType (Number)

  • environmentName (Text)

  • outprocPath (Text)

  • editingOutsidePath (Text)

  • editingOutsideEnabled (Number)

  • pyParDefs (Text)

  • devModeKey (Text)

  • description (Text)

  • P0 (Number)

  • P1 (Number)

  • P2 (Number)

  • P3 (Text)

  • P4 (Text)

  • P5 (Text)

Statistical tests

ANOVA One-way

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • SampleColumnName (Text)

  • Confidence (Number)

F-test

2D/3D
Parameters
Input
  • A (Table)

  • B (Table)

Output
  • R (Table)
Control
  • SampleAColumnName (Text)

  • SampleBColumnName (Text)

  • Ratio (Number)

  • Confidence (Number)

  • Hypothesis (Number)

t-test 1s

2D/3D

One sample t-test

Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • SampleColumnName (Text)

  • Mean (Number)

  • Confidence (Number)

  • Hypothesis (Number)

t-test 2s pair

2D/3D

Two sample paired t-test

Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • SampleAColumnName (Text)

  • SampleBColumnName (Text)

  • Mean (Number)

  • Confidence (Number)

  • Hypothesis (Number)

t-test 2s unpair

2D/3D

Two sample unpaired t-test

Parameters
Input
  • A (Table)

  • B (Table)

Output
  • R (Table)
Control
  • SampleAColumnName (Text)

  • SampleBColumnName (Text)

  • Difference (Number)

  • Confidence (Number)

  • EqualVariances (Number)

  • Hypothesis (Number)

Z-factor

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ValuesColumnName (Text)

  • LabelsColumnName (Text)

  • NegativeLabel (Text)

  • PositiveLabel (Text)

  • CreateZFactorColumn (Number)

  • ZFactorTitle (Text)

Position

Addition

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • PosX0 (Text)

  • PosY0 (Text)

  • PosZ0 (Text)

  • PosX1 (Text)

  • PosY1 (Text)

  • PosZ1 (Text)

  • NewColumnName (Text)

  • Unit (Text)

Difference (vector)

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • PosX0 (Text)

  • PosY0 (Text)

  • PosZ0 (Text)

  • PosX1 (Text)

  • PosY1 (Text)

  • PosZ1 (Text)

  • NewColumnName (Text)

  • Unit (Text)

Distance

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • PosX0 (Text)

  • PosY0 (Text)

  • PosZ0 (Text)

  • PosX1 (Text)

  • PosY1 (Text)

  • PosZ1 (Text)

  • NewColumnName (Text)

  • Unit (Text)

Optimal path

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • PositionX (Text)

  • PositionY (Text)

Vector Length

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • VectorX (Text)

  • VectorY (Text)

  • VectorZ (Text)

  • NewColumnName (Text)

  • Unit (Text)

Vector Orientation

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • VectorX (Text)

  • VectorY (Text)

  • VectorZ (Text)

  • HeadingColumnName (Text)

  • ElevationColumnName (Text)

Stage Transformation

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • PosX (Text)

  • PosY (Text)

  • PosZ (Text)

  • NewColumnName (Text)

  • Unit (Text)

  • SrcFormat (Number)

  • DstFormat (Number)

Processing

Find Local Extrema

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnName (Text)

  • NewColumnName (Text)

  • Unit (Text)

  • Extrema (Number)

  • Threshold (Number)

Rolling Average

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnName (Text)

  • NewColumnName (Text)

  • Unit (Text)

  • Size (Number)

Rolling Median

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnName (Text)

  • NewColumnName (Text)

  • Unit (Text)

  • Size (Number)

Rolling Minimum

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnName (Text)

  • NewColumnName (Text)

  • Unit (Text)

  • Size (Number)

Rolling Maximum

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnName (Text)

  • NewColumnName (Text)

  • Unit (Text)

  • Size (Number)

Curve Fitting

Curve Fitting

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • IndepColName (Text)

  • DepColName (Text)

  • CurveType (Number)

  • CurveDegree (Number)

  • FilterCoefs (Number)

  • PValue (Number)

  • DispCoefs (Number)

  • DispPValue (Number)

  • DispR2 (Number)

  • DispEquation (Number)

  • DispFit (Number)

Dose Response

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • DoseColName (Text)

  • ResponseColName (Text)

  • Model (Number)

  • Bottom (Number)

  • Top (Number)

  • Hill (Number)

  • Symmetry (Number)

  • BottomFixed (Number)

  • TopFixed (Number)

  • HillFixed (Number)

  • SymmetryFixed (Number)

  • DisplayEquation (Number)

  • DisplayFit (Number)

  • DisplayEC50 (Number)

  • DisplayBottom (Number)

  • DisplayTop (Number)

  • DisplayHill (Number)

  • DisplaySymmetry (Number)

  • NameIC50 (Number)

  • TitleFit (Text)

  • TitleEquation (Text)

  • TitleEC50 (Text)

  • TitleBottom (Text)

  • TitleTop (Text)

  • TitleHill (Text)

  • TitleSymmetry (Text)

  • ZeroHandling (Number)

  • ZeroSubstitution (Number)

Gauss Mixture

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • IndepColName (Text)

  • DepColName (Text)

  • PeakCount (Number)

  • DispCoefs (Number)

  • DispEquation (Number)

  • DispEquationMulti (Number)

  • DispFit (Number)

Growth

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • TimeColName (Text)

  • ValueColName (Text)

  • InitValue (Number)

  • Plateau (Number)

  • TimeConstant (Number)

  • InitValueFixed (Number)

  • PlateauFixed (Number)

  • TimeConstantFixed (Number)

  • DisplayEquation (Number)

  • DisplayFit (Number)

  • DisplayInitValue (Number)

  • DisplayPlateau (Number)

  • DisplayTimeConstant (Number)

  • TitleEquation (Text)

  • TitleFit (Text)

  • TitleInitValue (Text)

  • TitlePlateau (Text)

  • TitleTimeConstant (Text)

Detect

DBSCAN

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • NewColumnName (Text)

  • XColumn (Text)

  • YColumn (Text)

  • Epsilon (Number)

  • NeighbourCount (Number)

Grid Points

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • XColumn (Text)

  • YColumn (Text)

  • PointCheck (Number)

  • LineCheck (Number)

  • LineSize (Number)

  • CornerCheck (Number)

  • CornerSize (Number)

Parse Well Name

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • WellNameColumn (Text)

Object ML Classifier

2D/3D

The node classifies objects in a table based on their measured features.

Object AI classifier dialog

Available classifiers:

  • Nearest neighbour
  • Bayes
  • Neural network
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • classColumnName (Text)

  • classifier (Text)

  • classes (Text)

  • trainingData (Text)

  • model (Text)

Object Rule Classifier

2D/3D

This node assigns a class to each object in a table by evaluating its measured features against user-defined rules.

To use it, connect the node to a table that contains an ObjectId column (required to visualize the colored binary layer) and the measured feature columns, for example a table produced by the Object Measurement node. In the node’s settings, define the classes you want to use and specify the rule conditions for each class based on the feature values. Classes are evaluated in the order they are listed, so if an object matches more than one class, it is assigned to the first matching class. If an object does not match any class rules, it is assigned to the base (default) class.

To visualize the result, connect the output table together with the corresponding binary layer to the Color by Value node, then in the Color by Value GUI choose the class column as the source column.

Object rule classifier dialog

Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • classColumnName (Text)

  • baseClassName (Text)

  • baseClassColor (Text)

  • classes (Text)

TMA Dearraying

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • XColumn (Text)

  • YColumn (Text)

  • SkipGaps (Number)

  • Meander (Number)

  • Corner (Number)

  • Orientation (Number)

Values Run

2D/3D

Detect Run of Like Values

Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnName (Text)

  • IndexColumnName (Text)

  • NewColumnName (Text)

Sequences

Difference

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnName (Text)

  • NewColumnName (Text)

  • LoopName (Text)

  • Unit (Text)

  • FirstRow (Number)

  • NULL (Number)

Integrate

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnName (Text)

  • NewColumnName (Text)

  • LoopName (Text)

  • Unit (Text)

  • Constant (Number)

  • NULL (Number)

Position Difference

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnNameX (Text)

  • ColumnNameY (Text)

  • ColumnNameZ (Text)

  • NewColumnName (Text)

  • LoopName (Text)

  • Unit (Text)

  • FirstRow (Number)

  • NULL (Number)

Position Integrate

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnNameX (Text)

  • ColumnNameY (Text)

  • ColumnNameZ (Text)

  • NewColumnName (Text)

  • LoopName (Text)

  • Unit (Text)

  • Constant (Number)

  • NULL (Number)

High Pass Filter

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnName (Text)

  • NewColumnName (Text)

  • LoopName (Text)

  • Unit (Text)

  • Alpha (Number)

  • NULL (Number)

Low Pass Filter

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • ColumnName (Text)

  • NewColumnName (Text)

  • LoopName (Text)

  • Unit (Text)

  • Alpha (Number)

  • NULL (Number)

Sequence (Int)

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • NewColumnName (Text)

  • LoopName (Text)

  • Unit (Text)

  • Start (Number)

  • Step (Number)

Sequence (Exp)

2D/3D
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • NewColumnName (Text)

  • LoopName (Text)

  • Unit (Text)

  • Start (Number)

  • Factor (Number)

Python

Create Column

2D/3D

Define new columns in the upper table by specifying their name, type, and unit.

Python create column

Fill the out DataFrame with the calculated data. Use the print() function to reveal any variable.

The example shows k-means object classification using scikit-learn.

import pandas as pd
import numpy as np
from sklearn.cluster import KMeans
from sklearn.preprocessing import StandardScaler

# take only the float columns
df_float64 = df.select_dtypes(include=["Float64"])

# scale the input
df_float64[ [ct("A:BinMeanOfBlue"), ct("A:BinMeanOfGreen"), ct("A:BinMeanOfRed") ] ] *= 5.0

print(df_float64.head())

X = df_float64.values

# Scale after weighting
scaler = StandardScaler()
scaled_features = scaler.fit_transform(X)

# Apply K-means clustering
kmeans = KMeans(n_clusters=4, random_state=42, n_init=10)

#set the output dataset
out["Pollen_Class"] = kmeans.fit_predict(X)

Accessing columns in df
Input columns in pandas dataframe are accessed by their titles. Column titles may change during GA3 editing or because input channels use different names. If you access columns using plain strings, these changes can break your script and cause it to look for non-existing columns.

To make column references robust, always use the ct(...) helper instead of raw strings. For example, replace df["Area"] with df[ct("A:Area")], where A refers to table input name and Area is the column title.

def ct(title: str) -> str:
    return title.split(":", 1)[1] if ":" in title else title

The helper ct("A:Area") returns only "Area" to Python, but the full "A:Area" string is stored in the workflow and tracked by the GA3 editor. As consequence, if you rename the column in the GUI (for example AreaObject area), the editor knows which column and table A:Area referred to and automatically updates it to A:Object area. Your script keeps working without any manual changes.

To quickly insert a column reference into the code editor, click the table button in the top toolbar and select the desired column from the list. The column title will be inserted in the form ct("Table:ColumnTitle").

Use LLMs with Python nodes

It is possible to ask large language models (LLMs) like ChatGPT, Gemini or Copilot to generate python code that will calculate the content of the column. To simplify the interaction with the LLMs there is a button Copy prompt for a LLM which prepares a prompt ready to be pasted into the LLMs. The user has to replace the <USER TASK HERE>. At the end pof the prompt:

Task (provided by the user):
ENTER YOUR QUESTION HERE

Note that it is a good practice to create a new chat for the prompt so that it doesn’t share context with unrelated conversation.

The answer should contain two parts as shown in the example:

  1. JSON with new columns definition - copy it and Paste columns from LLM and
  2. copy and paste the python code – replace it: Ctrl+A, Ctrl+V
Example of feature reduction (movie)
In the movie we show how to interact with the LLMs. Asking it to reduce the number of features.

Task (provided by the user):
Reduce the number of features to 2 in order to visualize the data in 2D scatterplot.
Ignore non-feature columns like Entity or Object ID.


Example of unsupervised classification
When the following question is added to the generated prompt:

Task (provided by the user):
Classify the objects into two classes.


The ChatGPT 4o outputs following column definition and code:

[
  {"name": "ClassLabel", "type": "int", "unit": null}
]
import pandas as pd
import numpy as np
from sklearn.cluster import KMeans

# Start from an empty frame with the same index
out = pd.DataFrame(index=df.index)

# Select numeric features for clustering (excluding IDs and categorical fields)
features = [
    "Area", "EqDiameter", "Perimeter", "Length", "Width", "MaxFeret", "MinFeret",
    "Circularity", "Elongation", "MeanIntensityEGFP", "MeanIntensityTD",
    "SumIntensityEGFP", "SumIntensityTD"
]

# Prepare data: drop rows with missing values in the selected features
valid_mask = df[features].notna().all(axis=1)
X = df.loc[valid_mask, features].astype("float64")

# Perform KMeans clustering into 2 classes
kmeans = KMeans(n_clusters=2, n_init="auto", random_state=42)
labels = pd.Series(kmeans.fit_predict(X), index=X.index).astype("Int64")

# Create the output column and fill with cluster labels, keeping <NA> where data was insufficient
out["ClassLabel"] = pd.Series(pd.NA, index=df.index, dtype="Int64")
out.loc[labels.index, "ClassLabel"] = labels
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • newColumns (ListModel)

  • code (Text)

  • columnCache (Text)

See also: Python

Create Table

2D/3D

Define new columns or copy them from the source tables in the upper table by specifying their name, type, and unit. Copying columns keeps their ID and Metadata.

Python create table

Fill the out DataFrame with the calculated data. Use the print() function to reveal any variable.

The example shows an inner join of two object tables tables:

  • Table A: all columns from results of object measurements with one row per object and
  • Table B: “Value” and “Frequency” from results of object pixel histogram with 16 rows per each object

on columns ("TimeLapseIndex", "Entity", "ObjectId").

Same columns (having same name) are taken from the left table (“Table A”) with the suffixes parameter.

See Pandas documentation for the merge() function.

import pandas as pd
import numpy as np

# predefined globals:
# df: tuple[pd.DataFrame] with the input tables for "Table A", "Table B", ...
# mdf: tuple[pd.DataFrame] with the input column metadata table for "Table A", "Table B", ...
# out: pd.DataFrame with the new output table

print("Table A:", df[0].columns)
print("Table B:", df[1].columns)

out = pd.merge(*df, on=("TimeLapseIndex", "Entity", "ObjectId"), suffixes=("", None))
Accessing columns in pandas dataframe
To see how to make column access more robust for later editing, see the Create Column

For even more programmatic approach without having to define the columns in the Dialog use the Python generic node.

Use LLMs with Python nodes

It is possible to ask large language models (LLMs) like ChatGPT, Gemini or Copilot to generate python code for a scientific question. To simplify the interaction with the LLMs there is a button Copy prompt for a LLM which prepares a prompt ready to be pasted into the LLMs. The user has to append only the question.

Note that it is a good practice to create a new chat for the prompt so that it doesn’t share context with unrelated conversation.

The answer should contain two parts as shown in the example:

  1. JSON with new columns definition - copy it and Paste columns from LLM and
  2. copy and paste the python code – replace it: Ctrl+A, Ctrl+V

When the following question was given:

Task: I want to find out if there is one or more classes in the input table based on the coefficient of diffusion (CD). Calculate the CD from MSDs. Note that one TrackId has more than one row. Can you help me with that?

The python create table is connected to the MSD table in the Single particle tracking example as follows:

Ga3 graph

Thought for 1m 13s

ChatGPT 5 produced following answer:

[
  {"name": "Entity", "type": "text", "unit": null},
  {"name": "TrackId", "type": "int", "unit": null},
  {"name": "PointsUsed", "type": "int", "unit": null},
  {"name": "CD", "type": "number", "unit": "µm²/s"},
  {"name": "CD_SE", "type": "number", "unit": "µm²/s"},
  {"name": "R2_Origin", "type": "number", "unit": null},
  {"name": "NumClasses", "type": "int", "unit": null},
  {"name": "ClassLabel", "type": "int", "unit": null},
  {"name": "ClassMeanCD", "type": "number", "unit": "µm²/s"},
  {"name": "ClassCount", "type": "int", "unit": null},
  {"name": "BIC_Best", "type": "number", "unit": null}
]

Python code is too long (150 lines) to reproduce here.

Python Create table
Python Create table node with ChatGPT generated code

From the CD per track it is clear that there is only one class:

Ga3 graph
Resulting table with per track CD fits and classes

Parameters
Input
  • A, B, … (Table, Multiple)
Output
  • R (Table)
Control
  • tableDefinition (ListModel)

  • code (Text)

  • columnCache (Text)

See also: Python

JavaScript

JS Create Column

2D/3D
Advanced

NOTE: This node is deprecated in favor of the Python Create Column node.

Define one or more new columns and calculate its data using JavaScript.

JSCreateColumn

In the upper table, you can define new columns by specifying their name, type, and unit.

To reference columns from the input table in your JavaScript code, simply click the button with the column name. This will insert a variable declaration with the appropriate column index. For example, clicking on the ZStackIndex column will insert:

var ZStackIndexIndex = tableA.colIndexById("_loopZStackIndex"); //ZStackIndex

This variable holds the index of the input column and can be used to access its values in your script, e.g.:

var tableA = new Table(context.tableForParameter(node.child("A")));
var a = tableA.data;
var ig = tableA.rowsToGroupRows;

var ZStackIndexIndex = tableA.colIndexById("_loopZStackIndex"); //ZStackIndex

function newItemForRow(i) {
   return a[ZStackIndexIndex][i];
}

Input table is already accessible as tableA variable of Table class.

The Table class wraps the input table data and metadata. It provides methods to access columns, rows, groupings, and statistics.

Methods and properties of the Table class

Properties

  • tableName: string Name of the table.

  • tableMetadata: object` Full metadata of the table.

  • colIdList: string[] List of internal column IDs.

  • colTitleList: string[] Visible column titles.

  • colMetadataList: object[] Metadata for each column.

  • data: any[][] Column-major 2D array of values.

  • dataRowList: any[][] Transposed version for row-wise access.

  • colCount: number Total number of columns.

  • rowCount: number Total number of rows.


Column Lookup

  • colIndexById(id: string): number

  • colIndexByTitle(title: string): number

  • colIndexByFeature(feature: string): number

  • colIndexByFullText(text: string): number Looks up a column by ID, title, or both.

  • matchColsFulltext(param: string | RegExp | string[]): number[] Returns indices of matching columns.


Grouping & Sorting

  • groupedBy: number[] Indices of columns used for grouping.

  • orderedBy: number[] Indices of columns used for sorting.

  • groups: number[][] List of row indices grouped by column values.

  • rowsToGroupIds: number[] For each row, the corresponding group ID.

  • rowsToGroupRows: number[] For each row, its index within its group.


Column Info Access

  • colIdAt(index: number): string

  • colMetadataAt(index: number): object

  • colTitleAt(index: number): string

  • colUnitAt(index: number): string

  • colTitleAndUnitAt(index: number, sep = " "): string

  • colDecltypeAt(index: number): string

  • colIsNumericAt(index: number): boolean

  • listColIds(filter?: (id: string) => boolean): string[]

  • listIdentColIds(): string[]


Column Data & Stats

  • colDataAt(index: number): any[] Returns raw values from the specified column.

  • colDataStatsAt(index: number, stats: string[]): (number | null)[] Returns requested statistics:

    • "total" – all values including nulls
    • "count" – non-null values
    • "sum", "mean", "min", "max"
    • "stdev" – standard deviation

For each table row function newItemForRow(i) is called. It expects to return either single value or array. If you have defined multiple columns in upper table it expects to return array only.

Creating column with indices of rows

GA3 JavaScript Editor
1
2
3
function newItemForRow(i) {
   return i;
}

Creating column with indices of rows per group

GA3 JavaScript Editor
1
2
3
4
5
6
var tableA = new Table(context.tableForParameter(node.child("A")));
var ig = tableA.rowsToGroupRows;

function newItemForRow(i) {
   return ig[i];
}

Creating column with time delta

GA3 JavaScript Editor
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
var tableA = new Table(context.tableForParameter(node.child("A")));

//insert here your own time column index (by clicking column button above code editor)
var TimeIndex = tableA.colIndexById("ColumnId");

var times = tableA.data[TimeIndex]

function newItemForRow(i) {
   return (i==0) ? null : times[i] - times[i-1];
}

Creating column with cumulative sum

GA3 JavaScript Editor
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
var tableA = new Table(context.tableForParameter(node.child("A")));

//insert here your own column index (by clicking column button above code editor)
var ColumnIndex = tableA.colIndexById("ColumnId");

var columnData = tableA.data[ColumnIndex];
var sum = 0;

function newItemForRow(i) {
   sum += columnData[i];
   return sum;
}

Creating column with mean of column data

GA3 JavaScript Editor
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
var tableA = new Table(context.tableForParameter(node.child("A")));

//insert here your own time column index (by clicking column button above code editor)
var ColumnIndex = tableA.colIndexById("ColumnId");

var columnData = tableA.data[ObjectIdIndex];
var mean = MathApi.mean(columnData);

function newItemForRow(i) {
   return mean;
}

Creating column with group mean of column data

GA3 JavaScript Editor
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
var tableA = new Table(context.tableForParameter(node.child("A")));
var rowsToGroupIds = tableA.rowsToGroupIds;
var groups = tableA.groups;

//insert here your own time column index (by clicking column button above code editor)
var ColumnIndex  = tableA.colIndexById("ColumnId");

var columnData = tableA.data[ColumnIndex ];

var means = [];
for(let i=0; i<groups.length; i++) {
    let groupData = groups[i].map(idx => columnData[idx]);
    means.push(MathApi.mean(groupData));
}

function newItemForRow(i) {
   return means[rowsToGroupIds[i]];
}
Parameters
Input
  • A (Table)
Output
  • R (Table)
Control
  • newColumns (ListModel)

  • jsCode (Text)

JS Create Table

2D/3D
Advanced

NOTE: This node is deprecated in favor of the Python Create Table node.

Creates a new table by combining one or more existing tables (table inputs A, B, …). All output table columns must be defined in the node dialog column list table:

JSCreateTable

The code contains a quick reference of predefined variables:

GA3 JavaScript Editor
1
2
3
4
5
6
7
8
// a, b, ... - input tables (use a[col][row])
// ag, bg, ... - grouped input tables (use ag[group][col][rowingroup])

// _?T - time-lapse loop column index
// _?Z - z-stack loop column index
// _?M - multi-point loop column index
// _?0..._?N - column indexes after loop columns
// where ? should be replaced by a, b, ... for input table

The expected output is the data of the new table (an array of arrays columns x rows). The number of columns must match the number of defined columns. And the number of rows must be equal for all columns.

Parameters
Input
  • A, B, … (Table, Multiple)
Output
  • R (Table)
Control
  • tableDefinition (ListModel)

  • javaScriptCode (Text)