コード例 #1
0
    def units(self, key):
        """Returns the units of any key"""

        # Fill out aliases
        if key in component_from_alias:
            key = component_from_alias[key]
        elif key == 'E':
            key = 'electricField'
        elif key == 'B':
            key = 'magneticField'

        return pg_units(key)
コード例 #2
0
 def stat_units(self, key):
     """
     Calculates any statistic that the ParticleGroup class can calculate, on all particle groups.
     """
     """Returns a str decribing the physical units of a stat key."""
     return pg_units(key)
コード例 #3
0
 def units(self, key):
     """Returns the units of any key"""
     return pg_units(key)