Files
tono/docs/nodes/Cross-Correlate.md

29 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Cross-Correlate
Compute 2D cross-correlation between two fields. The correlation peak indicates the offset where the two fields best match. Useful for drift measurement and feature alignment. Equivalent to Gwyddion crosscor.c.
## Inputs
| Name | Type | Required | Description |
|------|------|----------|-------------|
| field_a | DATA_FIELD | Yes | First input field |
| field_b | DATA_FIELD | Yes | Second input field |
## Outputs
| Name | Type | Description |
|------|------|-------------|
| correlation | DATA_FIELD | Cross-correlation map |
## Controls
| Name | Type | Default | Description |
|------|------|---------|-------------|
| mode | dropdown | same | Output size: full (Na+Nb1), same (same as field_a), or valid (overlapping region only) |
| normalize | BOOLEAN | True | Normalize the result to [1, 1] by dividing by the product of RMS values |
## Notes
- Both fields must be of compatible numpy array types; very different sizes in full mode produce large outputs.
- Mean is subtracted before correlation; absolute offset information is lost.