energy_and_mixing
- tulips.tulips.energy_and_mixing(m, time_ind=-1, show_mix=False, show_mix_legend=True, raxis='star_mass', fps=10, fig=None, ax=None, show_time_label=True, time_label_loc=(), time_unit='Myr', fig_size=(5.5, 4), axis_lim=-99, axis_label='', axis_units='', show_colorbar=True, cmap=<matplotlib.colors.LinearSegmentedColormap object>, cmin=-10, cmax=10, cbar_label='', theta1=0, theta2=360, hrd_inset=True, show_hrd_ticks_and_labels=False, show_total_mass=False, show_surface=True, show_grid=False, output_fname='energy_and_mixing', anim_fmt='.mp4', time_scale_type='model_number')[source]
Create energy and mixing diagram.
Represent the model of a stellar object as circle with radius raxis. The circle is divided into rings whose color reflect how much energy is generated or lost from the star. Optionally, hashed areas representing mixing regions can be added. This corresponds to a “2D Kippenhahn plot”. Requires MESA history files that contain burning_regions and optionally mixing_regions.
- Parameters
- mmesaPlot object
Already loaded a history file.
- time_indint or tuple (start_index, end_index, step=1) or (start_index, end_index, step)
If int: create the plot at the index time_ind. If tuple: create an animation from start index to end index with
- intervals of step.
- show_mix: boolean
If set, add hatches for convection and overshooting zones in the star.
- show_mix_legend: boolean
If set, show a legend for the mixing types.
- raxisstr
Default axis to use as radius of the circle.
- fps: int
Number of frames per second for the animation
- figFigure object
If set, plot on existing figure.
- axAxes object
If set, plot on provided axis.
- show_time_labelboolean
If set, insert a label that gives the age of the stellar object.
- time_label_loctuple
Location of the time label on the plot as fraction of the maximal size.
- time_unitstr
Valid astropy time unit, default Myr.
- fig_sizetuple
Size of the figure in inches.
- axis_limfloat
Value to set for the maximum limit of the x and y axis.
- axis_labelstr
Label of the x and y axis.
- axis_unitsstr
Astropy unit for the x and y axis.
- show_colorbarboolean
If set, add a colorbar corresponding to the property shown.
- cmapstr or matplotlib.colors.ListedColormap
Colormap to use for the property
- cminfloat
Minimum value to set for the colorbar.
- cmaxfloat
Maximum value to set for the colorbar, if smaller or equal to cmin, use the minimum and maximum values of property_name instead.
- cbar_labelstr
Label to set for the colorbar.
- theta1int or float
Start angle for the wedge.
- theta2: int or float
End angle for the wedge.
- hrd_insetboolean
If set, add an inset HRD where the location of the current model is indicated with a circle.
- show_hrd_ticks_and_labelsBoolean
If set, display the axis ticks and labels of the inset HRD
- show_total_massboolean
Default False, display the value of the total mass of the model below the circle.
- show_surfaceboolean
Default True, if set, show the outer boundary of the stellar object.
- show_grid: boolean
Default False, if set, add additional axes in crosshair form.
- output_fnamestr
Name of the output file.
- anim_fmtstr
Format to use for saving an animation.
- time_scale_typestr
One of model_number, linear, or log_to_end. For model_number, the time follows the moment when a new MESA model was saved. For linear, the time follows linear steps in star_age. For log_to_end, the time axis is tau = log10(t_final - t), where t_final is the final star_age of the model.
- Returns
- fig, ax