def get_elemental_abunds(self,cycle,index=None):
isoabunds=self.se.get(cycle,'<STR_LIT>')<EOL>A=array(self.se.A)<EOL>Z=array(self.se.Z)<EOL>names=self.se.isos<EOL>Zuq=list(set(Z)) <EOL>Zuq.sort()<EOL>if index==None:<EOL><INDENT>index=[<NUM_LIT:0>,len(isoabunds)]<EOL><DEDENT>if type(index)==list:<EOL><INDENT>elemabunds=[]<EOL>for zone in range(index[<NUM_LIT:0>],index[<NUM_LIT:1>]):<EOL><INDENT>percent=int((zone-index[<NUM_LIT:0>])*<NUM_LIT>/(index[<NUM_LIT:1>]-index[<NUM_LIT:0>]))<EOL>sys.stdout.flush()<EOL>sys.stdout.write("<STR_LIT>" + "<STR_LIT>" % percent)<EOL>elemabunds.append([sum(isoabunds[zone][where(Z==iZ)]) for iZ in Zuq])<EOL><DEDENT><DEDENT>else:<EOL><INDENT>elemabunds=[sum(isoabunds[index][where(Z==iZ)]) for iZ in Zuq]<EOL><DEDENT>return elemabunds<EOL>
returns the elemental abundances for one cycle, either
for the whole star or a specific zone depending upon
the value of 'index'.

Parameters
----------
cycle : string or integer
    Model to get the abundances for.
index : integer or list, optional
    zone number for which to get elemental abundances. If
    None the entire abundance profile is returned. If a 1x2
    list, the abundances are returned between indices of
    index[0] and index[1].
    The default is None.