def trajectory(self, ini, end, delta, mass_coo, age_in_sec=False,<EOL>online=False):
filename='<STR_LIT>'+str(mass_coo)+'<STR_LIT>'<EOL>f = open(filename,'<STR_LIT:a>')<EOL>radius_at_mass_coo=[]<EOL>density_at_mass_coo=[]<EOL>temperature_at_mass_coo=[]<EOL>masses=self.se.get(list(range(ini,end+<NUM_LIT:1>,delta)),'<STR_LIT>')<EOL>temps=self.se.get(list(range(ini,end+<NUM_LIT:1>,delta)),'<STR_LIT>')<EOL>rhos=self.se.get(list(range(ini,end+<NUM_LIT:1>,delta)),'<STR_LIT>')<EOL>radii=self.se.get(list(range(ini,end+<NUM_LIT:1>,delta)),'<STR_LIT>')<EOL>ages=self.se.get(list(range(ini,end+<NUM_LIT:1>,delta)),'<STR_LIT>')<EOL>cycs=list(range(ini,end+<NUM_LIT:1>,delta))<EOL>age_all=[]<EOL>for i in range(len(ages)):<EOL><INDENT>age=ages[i]<EOL>if age_in_sec:<EOL><INDENT>age /= constants.one_year<EOL><DEDENT>mass=masses[i]<EOL>temperature=temps[i]<EOL>rho=rhos[i]<EOL>radius=radii[i]<EOL>my_things=[temperature,rho,radius]<EOL>if mass[<NUM_LIT:0>]>mass[len(mass)-<NUM_LIT:1>]:<EOL><INDENT>zone_above=where(mass>mass_coo)[<NUM_LIT:0>][-<NUM_LIT:1>]<EOL>zone_below=zone_above+<NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>zone_above=where(mass>mass_coo)[<NUM_LIT:0>][<NUM_LIT:0>]<EOL>zone_below=zone_above-<NUM_LIT:1><EOL><DEDENT>if mass[zone_below]>mass[zone_above]:<EOL><INDENT>sys.exit("<STR_LIT>")<EOL><DEDENT>all_things_interplt=[]<EOL>for thing in my_things:<EOL><INDENT>thing_interplt=thing[zone_below]+(mass_coo-mass[zone_below])*(thing[zone_above]-thing[zone_below])/(mass[zone_above]-mass[zone_below])<EOL>all_things_interplt.append(thing_interplt)<EOL><DEDENT>this_temperature,this_rho,this_radius=all_things_interplt<EOL>string = str(cycs[i])+'<STR_LIT:U+0020>'+str(age)+'<STR_LIT:U+0020>'+str(this_temperature)+'<STR_LIT:U+0020>'+str(this_rho)<EOL>f.write(string+"<STR_LIT:\n>")<EOL>radius_at_mass_coo.append(this_radius)<EOL>density_at_mass_coo.append(this_rho)<EOL>temperature_at_mass_coo.append(this_temperature)<EOL>age_all.append(age)<EOL><DEDENT>f.close()<EOL>if online:<EOL><INDENT>return FileLink(filename)<EOL><DEDENT>return radius_at_mass_coo, density_at_mass_coo, temperature_at_mass_coo, age_all<EOL>
create a trajectory out of a stellar model

Parameters
----------
ini : integer
    Initial model, inital cycle number.
end : integer
    Final model, final cycle number.
delta : integer
    Sparsity factor of the frames.
mass_coo : float
    Mass coordinate for the traj.
age_in_sec : boolean, optional
    Set to True if age in se file is in seconds (like in MESA).
    The default is False.

Returns
--------
float
    radius_at_mass_coo, density_at_mass_coo,
    temperature_at_mass_coo, age_all

Notes
-----
plus writes a file with the trajectory information to be used
with ppn.

Warning: remove the old trajectory, if you have any for the same
mass coordinate.  You are appending data, not overwriting.

Update: this method works for output types with indexes going
from the outside in (MESA) or the other way around.  Also the
requested quantities are linearly interpolated in the mass
shell.
online: boolean, optional
are you working online in the ipython notebook? If so,
you will be given an HTML link to download the file.