Skip to content

Support scalar power in DataCube apply mode - #990

Open
Duo-ee wants to merge 1 commit into
Open-EO:masterfrom
Duo-ee:codex/power-apply-mode
Open

Duo-ee wants to merge 1 commit into
Open-EO:masterfrom
Duo-ee:codex/power-apply-mode

Conversation

@Duo-ee

@Duo-ee Duo-ee commented Dec 1, 2026

Copy link
Copy Markdown

Fixes #537.

Calling cube ** 2.01 or cube.power(2.01) on the loaded ERA5 cube from the issue raises Must be in band math mode already. Both forms now generate an apply callback with the power process. Reflected expressions such as 2 ** cube place the cube value in the exponent argument. A chained expression reuses the existing callback and preserves its context and cube metadata.

All eight new regression cases fail on master and pass with this change. The DataCube and process builder suites passed 920 tests with two skips. Independent graph checks covered parameterized and reflected powers, chained expressions and existing band math. Validation was local to the client. Pre-commit passed on the three changed files.

Codex authored the patch and regression tests, ran validation, and prepared this description.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Math on all values throws error

1 participant