Skip to content

State does not persist when xarray dimension name is a not valid Neuroglancer dimension name #900

@mkitti

Description

@mkitti

I have Zarr data generated via xarray.Dataarray.to_zarr. This includes the units in brackets: "xpix [µm]".

While Neuroglancer can view this data initially, it seems unable to serialize this state properly in the URL. Refreshing, sharing the URL from the address bar, or copying the JSON state fails to reproduce the state.

After testing I determined that Neuroglancer considers both the brackets and the µ as illegal characters.

{
  "shape": [
    5370,
    9,
    180,
    180
  ],
  "data_type": "int16",
  "chunk_grid": {
    "name": "regular",
    "configuration": {
      "chunk_shape": [
        32,
        9,
        45,
        45
      ]
    }
  },
  "chunk_key_encoding": {
    "name": "default",
    "configuration": {
      "separator": "/"
    }
  },
  "fill_value": 0,
  "codecs": [
    {
      "name": "bytes",
      "configuration": {
        "endian": "little"
      }
    },
    {
      "name": "zstd",
      "configuration": {
        "level": 0,
        "checksum": false
      }
    }
  ],
  "attributes": {},
  "dimension_names": [
    "volumes [s]",
    "planes [µm]",
    "xpix [µm]",
    "ypix [µm]"
  ],
  "zarr_format": 3,
  "node_type": "array",
  "storage_transformers": []
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions