Skip to content

Add simultaneous physical and unit conversion#224

Merged
kyleaoman merged 6 commits intomasterfrom
to_physical_value
Apr 17, 2025
Merged

Add simultaneous physical and unit conversion#224
kyleaoman merged 6 commits intomasterfrom
to_physical_value

Conversation

@kyleaoman
Copy link
Member

Closes #223

It makes sense to support <cosmo_array>.to_comoving_value(<units>) and <cosmo_array>.to_physical_value(<units>) instead of needing to resort to <cosmo_array>.to_physical().to_value(<units>) and <cosmo_array>.to_comoving().to_value(<units>). Very straightforward implementation, and I've added a mention to the narrative docs, and a new test.

@kyleaoman kyleaoman added the enhancement New feature or request label Apr 16, 2025
@kyleaoman kyleaoman self-assigned this Apr 16, 2025
Copy link
Collaborator

@robjmcgibbon robjmcgibbon left a comment

Choose a reason for hiding this comment

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

Looks good, but I have a couple of minor questions

Copy link
Collaborator

@robjmcgibbon robjmcgibbon left a comment

Choose a reason for hiding this comment

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

Great, thanks for addressing the questions

@kyleaoman kyleaoman merged commit 2ff0acd into master Apr 17, 2025
7 checks passed
@JBorrow JBorrow deleted the to_physical_value branch April 21, 2025 15:24
stankortmann pushed a commit to stankortmann/swiftsimio that referenced this pull request Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conversion to physical/comoving values

2 participants