plotting

class cosmic.plotting.Evolve

Bases: object

__annotations__ = {}
__dict__ = mappingproxy({'__module__': 'cosmic.evolve', '__init__': <function Evolve.__init__>, 'evolve': <classmethod(<function Evolve.evolve>)>, '__dict__': <attribute '__dict__' of 'Evolve' objects>, '__weakref__': <attribute '__weakref__' of 'Evolve' objects>, '__doc__': None, '__annotations__': {}})
__doc__ = None
__init__()

initialize Evolve

__module__ = 'cosmic.evolve'
__weakref__

list of weak references to the object (if defined)

classmethod evolve(initialbinarytable, pool=None, **kwargs)

After setting a number of initial conditions we evolve the system.

Parameters
initialbinarytableDataFrame

Initial conditions of the binary

**kwargs:

There are three ways to tell evolve and thus the fortran what you want all the flags and other BSE specific parameters to be. If you pass both a dictionary of flags and/or a inifile and a table with the BSE parameters in the columns, the column values will be overwritten by what is in the dictionary or ini file.

NUMBER 1: PASS A DICTIONARY OF FLAGS

BSEDict

NUMBER 2: PASS A PANDAS DATA FRAME WITH PARAMS DEFINED AS COLUMNS

All you need is the initialbinarytable if the all the BSE parameters are defined as columns

NUMBER 3: PASS PATH TO A INI FILE WITH THE FLAGS DEFINED

params

randomseedint, optional, default let numpy choose for you

If you would like the random seed that the underlying fortran code uses to be the same for all of the initial conditions you passed then you can send this keyword argument in. It is recommended to just let numpy choose a random number as the Fortran random seed and then this number will be returned as a column in the initial binary table so that you can reproduce the results.

nprocint, optional, default: 1

number of CPUs to use to evolve systems in parallel

idxint, optional, default: 0

initial index of the bcm/bpp arrays

dtpfloat, optional: default: tphysf

timestep size in Myr for bcm output where tphysf is total evolution time in Myr

n_per_blockint, optional, default: -1

number of systems to evolve in a block with _evolve_multi_system, to allow larger multiprocessing queues and reduced overhead. If less than 1 use _evolve_single_system

Returns
output_bppDataFrame

Evolutionary history of each binary

output_bcmDataFrame

Final state of each binary

initialbinarytableDataFrame

Initial conditions for each binary

class cosmic.plotting.Line2D(xdata, ydata, linewidth=None, linestyle=None, color=None, marker=None, markersize=None, markeredgewidth=None, markeredgecolor=None, markerfacecolor=None, markerfacecoloralt='none', fillstyle=None, antialiased=None, dash_capstyle=None, solid_capstyle=None, dash_joinstyle=None, solid_joinstyle=None, pickradius=5, drawstyle=None, markevery=None, **kwargs)

Bases: Artist

A line - the line can have both a solid linestyle connecting all the vertices, and a marker at each vertex. Additionally, the drawing of the solid line is influenced by the drawstyle, e.g., one can create “stepped” lines in various styles.

__doc__ = 'A line - the line can have both a solid linestyle connecting all\nthe vertices, and a marker at each vertex.  Additionally, the\ndrawing of the solid line is influenced by the drawstyle, e.g., one\ncan create "stepped" lines in various styles.'
__init__(xdata, ydata, linewidth=None, linestyle=None, color=None, marker=None, markersize=None, markeredgewidth=None, markeredgecolor=None, markerfacecolor=None, markerfacecoloralt='none', fillstyle=None, antialiased=None, dash_capstyle=None, solid_capstyle=None, dash_joinstyle=None, solid_joinstyle=None, pickradius=5, drawstyle=None, markevery=None, **kwargs)

Create a .Line2D instance with x and y data in sequences of xdata, ydata.

Additional keyword arguments are .Line2D properties:

Properties:

agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array alpha: scalar or None animated: bool antialiased or aa: bool clip_box: .Bbox clip_on: bool clip_path: Patch or (Path, Transform) or None color or c: color dash_capstyle: .CapStyle or {‘butt’, ‘projecting’, ‘round’} dash_joinstyle: .JoinStyle or {‘miter’, ‘round’, ‘bevel’} dashes: sequence of floats (on/off ink in points) or (None, None) data: (2, N) array or two 1D arrays drawstyle or ds: {‘default’, ‘steps’, ‘steps-pre’, ‘steps-mid’, ‘steps-post’}, default: ‘default’ figure: .Figure fillstyle: {‘full’, ‘left’, ‘right’, ‘bottom’, ‘top’, ‘none’} gid: str in_layout: bool label: object linestyle or ls: {‘-’, ‘–’, ‘-.’, ‘:’, ‘’, (offset, on-off-seq), …} linewidth or lw: float marker: marker style string, ~.path.Path or ~.markers.MarkerStyle markeredgecolor or mec: color markeredgewidth or mew: float markerfacecolor or mfc: color markerfacecoloralt or mfcalt: color markersize or ms: float markevery: None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool] path_effects: .AbstractPathEffect picker: float or callable[[Artist, Event], tuple[bool, dict]] pickradius: float rasterized: bool sketch_params: (scale: float, length: float, randomness: float) snap: bool or None solid_capstyle: .CapStyle or {‘butt’, ‘projecting’, ‘round’} solid_joinstyle: .JoinStyle or {‘miter’, ‘round’, ‘bevel’} transform: unknown url: str visible: bool xdata: 1D array ydata: 1D array zorder: float

See set_linestyle() for a description of the line styles, set_marker() for a description of the markers, and set_drawstyle() for a description of the draw styles.

__module__ = 'matplotlib.lines'
__str__()

Return str(self).

_alias_map = {'antialiased': ['aa'], 'color': ['c'], 'drawstyle': ['ds'], 'linestyle': ['ls'], 'linewidth': ['lw'], 'markeredgecolor': ['mec'], 'markeredgewidth': ['mew'], 'markerfacecolor': ['mfc'], 'markerfacecoloralt': ['mfcalt'], 'markersize': ['ms']}
_drawStyles_l = {'default': '_draw_lines', 'steps-mid': '_draw_steps_mid', 'steps-post': '_draw_steps_post', 'steps-pre': '_draw_steps_pre'}
_drawStyles_s = {'steps': '_draw_steps_pre'}
_get_markerfacecolor(alt=False)
_get_transformed_path()

Return this line’s ~matplotlib.transforms.TransformedPath.

_is_sorted(x)

Return whether x is sorted in ascending order.

_lineStyles = {'': '_draw_nothing', ' ': '_draw_nothing', '-': '_draw_solid', '--': '_draw_dashed', '-.': '_draw_dash_dot', ':': '_draw_dotted', 'None': '_draw_nothing'}
_set_markercolor(name, has_rcdefault, val)
_transform_path(subslice=None)

Put a TransformedPath instance at self._transformed_path; all invalidation of the transform is then handled by the TransformedPath instance.

contains(mouseevent)

Test whether mouseevent occurred on the line.

An event is deemed to have occurred “on” the line if it is less than self.pickradius (default: 5 points) away from it. Use ~.Line2D.get_pickradius or ~.Line2D.set_pickradius to get or set the pick radius.

Parameters
mouseeventmatplotlib.backend_bases.MouseEvent
Returns
containsbool

Whether any values are within the radius.

detailsdict

A dictionary {'ind': pointlist}, where pointlist is a list of points of the line that are within the pickradius around the event position.

TODO: sort returned indices by distance

draw(renderer)

Draw the Artist (and its children) using the given renderer.

This has no effect if the artist is not visible (.Artist.get_visible returns False).

Parameters
renderer.RendererBase subclass.

Notes

This method is overridden in the Artist subclasses.

drawStyleKeys = ['default', 'steps-mid', 'steps-pre', 'steps-post', 'steps']
drawStyles = {'default': '_draw_lines', 'steps': '_draw_steps_pre', 'steps-mid': '_draw_steps_mid', 'steps-post': '_draw_steps_post', 'steps-pre': '_draw_steps_pre'}
fillStyles = ('full', 'left', 'right', 'bottom', 'top', 'none')
filled_markers = ('o', 'v', '^', '<', '>', '8', 's', 'p', '*', 'h', 'H', 'D', 'd', 'P', 'X')
get_aa()

Alias for get_antialiased.

get_antialiased()

Return whether antialiased rendering is used.

get_c()

Alias for get_color.

get_color()

Return the line color.

See also ~.Line2D.set_color.

get_dash_capstyle()

Return the .CapStyle for dashed lines.

See also ~.Line2D.set_dash_capstyle.

get_dash_joinstyle()

Return the .JoinStyle for dashed lines.

See also ~.Line2D.set_dash_joinstyle.

get_data(orig=True)

Return the line data as an (xdata, ydata) pair.

If orig is True, return the original data.

get_drawstyle()

Return the drawstyle.

See also ~.Line2D.set_drawstyle.

get_ds()

Alias for get_drawstyle.

get_fillstyle()

Return the marker fill style.

See also ~.Line2D.set_fillstyle.

get_linestyle()

Return the linestyle.

See also ~.Line2D.set_linestyle.

get_linewidth()

Return the linewidth in points.

See also ~.Line2D.set_linewidth.

get_ls()

Alias for get_linestyle.

get_lw()

Alias for get_linewidth.

get_marker()

Return the line marker.

See also ~.Line2D.set_marker.

get_markeredgecolor()

Return the marker edge color.

See also ~.Line2D.set_markeredgecolor.

get_markeredgewidth()

Return the marker edge width in points.

See also ~.Line2D.set_markeredgewidth.

get_markerfacecolor()

Return the marker face color.

See also ~.Line2D.set_markerfacecolor.

get_markerfacecoloralt()

Return the alternate marker face color.

See also ~.Line2D.set_markerfacecoloralt.

get_markersize()

Return the marker size in points.

See also ~.Line2D.set_markersize.

get_markevery()

Return the markevery setting for marker subsampling.

See also ~.Line2D.set_markevery.

get_mec()

Alias for get_markeredgecolor.

get_mew()

Alias for get_markeredgewidth.

get_mfc()

Alias for get_markerfacecolor.

get_mfcalt()

Alias for get_markerfacecoloralt.

get_ms()

Alias for get_markersize.

get_path()

Return the ~matplotlib.path.Path associated with this line.

get_pickradius()

Return the pick radius used for containment tests.

See .contains for more details.

get_solid_capstyle()

Return the .CapStyle for solid lines.

See also ~.Line2D.set_solid_capstyle.

get_solid_joinstyle()

Return the .JoinStyle for solid lines.

See also ~.Line2D.set_solid_joinstyle.

get_window_extent(renderer)

Get the artist’s bounding box in display space.

The bounding box’ width and height are nonnegative.

Subclasses should override for inclusion in the bounding box “tight” calculation. Default is to return an empty bounding box at 0, 0.

Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly.

get_xdata(orig=True)

Return the xdata.

If orig is True, return the original data, else the processed data.

get_xydata()

Return the xy data as a Nx2 numpy array.

get_ydata(orig=True)

Return the ydata.

If orig is True, return the original data, else the processed data.

is_dashed()

Return whether line has a dashed linestyle.

A custom linestyle is assumed to be dashed, we do not inspect the onoffseq directly.

See also ~.Line2D.set_linestyle.

lineStyles = {'': '_draw_nothing', ' ': '_draw_nothing', '-': '_draw_solid', '--': '_draw_dashed', '-.': '_draw_dash_dot', ':': '_draw_dotted', 'None': '_draw_nothing'}
markers = {'.': 'point', ',': 'pixel', 'o': 'circle', 'v': 'triangle_down', '^': 'triangle_up', '<': 'triangle_left', '>': 'triangle_right', '1': 'tri_down', '2': 'tri_up', '3': 'tri_left', '4': 'tri_right', '8': 'octagon', 's': 'square', 'p': 'pentagon', '*': 'star', 'h': 'hexagon1', 'H': 'hexagon2', '+': 'plus', 'x': 'x', 'D': 'diamond', 'd': 'thin_diamond', '|': 'vline', '_': 'hline', 'P': 'plus_filled', 'X': 'x_filled', 0: 'tickleft', 1: 'tickright', 2: 'tickup', 3: 'tickdown', 4: 'caretleft', 5: 'caretright', 6: 'caretup', 7: 'caretdown', 8: 'caretleftbase', 9: 'caretrightbase', 10: 'caretupbase', 11: 'caretdownbase', 'None': 'nothing', None: 'nothing', ' ': 'nothing', '': 'nothing'}
property pickradius

Return the pick radius used for containment tests.

See .contains for more details.

recache(always=False)
recache_always()
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, dash_capstyle=<UNSET>, dash_joinstyle=<UNSET>, dashes=<UNSET>, data=<UNSET>, drawstyle=<UNSET>, fillstyle=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, marker=<UNSET>, markeredgecolor=<UNSET>, markeredgewidth=<UNSET>, markerfacecolor=<UNSET>, markerfacecoloralt=<UNSET>, markersize=<UNSET>, markevery=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, pickradius=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, solid_capstyle=<UNSET>, solid_joinstyle=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, xdata=<UNSET>, ydata=<UNSET>, zorder=<UNSET>)

Set multiple properties at once.

Supported properties are

Properties:

agg_filter: a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array alpha: scalar or None animated: bool antialiased: bool clip_box: .Bbox clip_on: bool clip_path: Patch or (Path, Transform) or None color: color dash_capstyle: .CapStyle or {‘butt’, ‘projecting’, ‘round’} dash_joinstyle: .JoinStyle or {‘miter’, ‘round’, ‘bevel’} dashes: sequence of floats (on/off ink in points) or (None, None) data: (2, N) array or two 1D arrays drawstyle: {‘default’, ‘steps’, ‘steps-pre’, ‘steps-mid’, ‘steps-post’}, default: ‘default’ figure: .Figure fillstyle: {‘full’, ‘left’, ‘right’, ‘bottom’, ‘top’, ‘none’} gid: str in_layout: bool label: object linestyle: {‘-’, ‘–’, ‘-.’, ‘:’, ‘’, (offset, on-off-seq), …} linewidth: float marker: marker style string, ~.path.Path or ~.markers.MarkerStyle markeredgecolor: color markeredgewidth: float markerfacecolor: color markerfacecoloralt: color markersize: float markevery: None or int or (int, int) or slice or list[int] or float or (float, float) or list[bool] path_effects: .AbstractPathEffect picker: float or callable[[Artist, Event], tuple[bool, dict]] pickradius: float rasterized: bool sketch_params: (scale: float, length: float, randomness: float) snap: bool or None solid_capstyle: .CapStyle or {‘butt’, ‘projecting’, ‘round’} solid_joinstyle: .JoinStyle or {‘miter’, ‘round’, ‘bevel’} transform: unknown url: str visible: bool xdata: 1D array ydata: 1D array zorder: float

set_aa(b)

Alias for set_antialiased.

set_antialiased(b)

Set whether to use antialiased rendering.

Parameters
bbool
set_c(color)

Alias for set_color.

set_color(color)

Set the color of the line.

Parameters
colorcolor
set_dash_capstyle(s)

How to draw the end caps if the line is ~Line2D.is_dashed.

Parameters
s.CapStyle or {‘butt’, ‘projecting’, ‘round’}
set_dash_joinstyle(s)

How to join segments of the line if it ~Line2D.is_dashed.

Parameters
s.JoinStyle or {‘miter’, ‘round’, ‘bevel’}
set_dashes(seq)

Set the dash sequence.

The dash sequence is a sequence of floats of even length describing the length of dashes and spaces in points.

For example, (5, 2, 1, 2) describes a sequence of 5 point and 1 point dashes separated by 2 point spaces.

Parameters
seqsequence of floats (on/off ink in points) or (None, None)

If seq is empty or (None, None), the linestyle will be set to solid.

set_data(*args)

Set the x and y data.

Parameters
*args(2, N) array or two 1D arrays
set_drawstyle(drawstyle)

Set the drawstyle of the plot.

The drawstyle determines how the points are connected.

Parameters
drawstyle{‘default’, ‘steps’, ‘steps-pre’, ‘steps-mid’, ‘steps-post’}, default: ‘default’

For ‘default’, the points are connected with straight lines.

The steps variants connect the points with step-like lines, i.e. horizontal lines with vertical steps. They differ in the location of the step:

  • ‘steps-pre’: The step is at the beginning of the line segment, i.e. the line will be at the y-value of point to the right.

  • ‘steps-mid’: The step is halfway between the points.

  • ‘steps-post: The step is at the end of the line segment, i.e. the line will be at the y-value of the point to the left.

  • ‘steps’ is equal to ‘steps-pre’ and is maintained for backward-compatibility.

For examples see /gallery/lines_bars_and_markers/step_demo.

set_ds(drawstyle)

Alias for set_drawstyle.

set_fillstyle(fs)

Set the marker fill style.

Parameters
fs{‘full’, ‘left’, ‘right’, ‘bottom’, ‘top’, ‘none’}

Possible values:

  • ‘full’: Fill the whole marker with the markerfacecolor.

  • ‘left’, ‘right’, ‘bottom’, ‘top’: Fill the marker half at the given side with the markerfacecolor. The other half of the marker is filled with markerfacecoloralt.

  • ‘none’: No filling.

For examples see marker_fill_styles.

set_linestyle(ls)

Set the linestyle of the line.

Parameters
ls{‘-’, ‘–’, ‘-.’, ‘:’, ‘’, (offset, on-off-seq), …}

Possible values:

  • A string:

    linestyle

    description

    '-' or 'solid'

    solid line

    '--' or 'dashed'

    dashed line

    '-.' or 'dashdot'

    dash-dotted line

    ':' or 'dotted'

    dotted line

    'none', 'None', ' ', or ''

    draw nothing

  • Alternatively a dash tuple of the following form can be provided:

    (offset, onoffseq)
    

    where onoffseq is an even length tuple of on and off ink in points. See also set_dashes().

For examples see /gallery/lines_bars_and_markers/linestyles.

set_linewidth(w)

Set the line width in points.

Parameters
wfloat

Line width, in points.

set_ls(ls)

Alias for set_linestyle.

set_lw(w)

Alias for set_linewidth.

set_marker(marker)

Set the line marker.

Parameters
markermarker style string, ~.path.Path or ~.markers.MarkerStyle

See ~matplotlib.markers for full description of possible arguments.

set_markeredgecolor(ec)

Set the marker edge color.

Parameters
eccolor
set_markeredgewidth(ew)

Set the marker edge width in points.

Parameters
ewfloat

Marker edge width, in points.

set_markerfacecolor(fc)

Set the marker face color.

Parameters
fccolor
set_markerfacecoloralt(fc)

Set the alternate marker face color.

Parameters
fccolor
set_markersize(sz)

Set the marker size in points.

Parameters
szfloat

Marker size, in points.

set_markevery(every)

Set the markevery property to subsample the plot when using markers.

e.g., if every=5, every 5-th marker will be plotted.

Parameters
everyNone or int or (int, int) or slice or list[int] or float or (float, float) or list[bool]

Which markers to plot.

  • every=None: every point will be plotted.

  • every=N: every N-th marker will be plotted starting with marker 0.

  • every=(start, N): every N-th marker, starting at index start, will be plotted.

  • every=slice(start, end, N): every N-th marker, starting at index start, up to but not including index end, will be plotted.

  • every=[i, j, m, ...]: only markers at the given indices will be plotted.

  • every=[True, False, True, ...]: only positions that are True will be plotted. The list must have the same length as the data points.

  • every=0.1, (i.e. a float): markers will be spaced at approximately equal visual distances along the line; the distance along the line between markers is determined by multiplying the display-coordinate distance of the axes bounding-box diagonal by the value of every.

  • every=(0.5, 0.1) (i.e. a length-2 tuple of float): similar to every=0.1 but the first marker will be offset along the line by 0.5 multiplied by the display-coordinate-diagonal-distance along the line.

For examples see /gallery/lines_bars_and_markers/markevery_demo.

Notes

Setting markevery will still only draw markers at actual data points. While the float argument form aims for uniform visual spacing, it has to coerce from the ideal spacing to the nearest available data point. Depending on the number and distribution of data points, the result may still not look evenly spaced.

When using a start offset to specify the first marker, the offset will be from the first data point which may be different from the first the visible data point if the plot is zoomed in.

If zooming in on a plot when using float arguments then the actual data points that have markers will change because the distance between markers is always determined from the display-coordinates axes-bounding-box-diagonal regardless of the actual axes data limits.

set_mec(ec)

Alias for set_markeredgecolor.

set_mew(ew)

Alias for set_markeredgewidth.

set_mfc(fc)

Alias for set_markerfacecolor.

set_mfcalt(fc)

Alias for set_markerfacecoloralt.

set_ms(sz)

Alias for set_markersize.

set_picker(p)

Set the event picker details for the line.

Parameters
pfloat or callable[[Artist, Event], tuple[bool, dict]]

If a float, it is used as the pick radius in points.

set_pickradius(d)

Set the pick radius used for containment tests.

See .contains for more details.

Parameters
dfloat

Pick radius, in points.

set_solid_capstyle(s)

How to draw the end caps if the line is solid (not ~Line2D.is_dashed)

Parameters
s.CapStyle or {‘butt’, ‘projecting’, ‘round’}
set_solid_joinstyle(s)

How to join segments if the line is solid (not ~Line2D.is_dashed).

Parameters
s.JoinStyle or {‘miter’, ‘round’, ‘bevel’}
set_transform(t)

Set the artist transform.

Parameters
t.Transform
set_xdata(x)

Set the data array for x.

Parameters
x1D array
set_ydata(y)

Set the data array for y.

Parameters
y1D array
update_from(other)

Copy properties from other to self.

validCap = ('butt', 'projecting', 'round')
validJoin = ('miter', 'round', 'bevel')
zorder = 2
cosmic.plotting.a_from_p(p, m1, m2)

Computes the separation from orbital period with KEPLER III

Parameters
pfloat/array

orbital period [day]

m1float/array

primary mass [msun]

m2float/array

secondary mass [msun]

Returns
sepfloat/array

separation [rsun]

cosmic.plotting.calc_Roche_radius(M1, M2, A)

Get Roche lobe radius (Eggleton 1983)

Parameters
M1float

Primary mass [any unit]

M2float

Secondary mass [any unit]

Afloat

Orbital separation [any unit]

Returns
Roche radiusfloat

in units of input ‘A’

cosmic.plotting.evolve_and_plot(initC, t_min=None, t_max=None, BSEDict=None, sys_obs={})

Evolve and plot binaries as a function of time

Parameters
initCpandas.DataFrame

initial conditions for binary to evolve

t_minfloat or list

starting time for plot in Myr

t_maxfloat or list

ending time for plot in Myr

BSEDictDict

Dictionary containing all BSE flags needed

sys_obsDict

Dictionary containing keys for binary parameters with values to plot as vertical lines for each stellar component

Returns
all_figslist

list of all figures created

cosmic.plotting.evolve_binary(initC, t_min=None, t_max=None, BSEDict={})

Evolves a single binary with all timesteps written to the bcm array for plotting

Parameters
initCpandas.DataFrame

initial conditions for binary to evolve

t_minfloat

starting time for plot in Myr

t_maxfloat

ending time for plot in Myr

BSEDictDict

Dictionary containing all BSE flags needed

Returns
bcmpandas.DataFrame

binary evolution data form BSE’s bcm dict

cosmic.plotting.plot_HR_diagram(ax, L1_out, L2_out, Teff1_out, Teff2_out)

Plots the eccentricity as a function of time

Parameters
axmatplotlib.Axes

Axis instance for the plot

timespandas.Series

Series of times at each binary evolution time step in Myr

L1_outpandas.Series

Series of primary luminosities at each binary evolution time step in Lsun

L2_outpandas.Series

Series of secondary luminosities at each binary evolution time step in Lsun

Teff1_outpandas.Series

Series of primary effective temperature at each binary evolution time step in K

Teff2_outpandas.Series

Series of secondary effective temperature at each binary evolution time step in K

sys_obsDict

Dictionary containing keys for binary parameters with values to plot as vertical lines for each stellar component

Returns
Null
cosmic.plotting.plot_Mdot(ax, times, Mdot1_out, Mdot2_out, legend=True)

Plots the stellar effectvie temperature as a function of time

Parameters
axmatplotlib.Axes

Axis instance for the plot

timespandas.Series

Series of times at each binary evolution time step in Myr

Mdot1_outpandas.Series

Series of primary mass transfer rate at each binary evolution time step in Msun/yr

Mdot2_outpandas.Series

Series of secondary mass transfer rate at each binary evolution time step in Msun/yr

sys_obsDict

Dictionary containing keys for binary parameters with values to plot as vertical lines for each stellar component

Returns
Null
cosmic.plotting.plot_P_orb(ax, times, P_orb_out, t_max, sys_obs)

Plots the orbital period as a function of time

Parameters
axmatplotlib.Axes

Axis instance for the plot

timespandas.Series

Series of times at each binary evolution time step in Myr

P_orb_outpandas.Series

Series of orbital periods at each binary evolution time step in days

t_maxfloat

ending time for plot in Myr

sys_obsDict

Dictionary containing keys for binary parameters with values to plot as vertical lines for each stellar component

Returns
Null
cosmic.plotting.plot_Teff(ax, times, Teff1_out, Teff2_out, sys_obs)

Plots the stellar effectvie temperature as a function of time

Parameters
axmatplotlib.Axes

Axis instance for the plot

timespandas.Series

Series of times at each binary evolution time step in Myr

Teff1_outpandas.Series

Series of primary effective temperature at each binary evolution time step in K

Teff2_outpandas.Series

Series of secondary effective temperature at each binary evolution time step in K

sys_obsDict

Dictionary containing keys for binary parameters with values to plot as vertical lines for each stellar component

Returns
Null
cosmic.plotting.plot_binary_evol(bcm, sys_obs={})

Plots the full set of plots and kstar bar plots

Parameters
bcmpandas.DataFrame

binary evolution data form BSE’s bcm dict

sys_obsDict

Dictionary containing keys for binary parameters with values to plot as vertical lines for each stellar component

Returns
figmatplotlib.figure

Figure containing all the plots!

cosmic.plotting.plot_ecc(ax, times, ecc_out, t_max, sys_obs)

Plots the eccentricity as a function of time

Parameters
axmatplotlib.Axes

Axis instance for the plot

timespandas.Series

Series of times at each binary evolution time step in Myr

ecc_outpandas.Series

Series of eccentricities at each binary evolution time step

t_maxfloat

ending time for plot in Myr

sys_obsDict

Dictionary containing keys for binary parameters with values to plot as vertical lines for each stellar component

Returns
Null
cosmic.plotting.plot_k_type(ax_1, ax_2, ax_k_type_list, times, k1_out, k2_out)

Plots the stellar types as a function of time

Parameters
ax_1matplotlib.Axes

Axis instance for kstar 1

ax_2matplotlib.Axes

Axis instance for kstar 2

ax_k_type_listlist

List of ktypes for the legend of the ktype bar plots

timespandas.Series

Series of times at each binary evolution time step in Myr

k1_outpandas.Series

Series of kstar 1 type at each binary evolution time step in Myr

k2_outpandas.Series

Series of kstar 2 type at each binary evolution time step in Myr

Returns
Null
cosmic.plotting.plot_mass(ax, times, M1_out, M2_out, sys_obs)

Plots the stellar mass as a function of time

Parameters
axmatplotlib.Axes

Axis instance for the plot

timespandas.Series

Series of times at each binary evolution time step in Myr

M1_outpandas.Series

Series of primary mass at each binary evolution time step in Msun

M2_outpandas.Series

Series of secondary mass at each binary evolution time step in Msun

sys_obsDict

Dictionary containing keys for binary parameters with values to plot as vertical lines for each stellar component

Returns
Null
cosmic.plotting.plot_radius(ax, times, R1_out, R2_out, M1_out, M2_out, P_orb_out, ecc_out, sys_obs, legend=True)

Plots the stellar radii as a function of time

Parameters
axmatplotlib.Axes

Axis instance for the plot

timespandas.Series

Series of times at each binary evolution time step in Myr

R1_outpandas.Series

Series of primary radius at each binary evolution time step in Rsun

R2_outpandas.Series

Series of secondary radius at each binary evolution time step in Rsun

M1_outpandas.Series

Series of primary mass at each binary evolution time step in Msun

M2_outpandas.Series

Series of secondary mass at each binary evolution time step in Msun

P_orb_outpandas.Series

Series of orbital periods at each binary evolution time step in days

ecc_outpandas.Series

Series of eccentricities at each binary evolution time step

sys_obsDict

Dictionary containing keys for binary parameters with values to plot as vertical lines for each stellar component

Returns
Null