Skip to content

RFC5 - explain usage of arraycoordinatesystems arrayCoordinateSystem #438

@jo-mueller

Description

@jo-mueller

In the current (approved) RFC5 proposal, users can specify so-called array coordinate systems to state explicitly that an array is to be interpreted in pixel coordinates by transformations rather than physical coordinates:

{
  "arrayCoordinateSystem" : {
    "name" : "myDataArray",
    "axes" : [
      {"name": "dim_0", "type": "array"},
      {"name": "dim_1", "type": "array"},
      {"name": "dim_2", "type": "array"}
    ]
  }
}

...which would mean, that a list of coordinate systems could end up looking like this:

{
  "coordinateSystems": [
    {
      "name": "some_coordinate_system",
      "axes":  [...],
    },
    {
      "arrayCoordinateSystem" : {
        "name" : "myDataArray",
        "axes" : [
          {"name": "dim_0", "type": "array"},
          {"name": "dim_1", "type": "array"},
          {"name": "dim_2", "type": "array"}
        ]
      }
    }
  ]
}

I could imagine that nesting a separate object into this list makes validation harder. I ran some validation tests with the schemas over at ome/ngff-spec#67 and added a check in the schemas so that axes in a coordinate system must satisfy either of these conditions:

  • between two or three axes of type "space"
  • more than two axes of type "array"

which I think should be a good enough discriminator between a regular coordinate system and an array coordinate system.

In the spec text, I think we'd only need to adjust the example under array coordinate systems and remove (or shorten) this statement:

The name and axes names MAY be customized by including a arrayCoordinateSystem field in the user-defined attributes of the array whose value is a coordinate system object. The length of axes MUST be equal to the dimensionality. The value of "type" for each object in the axes array MUST equal "array".

cc @dstansby @will-moore @bogovicj

Edit Recent comment on RFC5

In the recently submitted comment on RFC, one of the major addressed points is the location and purpose of arrayCoordinateSystems. Upon more discussion with @bogovicj , I think I've grasped it - see my explanation below

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions