chemical_profile
- tulips.tulips.chemical_profile(m, time_ind=-1, isotope_list=None, num_rings=-1, scale=-1, width=0.03, raxis='mass', show_ring_annotations=True, fps=10, fig=None, ax=None, show_time_label=True, time_label_loc=(), time_unit='Myr', fig_size=(5.5, 4), axis_lim=1.05, axis_label='', show_colorbar=True, cmap=<matplotlib.colors.ListedColormap object>, min_cbar_elem=5, max_cbar_elem=25, show_legend=False, counterclock=True, startangle=90, hrd_inset=True, show_hrd_ticks_and_labels=False, show_total_mass=True, show_surface=False, output_fname='chemical_profile', anim_fmt='.mp4', cbar_orientation='vertical')[source]
Creates chemical profile diagram.
Represent the model of a stellar object as a circle with radius raxis. The circle contains nested pie charts that show the composition of the star at a certain mass or radius coordinate. Requires MESA profile files that contain the profiles of certain isotopes, such as “h1” and the corresponding MESA history file.
- 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.
- isotope_listNone or list or np.array of str
Containing the names of isotopes to be included.
- num_ringsint
Default -1, if greater than -1, limit the number of nested pie charts to this number
- scalefloat
Value to scale the circle to. If negative, use the maximum value of the raxis.
- widthfloat
Minimum width of a nested pie chart ring.
- raxisstr
Default axis to use as radius of the circle.
- show_ring_annotations: boolean
If set, add concentric rings on top of the nested pie charts.
- fpsint
Number of frames per second for the animation.
- fig: Figure 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 (in Myr).
- 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.
- show_colorbarboolean
If set, add a colorbar that gives the isotopes and corresponding colors.
- cmapstr or matplotlib.colors.ListedColormap
colormap to use for the isotopes
- min_cbar_elemint
Minimum number of isotopes in a colorbar
- max_cbar_elemint
Maximum number of isotopes per colorbar
- cbar_orientationstring, one of “vertical” or “horizontal”
Orientation of the colorbar. If horizontal, it is placed below the figure, if vertical, it is placed to the right.
- counterclockboolean
If set, plot the isotopes counterclockwise.
- startangleint or float
Angle in degrees from the horizontal line at which to start plotting the isotopes.
- 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_gridboolean
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.
- Returns
- fig, ax