scverse / scverse/spatialdata

Respect xarray coordinates for ImageContainers

Open
#723 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

method: transforms 🔃
Dominant language
Python
Stars
394
Forks
95
Avg merge
4d 3h
Merged PRs (30d)
7

Description

Is your feature request related to a problem? Please describe.
Currently, if I parse an xarray DataArray into an image container, the coordinates are overwritten with pixel coordinates even if I do not specify a transformation.

Describe the solution you'd like
Transfer over the xarray coordinates from the initial xarray into the spatialdata object

Describe alternatives you've considered
It is possible (but annoying) to construct a transformation object from my coordinate list and feed that into the constructor.

Additional context
I'm using spatialdata-0.2.3
Thanks!

Contributor guide

Open 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.

Research direction

Trace how an xarray DataArray is parsed into an ImageContainer and how the constructor creates the spatialdata object. Verify the behavior when no transformation is supplied, then add coverage showing that the original xarray coordinates are transferred instead of being replaced by pixel coordinates.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.