snsim.plot_utils

Contains plot functions.

Functions

param_text_box(text_ax, model_name[, sim_par, ...])

Add a text legend with model parameters to the plot.

plot_lc(flux_table, meta[, zp, mag, Jy, ...])

Ploting a lightcurve flux table.

plot_ra_dec(ra, dec[, vpec, field_list, field_dic, ...])

Plot a mollweide map of ra, dec.

Module Contents

snsim.plot_utils.param_text_box(text_ax, model_name, sim_par=None, fit_par=None, pos=[0.01, 0.4])[source]

Add a text legend with model parameters to the plot.

Parameters:
  • text_ax (matplotlib.axes) – Axes where place the text.

  • model_name (str) – The name of the sn model that is used.

  • sim_par (list(float)) – The parameters of the model.

  • fit_par (list(tuple(float,float))) – The fitted parameters and errors.

snsim.plot_utils.plot_lc(flux_table, meta, zp=25.0, mag=False, Jy=False, snc_sim_model=None, snc_fit_model=None, fit_cov=None, residuals=False, bandcol=None, set_main=None, set_res=None, flux_limit=None, phase_limit=[-21, 51], mtpstyle='seaborn-v0_8-deep', dpi=100, savefig=False, savepath='LC', saveformat='png')[source]

Ploting a lightcurve flux table.

Parameters:
  • flux_table (pandas.Series) – The lightcurve to plot.

  • meta (dict.) – The lightcurve meta data.

  • zp (float, default = 25.) – Zeropoint at which rescale the flux.

  • mag (bool) – If True plot the magnitude.

  • Jy (bool) – If True plot the flux in Jansky.

  • snc_sim_model (sncosmo.Model) – Model used to simulate the lightcurve.

  • snc_fit_model (sncosmo.Model) – Model used to fit the lightcurve.

  • fit_cov (numpy.ndarray(float, size=(4, 4))) – sncosmo t0, x0, x1, c covariance matrix from SALT fit.

  • residuals (bool) – If True plot fit residuals.

  • bandcol (dict) – Give the color to use for each band.

  • set_main (dict) – Pass matplotlib options as ax.set(**set_main).

  • set_res (dict) – Same as pass main but for the residuals axis.

  • mtpstyle (str) – The matplotlib style to use.

  • dpi (int) – The dpi to use.

  • savefig (bool) – If true save the figure rather than plot.

  • savepath (str) – The path to save the figure.

  • saveformat (str) – Format to use ex : png, pdf.

snsim.plot_utils.plot_ra_dec(ra, dec, vpec=None, field_list=None, field_dic=None, field_size=None, **kwarg)[source]

Plot a mollweide map of ra, dec.

Parameters:
  • ra (list(float)) – Right Ascension.

  • dec (type) – Declinaison.

  • vpec (type) – Peculiar velocities.

Returns:

Just plot the map.

Return type:

None