JuliaArrays / JuliaArrays/AxisArrays.jl

Convenience function for setting axis units

Open
#72 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
207
Forks
41
PR merge metrics
No merged PRs in 30d

Description

Is there any interest in having a convenience function for setting units for an existing Axis or AxisArray that is currently unitless? I found this useful when loading someone else's NRRD image using NRRD.jl. With this format it seems common to save images with meaningful spacings but without units, and units are basically communicated by word of mouth since the format doesn't standardize them anyway. I've been manually re-creating the axes after I load the images and am looking for something more convenient. Am I missing something in the API? What if we overload arithmetic like this?

using AxisArrays, Unitful
ax = Axis{:x}(linspace(0,10,11))
ax *= Unitful.μm

Contributor guide

No contributing guide indexed for this repository

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

Review the existing Axis and AxisArray API alongside the Unitful integration mentioned in the issue. Compare the manual axis-recreation workflow and clarify whether the desired behavior is a convenience function, arithmetic overload, or both; completion should include an agreed API and tests for assigning units to unitless axes.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.