Element Queries

Elements Querying Class

class iniabu.elements.Elements(parent, eles, unit='num_lin', *args, **kwargs)

Class representing the elements.

This is mainly a list to easily interact with the parent._ele_dict dictionary.

Example:
>>> from iniabu import ini
>>> ini.unit
'num_lin'
>>> element = ini.ele["Si"]
>>> element.abu_solar
999700.0

Warning

This class should NOT be manually created by the user. It is designed to be initialized by iniabu.IniAbu.

abu_solar

Get solar abundance of element(s).

Returns the solar abundance of the selected element(s). Returns the result either as a float or as a numpy ndarray. Note: Not all databases contain this information. If the information is not available, these values will be filled with np.nan.

Returns:Solar abundance of element(s)
Return type:float,ndarray
iso_a

Get the atomic number(s) of all isotopes.

Returns the atomic number(s) of all isotopes of this element as a numpy integer ndarray. If more than one element is selected, a list of numpy integer arrays is returned.

Returns:Atomic numbers of all isotopes
Return type:ndarray,list<ndarray>
iso_abu_rel

Get relative abundance of all isotopes.

Returns a list with the relative abundances of all isotopes of the given element. If more than one element is selected, a list of numpy float ndarrays is returned. Note: All relative abundances sum up up to unity. If you are using “mass_fractions” as units, relative abundances will also be in mass fractions.

Returns:Relative abundance of all isotopes
Return type:ndarray,list<ndarray>
iso_abu_solar

Get solar abundances of all isotopes.

Returns a list with the solar abundances of all isotopes of the given element. If more than one element is selected, a list of numpy float ndarrays is returned. Note: Not all databases contain this information. If the information is not available, these values will be filled with np.nan.

Returns:Relative abundance of all isotopes
Return type:ndarray,list<ndarray>
mass

Get the mass of an element.

Returns the mass of an element depending on the specified composition. The mass is calculated as the weighted sum of the individual isotope masses, weighted by there respective abundances.

Returns:Mass of an element.
Return type:float,ndarray<float>
name

Get the name of an element.

Returns:Name of the set element(s).
Return type:str, list(str)
z

Get the number of protons for the element.

Returns:Number of protons for the set element(s).
Return type:int, ndarray<int>