burstfit.utils.plotter
plot_1d_fit
def plot_1d_fit(xdata, ydata, function, popt, xlabel=None, ylabel=None, title=None, param_names=[], show=True, save=False, outname="1d_fit_res")
Plot the results of 1D fits
Arguments:
xdata- x value arrayydata- original data valuesfunction- function used for fittingpopt- fit parameters of the functionxlabel- label of x axisylabel- label of y axistitle- title of the plotparam_names- names of the parameters
Returns:
plot_2d_fit
def plot_2d_fit(sgram, function, popt, tsamp, title=None, show=True, save=False, outname="2d_fit_res", outdir=None)
Plot the result of spectrogram fit
Arguments:
sgram- input 2D array of spectrogramfunction- spectrogram function used for fittingpopt- fit parameterstsamp- sampling time (s)title- title of the plot
Returns:
plot_fit_results
def plot_fit_results(sgram, function, popt, tsamp, fstart, foff, mask=None, outsize=None, title=None, show=True, save=False, outname="2d_fit_res", outdir=None, vmin=None, vmax=None)
Arguments:
sgram- Original spectrogram datafunction- spectrogram function used for modelingpopt- parameters for functiontsamp- sampling time (s)fstart- start frequency (MHz)foff- channel bandwidth (MHz)mask- channel mask arrayoutsize- resize the 2D plotstitle- title of the plotshow- to show the plotsave- to save the plotoutname- output name of png fileoutdir- output directory for the plotvmin- minimum range of colormapvmax- maximum range of colormap
Returns:
plot_me
def plot_me(datar, xlabel=None, ylabel=None, title=None)
Generic function to plot 1D or 2D array. Requires SciencePlots.
Arguments:
datar- data to plotxlabel- label of x axisylabel- label of y axistitle- title of the plot
Returns:
plot_mcmc_results
def plot_mcmc_results(samples, name, param_starts, labels, save=False)
Save corner plot of MCMC results
Arguments:
samples- MCMC samples to plotname- output nameparam_starts- mark the initial parameter guesslabels- labels for axessave- to save the corner plot
Returns:
autocorr_plot
def autocorr_plot(n, y, name, save)
Make the autocorrelation plot to visualize convergence of MCMC.
Arguments:
n- iterationsy- autocorrelationsname- outname of plotsave- to save the plot
Returns: