sdapy.snerun.snelist

class sdapy.snerun.snelist(fig=None, ax=None, errors='ignore', updatepar=False, **kwargs)

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

See also

snobject

Notes

Take careful of meta table of snelist, especially their types.

Methods

add_hist(x, y[, nbinx, nbiny, xticks, yticks])

make histograms

add_parameter(**kwargs)

add a parameter

add_subset([syntax, astype])

add a data subset, and corresponding plotting kwargs

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

make parameter into latex format

get_par(objid[, returnname])

get parameter of one SN

init_hist_axes([pad, labelbottom, labelleft])

create 2 subplots as histograms for the scatter plots

load_data(objid[, datafile, reloadclass])

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

parse_meta([withnew, metafile])

Read a meta table from local

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.

parse_meta_one(idkey, objid, key)

Obtain value with object ID and a meta key

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.

read_kwargs(**kwargs)

Define a proper way to read and update optional parameters

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.

save_data(objid[, datafile])

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

show1d([index, style])

1D histograms plot for one parameter

show2d(index1, index2)

2D scatter plot for two parameter

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

make flux plot for a large set of SNe

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

make mag plot for a large set of SNe

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

make colour plot for a large set of SNe

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

make bolometric lc plot for a large set of SNe

showax6([syntax, show_data, show_fits, ...])

velocity evolution plot for a large set of SNe

shownd([syntax])

contour plots for the bestfit value of all parameters

table([syntax, tablepars, tablename, style])

create a latex table for a subset of SNe

__init__(fig=None, ax=None, errors='ignore', updatepar=False, **kwargs)

initialize snelist

Parameters
figmatplotlib.subplot

used for histogram/scatter or other population plots

axmatplotlib.axes

used for histogram/scatter or other population plots

errorsstr

Control raising of exceptions on invalid data for provided dtype.

  • raise : allow exceptions to be raised

  • ignore : suppress exceptions. On error return original object

  • warning : suppress exceptions. On error print it as warning

updateparbool

if update parameter, when reading them

kwargsKeyword Arguments

see https://github.com/saberyoung/HAFFET/blob/master/sdapy/data/default_par.txt, snelist part

Examples

>>> from sdapy import snerun
>>> a = snerun.snelist()
>>> a
<sdapy.snerun.snelist object at 0x7fd6fb805f60>

Methods

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

initialize snelist

add_hist(x, y[, nbinx, nbiny, xticks, yticks])

make histograms

add_parameter(**kwargs)

add a parameter

add_subset([syntax, astype])

add a data subset, and corresponding plotting kwargs

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

make parameter into latex format

get_par(objid[, returnname])

get parameter of one SN

init_hist_axes([pad, labelbottom, labelleft])

create 2 subplots as histograms for the scatter plots

load_data(objid[, datafile, reloadclass])

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

parse_meta([withnew, metafile])

Read a meta table from local

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.

parse_meta_one(idkey, objid, key)

Obtain value with object ID and a meta key

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.

read_kwargs(**kwargs)

Define a proper way to read and update optional parameters

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.

save_data(objid[, datafile])

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

show1d([index, style])

1D histograms plot for one parameter

show2d(index1, index2)

2D scatter plot for two parameter

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

make flux plot for a large set of SNe

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

make mag plot for a large set of SNe

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

make colour plot for a large set of SNe

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

make bolometric lc plot for a large set of SNe

showax6([syntax, show_data, show_fits, ...])

velocity evolution plot for a large set of SNe

shownd([syntax])

contour plots for the bestfit value of all parameters

table([syntax, tablepars, tablename, style])

create a latex table for a subset of SNe

Attributes

parlist

parameter list

version

Static version info