Ignore:
Timestamp:
Dec 16, 2019 5:06:50 PM (23 months ago)
Author:
toby
Message:

add density to scripting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIscriptable.py

    r4203 r4207  
    41664166    @property
    41674167    def composition(self):
    4168         '''Returns a dict where keys are atom types and values are the number of
     4168        '''Provides a dict where keys are atom types and values are the number of
    41694169        atoms of that type in cell (such as {'H': 2.0, 'O': 1.0})
    41704170        '''
     
    41784178        return out
    41794179           
     4180    @property
     4181    def density(self):
     4182        '''Provides a scalar with the density of the phase. In case of a
     4183        powder this assumes a 100% packing fraction.
     4184        '''
     4185        import GSASIImath as G2mth
     4186        density,mattCoeff = G2mth.getDensity(self.data['General'])
     4187        return density
    41804188   
    41814189    @property
Note: See TracChangeset for help on using the changeset viewer.