#NEWLINE# @ ValidateLarchPlugin #NEWLINE# def atomic_density( element , _larch = None ) : #NEWLINE# #INDENT# 'return density (gr/cm^3) from element symbol or atomic number' #NEWLINE# xdb = get_xraydb ( _larch ) #NEWLINE# if isinstance ( xdb , int ) : #NEWLINE# #INDENT# element = atomic_symbol ( element , _larch = _larch ) #NEWLINE# #UNINDENT# return xdb . _getElementData ( element ) . density