Files
tono/docs/nodes/Entropy.md

29 lines
923 B
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.
# Entropy
Compute the Shannon entropy of the height or slope distribution. H = −Σ p·ln(p). Equivalent to Gwyddion entropy.c.
## Inputs
| Name | Type | Required | Description |
|------|------|----------|-------------|
| field | DATA_FIELD | Yes | Input field |
## Outputs
| Name | Type | Description |
|------|------|-------------|
| entropy | FLOAT | Shannon entropy in nats |
| normalised_entropy | FLOAT | Entropy divided by ln(n_bins), in [0, 1] |
## Controls
| Name | Type | Default | Description |
|------|------|---------|-------------|
| mode | dropdown | height values | Compute entropy of height values or slope magnitude |
| n_bins | INT | 256 | Number of histogram bins for probability estimation (161024) |
## Notes
- Entropy is sensitive to n_bins; very few bins underestimate entropy while very many bins overestimate it for small fields.
- Non-finite pixel values are removed before binning.