snelist – class deal with a list of objects

snelist([fig, ax, errors, updatepar])

snelist: define a list of snobject, handle their data and fittings, aimed for a population study

Below provide various of functions for snelist:

  • General

snelist.__init__([fig, ax, errors, updatepar])

initialize snelist

snelist.version

Static version info

snelist.parlist

parameter list

snelist.read_kwargs(**kwargs)

Define a proper way to read and update optional parameters

snelist.run([ax, ax1, ax2, ax3, ax4, debug])

get a list of SNe, for each SN, define a dedicated snobject, and run snobject.run() for all of them.

  • Meta and cache

snelist.parse_meta([withnew, metafile])

Read a meta table from local

snelist.parse_meta_one(idkey, objid, key)

Obtain value with object ID and a meta key

snelist.parse_meta_all(kwargs, objid)

properly read a list of meta infomations from self.meta, i.e. coordinates self.ra, self.dec, redshift self.z, distance self.dist, distance module self.dm, mkily way extinction self.mkwebv, host galaxy extinction self.hostebv, type self.sntype and peak time self.jdpeak.

snelist.parse_params([clobber, verbose, parfile])

Besides the general parameter settings, for SNe with peculiar properties, a specific parameter is sometimes needed, and parse_params can read a text file (individual_par.txt) that includes all special settings for particular SNe.

snelist.load_data(objid[, datafile, reloadclass])

for each object, load their snobject classes if they're cached before.

snelist.save_data(objid[, datafile])

for each object, save their snobject classes to local cached files.

  • Plots and tables

snelist.add_subset([syntax, astype])

add a data subset, and corresponding plotting kwargs

snelist.add_parameter(**kwargs)

add a parameter

snelist.table([syntax, tablepars, ...])

create a latex table for a subset of SNe

snelist.get_par(objid[, returnname])

get parameter of one SN

snelist.format_par(v, vlow, vup[, digits, style])

make parameter into latex format

snelist.show1d([index, style])

1D histograms plot for one parameter

snelist.show2d(index1, index2)

2D scatter plot for two parameter

snelist.shownd([syntax])

contour plots for the bestfit value of all parameters

snelist.init_hist_axes([pad, labelbottom, ...])

create 2 subplots as histograms for the scatter plots

snelist.add_hist(x, y[, nbinx, nbiny, ...])

make histograms

snelist.showax([syntax, show_data, ...])

make flux plot for a large set of SNe

snelist.showax2([syntax, show_data, ...])

make mag plot for a large set of SNe

snelist.showax3([syntax, show_data, ...])

make colour plot for a large set of SNe

snelist.showax4([syntax, show_data, ...])

make bolometric lc plot for a large set of SNe