You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe
It would be nice to have a method, say snap.physical_units() that sets the snap to give arrays and other values in physical units rather than having to multiply by the appropriate combination of snap.properties['utime'], snap.properties['udist'], snap.properties['umass'].
Describe the solution you'd like
Implement a method on the snap like snap.physical_units() with arguments to set the time, mass, distance units, such that when accessing arrays like snap['position'] they return an array with physical units.
This solution could return a NumPy array in the correct units. Or, perhaps a better option is to return a Pint array which contains the units along with the array.
Describe alternatives you've considered
The alternative is to continue to do this manually with the units provided in snap.properties.
Is your feature request related to a problem? Please describe
It would be nice to have a method, say
snap.physical_units()
that sets the snap to give arrays and other values in physical units rather than having to multiply by the appropriate combination ofsnap.properties['utime']
,snap.properties['udist']
,snap.properties['umass']
.Describe the solution you'd like
Implement a method on the snap like
snap.physical_units()
with arguments to set the time, mass, distance units, such that when accessing arrays likesnap['position']
they return an array with physical units.This solution could return a NumPy array in the correct units. Or, perhaps a better option is to return a Pint array which contains the units along with the array.
Describe alternatives you've considered
The alternative is to continue to do this manually with the units provided in
snap.properties
.Additional context
We could use unyt or Astropy units instead.
The text was updated successfully, but these errors were encountered: