def kip_cont_COmdot(self, ifig=<NUM_LIT>, modstart=<NUM_LIT:0>, modstop=-<NUM_LIT:1>,t0_model=<NUM_LIT:0>,<EOL>outfile='<STR_LIT>', xlims=[<NUM_LIT:0.>,<NUM_LIT:0.>], ylims=[<NUM_LIT:0.>,<NUM_LIT:0.>],<EOL>xres=<NUM_LIT:1000>, yres=<NUM_LIT:1000>, ixaxis='<STR_LIT>',<EOL>mix_zones=<NUM_LIT:20>, burn_zones=<NUM_LIT:20>, plot_radius=False,<EOL>engenPlus=True, engenMinus=False,<EOL>landscape_plot=False, rad_lines=False, profiles=[],<EOL>showfig=True, outlines=True, boundaries=True,<EOL>c12_boundary=False, rasterise=False, yscale='<STR_LIT>',<EOL>engenlevels=None,CO_ratio=True):
<EOL>mod=np.array([int(i) for i in self.get('<STR_LIT>')])<EOL>mod1=np.abs(mod-modstart).argmin()<EOL>mod2=np.abs(mod-modstop).argmin()<EOL>if modstart != <NUM_LIT:0> : modstart=mod1<EOL>if modstop != -<NUM_LIT:1> : modstop=mod2<EOL>xxyy=[self.get('<STR_LIT>')[modstart:modstop],self.get('<STR_LIT>')[modstart:modstop]]<EOL>mup = max(float(self.get('<STR_LIT>')[<NUM_LIT:0>])*<NUM_LIT>,<NUM_LIT:1.0>)<EOL>nmodels=len(self.get('<STR_LIT>')[modstart:modstop])<EOL>if ylims == [<NUM_LIT:0.>,<NUM_LIT:0.>]:<EOL><INDENT>mup   = max(float(self.get('<STR_LIT>')[<NUM_LIT:0>])*<NUM_LIT>,<NUM_LIT:1.0>)<EOL>mDOWN = <NUM_LIT:0.><EOL><DEDENT>else:<EOL><INDENT>mup = ylims[<NUM_LIT:1>]<EOL>mDOWN = ylims[<NUM_LIT:0>]<EOL><DEDENT>ny=yres<EOL>dy = old_div((mup-mDOWN),float(ny))<EOL>maxpoints=xres<EOL>dx=int(max(<NUM_LIT:1>,old_div(nmodels,maxpoints)))<EOL>y = np.arange(mDOWN, mup, dy)<EOL>x = np.arange(<NUM_LIT:0>, nmodels, dx)<EOL>Msol=<NUM_LIT><EOL>engenstyle = '<STR_LIT>'<EOL>B1=np.zeros([len(y),len(x)],float)<EOL>B2=np.zeros([len(y),len(x)],float)<EOL>try:<EOL><INDENT>self.get('<STR_LIT>')<EOL><DEDENT>except:<EOL><INDENT>engenstyle = '<STR_LIT>'<EOL><DEDENT>if engenstyle == '<STR_LIT>' and (engenPlus == True or engenMinus == True):<EOL><INDENT>ulimit_array = np.array([self.get('<STR_LIT>'+str(j))[modstart:modstop:dx]*self.get('<STR_LIT>')[modstart:modstop:dx] for j in range(<NUM_LIT:1>,burn_zones+<NUM_LIT:1>)])<EOL>llimit_array = np.delete(ulimit_array,-<NUM_LIT:1>,<NUM_LIT:0>)<EOL>llimit_array = np.insert(ulimit_array,<NUM_LIT:0>,<NUM_LIT:0.>,<NUM_LIT:0>)<EOL>btype_array = np.array([self.get('<STR_LIT>'+str(j))[modstart:modstop:dx] for j in range(<NUM_LIT:1>,burn_zones+<NUM_LIT:1>)])<EOL>old_percent = <NUM_LIT:0><EOL>for i in range(len(x)):<EOL><INDENT>percent = int(i*<NUM_LIT:100>/(len(x) - <NUM_LIT:1>))<EOL>if percent >= old_percent + <NUM_LIT:5>:<EOL><INDENT>sys.stdout.flush()<EOL>sys.stdout.write("<STR_LIT>" + "<STR_LIT>" % percent)<EOL>old_percent = percent<EOL><DEDENT>for j in range(burn_zones):<EOL><INDENT>if btype_array[j,i] > <NUM_LIT:0.> and abs(btype_array[j,i]) < <NUM_LIT>:<EOL><INDENT>B1[(np.abs(y-llimit_array[j][i])).argmin():(np.abs(y-ulimit_array[j][i])).argmin()+<NUM_LIT:1>,i] = <NUM_LIT>**(btype_array[j,i])<EOL><DEDENT>elif btype_array[j,i] < <NUM_LIT:0.> and abs(btype_array[j,i]) < <NUM_LIT>:<EOL><INDENT>B2[(np.abs(y-llimit_array[j][i])).argmin():(np.abs(y-ulimit_array[j][i])).argmin()+<NUM_LIT:1>,i] = <NUM_LIT>**(abs(btype_array[j,i]))<EOL><DEDENT><DEDENT><DEDENT>print('<STR_LIT>')<EOL><DEDENT>if engenstyle == '<STR_LIT>' and (engenPlus == True or engenMinus == True):<EOL><INDENT>V=np.zeros([len(y),len(x)],float)<EOL>old_percent = <NUM_LIT:0><EOL>for i in range(len(x)):<EOL><INDENT>percent = int(i*<NUM_LIT:100>/(len(x) - <NUM_LIT:1>))<EOL>if percent >= old_percent + <NUM_LIT:5>:<EOL><INDENT>sys.stdout.flush()<EOL>sys.stdout.write("<STR_LIT>" + "<STR_LIT>" % percent)<EOL>old_percent = percent<EOL><DEDENT>llimitl1=old_div(self.get('<STR_LIT>')[modstart:modstop][i*dx],Msol)<EOL>ulimitl1=old_div(self.get('<STR_LIT>')[modstart:modstop][i*dx],Msol)<EOL>llimitl2=old_div(self.get('<STR_LIT>')[modstart:modstop][i*dx],Msol)<EOL>ulimitl2=old_div(self.get('<STR_LIT>')[modstart:modstop][i*dx],Msol)<EOL>llimith1=old_div(self.get('<STR_LIT>')[modstart:modstop][i*dx],Msol)<EOL>ulimith1=old_div(self.get('<STR_LIT>')[modstart:modstop][i*dx],Msol)<EOL>llimith2=old_div(self.get('<STR_LIT>')[modstart:modstop][i*dx],Msol)<EOL>ulimith2=old_div(self.get('<STR_LIT>')[modstart:modstop][i*dx],Msol)<EOL>if llimitl1!=ulimitl1:<EOL><INDENT>for k in range(ny):<EOL><INDENT>if llimitl1<=y[k] and ulimitl1>y[k]:<EOL><INDENT>V[k,i]=<NUM_LIT><EOL><DEDENT><DEDENT><DEDENT>if llimitl2!=ulimitl2:<EOL><INDENT>for k in range(ny):<EOL><INDENT>if llimitl2<=y[k] and ulimitl2>y[k]:<EOL><INDENT>V[k,i]=<NUM_LIT><EOL><DEDENT><DEDENT><DEDENT>if llimith1!=ulimith1:<EOL><INDENT>for k in range(ny):<EOL><INDENT>if llimith1<=y[k] and ulimith1>y[k]:<EOL><INDENT>V[k,i]=<NUM_LIT><EOL><DEDENT><DEDENT><DEDENT>if llimith2!=ulimith2:<EOL><INDENT>for k in range(ny):<EOL><INDENT>if llimith2<=y[k] and ulimith2>y[k]:<EOL><INDENT>V[k,i]=<NUM_LIT><EOL><DEDENT><DEDENT><DEDENT><DEDENT>print('<STR_LIT>')<EOL><DEDENT>mixstyle = '<STR_LIT>'<EOL>try:<EOL><INDENT>self.get('<STR_LIT>')<EOL><DEDENT>except:<EOL><INDENT>mixstyle = '<STR_LIT>'<EOL><DEDENT>if mixstyle == '<STR_LIT>':<EOL><INDENT>old_percent = <NUM_LIT:0><EOL>Z=np.zeros([len(y),len(x)],float)<EOL>ulimit_array = np.array([self.get('<STR_LIT>'+str(j))[modstart:modstop:dx]*self.get('<STR_LIT>')[modstart:modstop:dx] for j in range(<NUM_LIT:1>,mix_zones+<NUM_LIT:1>)])<EOL>llimit_array = np.delete(ulimit_array,-<NUM_LIT:1>,<NUM_LIT:0>)<EOL>llimit_array = np.insert(ulimit_array,<NUM_LIT:0>,<NUM_LIT:0.>,<NUM_LIT:0>)<EOL>mtype_array = np.array([self.get('<STR_LIT>'+str(j))[modstart:modstop:dx] for j in range(<NUM_LIT:1>,mix_zones+<NUM_LIT:1>)])<EOL>for i in range(len(x)):<EOL><INDENT>percent = int(i*<NUM_LIT:100>/(len(x) - <NUM_LIT:1>))<EOL>if percent >= old_percent + <NUM_LIT:5>:<EOL><INDENT>sys.stdout.flush()<EOL>sys.stdout.write("<STR_LIT>" + "<STR_LIT>" % percent)<EOL>old_percent = percent<EOL><DEDENT>for j in range(mix_zones):<EOL><INDENT>if mtype_array[j,i] == <NUM_LIT:1.>:<EOL><INDENT>Z[(np.abs(y-llimit_array[j][i])).argmin():(np.abs(y-ulimit_array[j][i])).argmin()+<NUM_LIT:1>,i] = <NUM_LIT:1.><EOL><DEDENT><DEDENT><DEDENT>print('<STR_LIT>')<EOL><DEDENT>if mixstyle == '<STR_LIT>':<EOL><INDENT>Z=np.zeros([len(y),len(x)],float)<EOL>old_percent = <NUM_LIT:0><EOL>for i in range(len(x)):<EOL><INDENT>percent = int(i*<NUM_LIT:100>/(len(x) - <NUM_LIT:1>))<EOL>if percent >= old_percent + <NUM_LIT:5>:<EOL><INDENT>sys.stdout.flush()<EOL>sys.stdout.write("<STR_LIT>" + "<STR_LIT>" % percent)<EOL>old_percent = percent<EOL><DEDENT>ulimit=self.get('<STR_LIT>')[modstart:modstop][i*dx]*self.get('<STR_LIT>')[modstart:modstop][i*dx]<EOL>llimit=self.get('<STR_LIT>')[modstart:modstop][i*dx]*self.get('<STR_LIT>')[modstart:modstop][i*dx]<EOL>if llimit!=ulimit:<EOL><INDENT>for k in range(ny):<EOL><INDENT>if llimit<=y[k] and ulimit>y[k]:<EOL><INDENT>Z[k,i]=<NUM_LIT:1.><EOL><DEDENT><DEDENT><DEDENT>ulimit=self.get('<STR_LIT>')[modstart:modstop][i*dx]*self.get('<STR_LIT>')[modstart:modstop][i*dx]<EOL>llimit=self.get('<STR_LIT>')[modstart:modstop][i*dx]*self.get('<STR_LIT>')[modstart:modstop][i*dx]<EOL>if llimit!=ulimit:<EOL><INDENT>for k in range(ny):<EOL><INDENT>if llimit<=y[k] and ulimit>y[k]:<EOL><INDENT>Z[k,i]=<NUM_LIT:1.><EOL><DEDENT><DEDENT><DEDENT><DEDENT>print('<STR_LIT>')<EOL><DEDENT>if rad_lines == True:<EOL><INDENT>masses = np.arange(<NUM_LIT:0.1>,<NUM_LIT>,<NUM_LIT:0.1>)<EOL>rads=[[],[],[],[],[],[],[],[],[],[],[],[],[],[]]<EOL>modno=[]<EOL>for i in range(len(profiles)):<EOL><INDENT>p=mesa_profile('<STR_LIT>',profiles[i])<EOL>modno.append(p.header_attr['<STR_LIT>'])<EOL>for j in range(len(masses)):<EOL><INDENT>idx=np.abs(p.get('<STR_LIT>')-masses[j]).argmin()<EOL>rads[j].append(p.get('<STR_LIT>')[idx])<EOL><DEDENT><DEDENT><DEDENT>print('<STR_LIT>', engenstyle)<EOL>print('<STR_LIT>', mixstyle)<EOL>print('<STR_LIT>')<EOL>fig = pyl.figure(ifig)<EOL>fsize=<NUM_LIT:20><EOL>if landscape_plot == True:<EOL><INDENT>fig.set_size_inches(<NUM_LIT:9>,<NUM_LIT:4>)<EOL>pl.gcf().subplots_adjust(bottom=<NUM_LIT>)<EOL>pl.gcf().subplots_adjust(right=<NUM_LIT>)<EOL>
This function creates a Kippenhahn plot with energy flux using
contours.

This plot uses mixing_regions and burning_regions written to
your history.data or star.log. Set both variables in the
log_columns.list file to 20 as a start.

The output log file should then contain columns called
"mix_type_n", "mix_qtop_n", "burn_type_n" and "burn_qtop_n".
The number of columns (i.e. the biggest value of n) is what
goes in the arguments as mix_zones and burn_zones.  DO NOT
WORRY! if you do not have these columns, just leave the default
values alone and the script should recognise that you do not
have these columns and make the most detailed plot that is
available to you.

Defaults are set to get some plot, that may not look great if
you zoom in interactively. Play with xres and yres as well as
setting the xlims to ylims to the region you are interested in.

Parameters
----------
ifig : integer, optional
    Figure frame number.  The default is 110.
modstart : integer, optional
    Model from which you want to plot (be careful if your
    history.data or star.log output is sparse...).  If it is
    0 then it starts from the beginning, works even if
    log_cnt > 1.
    The default is 0.
modstop : integer, optional
    Model to which you wish to plot, -1 corresponds to end
    [if log_cnt>1, devide modstart and modstop by log_cnt,
    this needs to be improved! SJ: this should be ficed now].
    The defalut is -1.
t0_model : integer, optional
    Model number from which to reset the time to 0. Typically,
    if modstart!=0, t0_model=modstart is a good choice, but we
    leave the choice to the user in case the time is wished to
    start from 0 at a different key point of the evolution.
    The default value is 0.
outfile : sting, optional
    'filename + extension' where you want to save the figure.
    The defalut is "out.png".
xlims, ylims : list, optional
    Plot limits, however these are somewhat obsolete now that
    we have modstart and modstop.  Leaving them as 0. is
    probably no slower, and you can always zoom in afterwards
    in mpl.  ylims is important for well resolved thermal
    pulse etc plots; it's best to get the upper and lower limits
    of he-intershell using s.kippenhahn_CO(1,'model') first.
    The default is [0., 0.].
xres, yres : integer, optional
    plot resolution. Needless to say that increasing these
    values will yield a nicer plot with some slow-down in
    plotting time.  You will most commonly change xres.  For a
    prelim plot, try xres~200, then bump it up to anywhere from
    1000-10000 for real nicely resolved, publication quality
    plots.  The default is 1000.
ixaxis : string, optional
    Either 'log_time_left', 'age', or 'model_number'.  The
    default is "model_number".
mix_zones, burn_zones : integer, optional
    As described above, if you have more detailed output about
    your convection and energy generation boundaries in columns
    mix_type_n, mix_qtop_n, burn_type_n and burn_qtop_n, you
    need to specify the total number of columns for mixing zones
    and burning zones that you have.  Can't work this out from
    your history.data or star.log file?  Check the
    history_columns.list that you used, it'll be the number
    after "mixing regions" and "burning regions".  Can't see
    these columns?  leave it and 2 conv zones and 2 burn zones
    will be drawn using other data that you certainly should
    have in your history.data or star.log file.  The defalut for
    both is 20.
plot_radius : boolean, optional
    Whether on a second y-axis you want to plot the radius of
    the surface and the he-free core.  The default is False.
engenPlus : boolean
    Plot energy generation contours for eps_nuc>0.  The default
    is True.
endgenMinus : boolean, optional
    Plot energy generation contours for eos_nuc<0.  The default
    is True.
landscape_plot : boolean, optionla
    The default is False.
rad_lines : boolean, optional
    The deafault is False.
profiles : list, optional
    The default is [].
showfig : boolean, optional
    The default is True.
outlines : boolean, optional
    Whether or not to plot outlines of conv zones in darker
    colour.
boundaries : boolean, optional
    Whether or not to plot H-, He- and C-free boundaries.
c12_boundary : boolean, optional
    The default is False.
rasterise : boolean, optional
    Whether or not to rasterise the contour regions to make
    smaller vector graphics figures.  The default is False.
yscale : string, optional
    Re-scale the y-axis by this amount
engenlevels : list
    Give cusstom levels to the engenPlus contour. If None,
    the levels are chosen automatically.
    The default is None.

Notes
-----
The parameter xlims is depricated.