def find_TP_attributes(self, t0_model=<NUM_LIT:0>, fig=<NUM_LIT:10>, color='<STR_LIT:k>', marker_type='<STR_LIT:*>',<EOL>h_core_mass=False, no_fig=False):
<EOL>t0_idx=(t0_model-self.get("<STR_LIT>")[<NUM_LIT:0>])<EOL>first_TP_he_lum=<NUM_LIT:10>**(self.get("<STR_LIT>")[t0_idx])<EOL>he_lum=<NUM_LIT:10>**(self.get("<STR_LIT>")[t0_idx:])<EOL>h_lum=<NUM_LIT:10>**(self.get("<STR_LIT>")[t0_idx:])<EOL>model=self.get("<STR_LIT>")[t0_idx:]<EOL>try:<EOL><INDENT>h1_bndry=self.get("<STR_LIT>")[t0_idx:]<EOL>he4_bdy=self.get("<STR_LIT>")[t0_idx:]<EOL><DEDENT>except:<EOL><INDENT>try:<EOL><INDENT>h1_bndry=self.get('<STR_LIT>')[t0_idx:] <EOL>he4_bdy=self.get("<STR_LIT>")[t0_idx:] <EOL><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>TP_bot=np.array(self.get('<STR_LIT>')[t0_idx:])*np.array(self.get('<STR_LIT>')[t0_idx:])<EOL>TP_top=np.array(self.get('<STR_LIT>')[t0_idx:])*np.array(self.get('<STR_LIT>')[t0_idx:])<EOL>z=self.header_attr["<STR_LIT>"]<EOL>mass=self.header_attr["<STR_LIT>"]<EOL>leg=str(mass)+"<STR_LIT>"+str(z)<EOL>peak_lum_model=[]<EOL>peak_lum_save=[]<EOL>h1_mass_tp=[]<EOL>h1_mass_min_DUP_model=[]<EOL>perc=<NUM_LIT><EOL>min_TP_distance=<NUM_LIT> <EOL>lum_1=[]<EOL>model_1=[]<EOL>h1_mass_model=[]<EOL>TP_counter=<NUM_LIT:0><EOL>new_TP=True<EOL>TP_interpulse=False<EOL>interpulse_counter=<NUM_LIT:0><EOL>TP_size=TP_top[<NUM_LIT:0>]-TP_bot[<NUM_LIT:0>]<EOL>lastDUP=False<EOL>for i in range(len(he_lum)):<EOL><INDENT>if (TP_interpulse ==False) and (h_lum[i]<he_lum[i]):<EOL><INDENT>if (len(he_lum)-<NUM_LIT:1>)==i:<EOL><INDENT>TP_interpulse=True <EOL><DEDENT><DEDENT>if (len(he_lum)-<NUM_LIT:1>)==i:<EOL><INDENT>if (h_lum[i]<he_lum[i]):<EOL><INDENT>if  (he4_bdy[i]<TP_bot[i]):<EOL><INDENT>lastDUP=True<EOL>break <EOL><DEDENT><DEDENT><DEDENT>if i ==<NUM_LIT:0>:<EOL><INDENT>lum_1.append(first_TP_he_lum)<EOL>model_1.append(t0_model)<EOL><DEDENT>if True: <EOL><INDENT>if (h_lum[i]<he_lum[i]):<EOL><INDENT>if  (he4_bdy[i]<TP_bot[i]) and ( (TP_top[i]-TP_bot[i]) > TP_size*<NUM_LIT:0.1>) :<EOL><INDENT>lum_1.append(he_lum[i])<EOL>model_1.append(model[i])<EOL>TP_interpulse=True    <EOL><DEDENT><DEDENT><DEDENT>if ( ((len(he_lum)-<NUM_LIT:1>)==i) and (h_lum[i]>he_lum[i])) and TP_interpulse==False:<EOL><INDENT>if min(h1_bndry[peak_lum_model[-<NUM_LIT:1>]-t0_idx:i])<h1_bndry[peak_lum_model[-<NUM_LIT:1>]-t0_idx]:<EOL><INDENT>lastDUP=True<EOL>break<EOL><DEDENT><DEDENT>if ((h_lum[i]>he_lum[i]) and (TP_interpulse==True)) or ( ((len(he_lum)-<NUM_LIT:1>)==i) and (TP_interpulse==True)):<EOL><INDENT>if (len(he_lum)-<NUM_LIT:1>)<(i+<NUM_LIT>):<EOL><INDENT>if min(h1_bndry[peak_lum_model[-<NUM_LIT:1>]-t0_idx:i])<h1_bndry[peak_lum_model[-<NUM_LIT:1>]-t0_idx]:<EOL><INDENT>lastDUP=True <EOL><DEDENT>break<EOL><DEDENT>TP_interpulse=True<EOL>max_value1=np.array(lum_1).max()<EOL>if len(lum_1)<<NUM_LIT:10>:<EOL><INDENT>continue<EOL><DEDENT>if len(peak_lum_model)><NUM_LIT:2>:<EOL><INDENT>if ( <NUM_LIT:10>**((np.log10(prev_he_lum_start)+np.log10(peak_lum_save[-<NUM_LIT:1>]))/<NUM_LIT>)  )  >max_value1:<EOL><INDENT>continue<EOL><DEDENT><DEDENT>max_value=np.array(lum_1).max()<EOL>max_index = lum_1.index(max_value)<EOL>prev_he_lum_start=lum_1[<NUM_LIT:0>]<EOL>peak_lum_save.append(max_value)<EOL>peak_lum_model.append(model_1[max_index])<EOL>lum_1=[]<EOL>model_1=[]<EOL>TP_interpulse=False<EOL><DEDENT><DEDENT>for k in range(len(peak_lum_model)-<NUM_LIT:1>):<EOL><INDENT>idx1=list(model).index(peak_lum_model[k])<EOL>idx2=list(model).index(peak_lum_model[k+<NUM_LIT:1>])<EOL>h1_mass_min_DUP_model.append(model[list(h1_bndry).index(min(h1_bndry[idx1:idx2]))] )<EOL><DEDENT>if lastDUP==True:<EOL><INDENT>idx1=list(model).index(peak_lum_model[-<NUM_LIT:1>]) <EOL>idx2=-<NUM_LIT:1><EOL>h1_mass_min_DUP_model.append(model[list(h1_bndry).index(min(h1_bndry[idx1:idx2]))]      )<EOL><DEDENT>modeln=[]<EOL>return peak_lum_model,h1_mass_min_DUP_model<EOL>
Function which finds TPs and uses the calc_DUP_parameter
function.  To calculate DUP parameter evolution dependent of
the star or core mass.

Parameters
----------
fig : integer
Figure number to plot.
t0_model : integer
First he-shell lum peak
color : string
Color of the plot.
marker_type : string
marker type.
h_core_mass : boolean, optional
If True: plot dependence from h free core , else star mass.
The default is False.
no_fig : boolean, optional
The default is False.