Skip to content

Add simultaneous physical and unit conversion#224

Merged
kyleaoman merged 6 commits into
masterfrom
to_physical_value
Apr 17, 2025
Merged

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

Conversation

@kyleaoman

Copy link
Copy Markdown
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

@robjmcgibbon robjmcgibbon left a comment

Copy link
Copy Markdown
Collaborator

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

Comment thread docs/source/visualisation/projection.rst Outdated
Comment thread swiftsimio/visualisation/smoothing_length/generate.py

@robjmcgibbon robjmcgibbon left a comment

Copy link
Copy Markdown
Collaborator

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
@JBorrow JBorrow deleted the to_physical_value branch April 21, 2025 15:24
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