Skip to content

feat: Add some more (astro)angle aliases - #229

Merged
MilesCranmer merged 1 commit into
JuliaPhysics:mainfrom
icweaver:astroangles
Jul 10, 2026
Merged

MilesCranmer merged 1 commit into
JuliaPhysics:mainfrom
icweaver:astroangles

Conversation

@icweaver

Copy link
Copy Markdown
Contributor

Howdy, this adds a ° alias for deg, along with additional astro friendly aliases: mas for marcsec, and μas/uas for μarcsec.

Happy to take those out if it doesn't fit the design philosophy here, but just wanted to check first, thanks!

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark Results (Julia v1.10)

Time benchmarks
main 88d363b... main / 88d363b...
Quantity/creation/Quantity(x) 2.79 ± 0.01 ns 3.41 ± 0.001 ns 0.821 ± 0.0029
Quantity/creation/Quantity(x, length=y) 3.41 ± 0.01 ns 3.1 ± 0.01 ns 1.1 ± 0.0048
Quantity/with_numbers/*real 2.79 ± 0.01 ns 3.1 ± 0.01 ns 0.903 ± 0.0044
Quantity/with_numbers/^int 7.74 ± 2.2 ns 8.05 ± 2.2 ns 0.962 ± 0.37
Quantity/with_numbers/^int * real 8.67 ± 2.2 ns 8.36 ± 2.2 ns 1.04 ± 0.37
Quantity/with_quantity/+y 4.04 ± 0.01 ns 4.04 ± 0.001 ns 1 ± 0.0025
Quantity/with_quantity//y 3.1 ± 0.01 ns 3.1 ± 0.01 ns 1 ± 0.0046
Quantity/with_self/dimension 2.79 ± 0.01 ns 3.1 ± 0.01 ns 0.903 ± 0.0044
Quantity/with_self/inv 3.41 ± 0.01 ns 3.11 ± 0.01 ns 1.1 ± 0.0048
Quantity/with_self/ustrip 2.79 ± 0.01 ns 2.79 ± 0 ns 1 ± 0.0036
QuantityArray/broadcasting/multi_array_of_quantities 0.14 ± 0.003 ms 0.143 ± 0.0022 ms 0.978 ± 0.025
QuantityArray/broadcasting/multi_normal_array 0.0531 ± 0.0031 ms 0.0528 ± 0.003 ms 1.01 ± 0.082
QuantityArray/broadcasting/multi_quantity_array 0.157 ± 0.0011 ms 0.155 ± 0.00075 ms 1.01 ± 0.0088
QuantityArray/broadcasting/x^2_array_of_quantities 25.2 ± 2.8 μs 25.1 ± 2.1 μs 1.01 ± 0.14
QuantityArray/broadcasting/x^2_normal_array 5.11 ± 0.64 μs 5.22 ± 0.67 μs 0.979 ± 0.18
QuantityArray/broadcasting/x^2_quantity_array 6.97 ± 0.37 μs 6.95 ± 0.26 μs 1 ± 0.065
QuantityArray/broadcasting/x^4_array_of_quantities 0.0816 ± 0.00066 ms 0.0816 ± 0.00055 ms 0.999 ± 0.011
QuantityArray/broadcasting/x^4_normal_array 0.0498 ± 0.00021 ms 0.0468 ± 0.0031 ms 1.06 ± 0.07
QuantityArray/broadcasting/x^4_quantity_array 0.05 ± 0.00021 ms 0.053 ± 0.0027 ms 0.943 ± 0.047
time_to_load 0.21 ± 0.00045 s 0.212 ± 0.005 s 0.989 ± 0.024
Memory benchmarks
main 88d363b... main / 88d363b...
Quantity/creation/Quantity(x) 0 allocs: 0 B 0 allocs: 0 B
Quantity/creation/Quantity(x, length=y) 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_numbers/*real 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_numbers/^int 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_numbers/^int * real 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_quantity/+y 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_quantity//y 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_self/dimension 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_self/inv 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_self/ustrip 0 allocs: 0 B 0 allocs: 0 B
QuantityArray/broadcasting/multi_array_of_quantities 2 allocs: 0.382 MB 2 allocs: 0.382 MB 1
QuantityArray/broadcasting/multi_normal_array 2 allocs: 0.0763 MB 2 allocs: 0.0763 MB 1
QuantityArray/broadcasting/multi_quantity_array 2 allocs: 0.0763 MB 2 allocs: 0.0763 MB 1
QuantityArray/broadcasting/x^2_array_of_quantities 2 allocs: 0.382 MB 2 allocs: 0.382 MB 1
QuantityArray/broadcasting/x^2_normal_array 2 allocs: 0.0763 MB 2 allocs: 0.0763 MB 1
QuantityArray/broadcasting/x^2_quantity_array 2 allocs: 0.0763 MB 2 allocs: 0.0763 MB 1
QuantityArray/broadcasting/x^4_array_of_quantities 2 allocs: 0.382 MB 2 allocs: 0.382 MB 1
QuantityArray/broadcasting/x^4_normal_array 2 allocs: 0.0763 MB 2 allocs: 0.0763 MB 1
QuantityArray/broadcasting/x^4_quantity_array 2 allocs: 0.0763 MB 2 allocs: 0.0763 MB 1
time_to_load 0.153 k allocs: 14.5 kB 0.153 k allocs: 14.5 kB 1

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark Results (Julia v1)

Time benchmarks
main 88d363b... main / 88d363b...
Quantity/creation/Quantity(x) 2.79 ± 0.01 ns 2.79 ± 0.01 ns 1 ± 0.0051
Quantity/creation/Quantity(x, length=y) 3.41 ± 0.01 ns 3.1 ± 0.01 ns 1.1 ± 0.0048
Quantity/with_numbers/*real 3.41 ± 0.01 ns 3.1 ± 0.01 ns 1.1 ± 0.0048
Quantity/with_numbers/^int 12.1 ± 0.99 ns 12.1 ± 1 ns 1 ± 0.12
Quantity/with_numbers/^int * real 11.9 ± 1 ns 11.8 ± 1 ns 1.01 ± 0.12
Quantity/with_quantity/+y 4.04 ± 0.001 ns 4.04 ± 0.001 ns 1 ± 0.00035
Quantity/with_quantity//y 3.41 ± 0.01 ns 3.11 ± 0.001 ns 1.1 ± 0.0032
Quantity/with_self/dimension 3.1 ± 0.01 ns 2.79 ± 0.009 ns 1.11 ± 0.0051
Quantity/with_self/inv 3.1 ± 0.01 ns 3.1 ± 0.01 ns 1 ± 0.0046
Quantity/with_self/ustrip 2.79 ± 0.01 ns 3.1 ± 0 ns 0.903 ± 0.0032
QuantityArray/broadcasting/multi_array_of_quantities 0.109 ± 0.0045 ms 0.112 ± 0.0047 ms 0.973 ± 0.057
QuantityArray/broadcasting/multi_normal_array 0.0471 ± 0.0003 ms 0.0471 ± 0.00032 ms 1 ± 0.0093
QuantityArray/broadcasting/multi_quantity_array 0.05 ± 0.00059 ms 0.0529 ± 0.0029 ms 0.946 ± 0.053
QuantityArray/broadcasting/x^2_array_of_quantities 23.1 ± 7.8 μs 22.9 ± 7.9 μs 1.01 ± 0.49
QuantityArray/broadcasting/x^2_normal_array 2.33 ± 1.5 μs 2.33 ± 1.8 μs 1 ± 1
QuantityArray/broadcasting/x^2_quantity_array 3.59 ± 0.8 μs 3.54 ± 0.81 μs 1.01 ± 0.32
QuantityArray/broadcasting/x^4_array_of_quantities 0.0815 ± 0.0011 ms 0.0813 ± 0.0033 ms 1 ± 0.043
QuantityArray/broadcasting/x^4_normal_array 0.0435 ± 0.00022 ms 0.0435 ± 0.00016 ms 1 ± 0.0063
QuantityArray/broadcasting/x^4_quantity_array 0.0437 ± 0.0002 ms 0.0529 ± 0.00019 ms 0.825 ± 0.0048
time_to_load 0.19 ± 0.004 s 0.187 ± 0.0022 s 1.02 ± 0.025
Memory benchmarks
main 88d363b... main / 88d363b...
Quantity/creation/Quantity(x) 0 allocs: 0 B 0 allocs: 0 B
Quantity/creation/Quantity(x, length=y) 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_numbers/*real 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_numbers/^int 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_numbers/^int * real 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_quantity/+y 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_quantity//y 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_self/dimension 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_self/inv 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_self/ustrip 0 allocs: 0 B 0 allocs: 0 B
QuantityArray/broadcasting/multi_array_of_quantities 3 allocs: 0.382 MB 3 allocs: 0.382 MB 1
QuantityArray/broadcasting/multi_normal_array 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
QuantityArray/broadcasting/multi_quantity_array 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
QuantityArray/broadcasting/x^2_array_of_quantities 3 allocs: 0.382 MB 3 allocs: 0.382 MB 1
QuantityArray/broadcasting/x^2_normal_array 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
QuantityArray/broadcasting/x^2_quantity_array 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
QuantityArray/broadcasting/x^4_array_of_quantities 3 allocs: 0.382 MB 3 allocs: 0.382 MB 1
QuantityArray/broadcasting/x^4_normal_array 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
QuantityArray/broadcasting/x^4_quantity_array 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
time_to_load 0.145 k allocs: 11 kB 0.145 k allocs: 11 kB 1

@codecov

codecov Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.16%. Comparing base (5eef719) to head (88d363b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #229   +/-   ##
=======================================
  Coverage   99.16%   99.16%           
=======================================
  Files          23       23           
  Lines        1320     1320           
=======================================
  Hits         1309     1309           
  Misses         11       11           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MilesCranmer

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 88d363b1ef

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@MilesCranmer MilesCranmer left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too. I think it's a useful symbol to have work out of the box.

@MilesCranmer
MilesCranmer merged commit 3d6b8ef into JuliaPhysics:main Jul 10, 2026
7 checks passed
@icweaver
icweaver deleted the astroangles branch July 10, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants