Are negative scale values allowed? (schema says > 0, prose says non-zero)

Open
#637 4 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
52/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Read the coordinate transformations schema lines 192–197 and the prose in index.md lines 836–837, then review the two issue comments for the intended meaning of scale. Decide whether negative values are valid and align the schema and prose accordingly. Done when both sources state the same rule for scale values.

Written by the indexing model from the issue text.

Description

0.6 post-release patch bug
Describe the issue

just wanted to clarify the intent for scale values in 0.6.

The schema requires every value to be strictly positive (coordinate_transformations.schema#L192-L197):

"items": {"type": "number", "exclusiveMinimum": 0}

but the prose only says:

https://github.com/ome/ngff-spec/blob/89da1da5b0491f83b7cdde7d123aef763a457029/index.md#L836-L837

which (to me) reads as allowing negative values (i.e. axis flips), since those are invertible too. (The 0.5 schema had no constraint on the values at all.)

Are negative scales meant to be valid in 0.6? If so, I guess the schema should be "not": {"const": 0} (or unconstrained, since the prose only says SHOULD)... and if not, the prose should probably say "MUST be greater than zero".

(fwiw, at least one implementation has already started writing flips as affine just to satisfy the schema: neuroscales/brainhops#433)

Dominant language
Python
Stars
180
Forks
81
Avg merge
5d 7h
Merged PRs (30d)
9

Getting set up

  • No Dockerfile or Docker Compose file
  • No pull request template
  • Read the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ome/ngff

All issues in ome/ngff

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.