ScaleProps#
- class ScaleProps(name, desc, unit)[source]#
Bases:
objectImmutable property bundle for a PSI coordinate scale array.
Associates a coordinate axis name with its human-readable description and physical unit. Used for the three standard PSI spatial scales
'r','t', and'p'. Instances are frozen (immutable) dataclass instances.- Parameters:
See also
ModelPropsExtends
ScalePropswith scalar, mesh, and ordering fields for 3-D model quantities.get_psi_scale_propertiesRetrieve a
ScalePropsby coordinate name.
Notes
The arithmetic dunder methods (
__mul__,__rmul__,__rtruediv__) delegate tounit, sovalue * propsis equivalent tovalue * props.unitand returns anQuantity.Examples
>>> from psi_io.models import ScaleProps >>> import astropy.units as u >>> p = ScaleProps('r', 'PSI Radial Scale (Solar Radii)', u.R_sun) >>> str(p) 'r' >>> p.name, p.desc ('r', 'PSI Radial Scale (Solar Radii)') >>> (1.0 * p).unit Unit("solRad")
Methods
|
Return a plain dictionary of this instance's fields. |