sdapy.snerun.snelist.add_subset¶
- snelist.add_subset(syntax=None, astype={'z': <class 'float'>}, **kwargs)¶
add a data subset, and corresponding plotting kwargs
- Parameters
- syntaxstr
syntax used to make subset of meta table, e.g. type in [“SN Ib”, “SN Ic”], which will only parse all SNe Ibcs
- astypedict
force the syntax column to be a number, or other types for query
- nbinxint, list
histogram bins in x axis
- fontsizestr
figure label font size
- labelpadstr
figure label pad
- labelstr
label for the subset
- colorstr
color for plotting the subset
- lsstr
linestyle for plotting the subset
- markerstr
marker for plotting the subset
- markersizestr
markersize for plotting the subset
- fillstylestr
fillstyle for plotting the subset
Examples
>>> from sdapy import snerun >>> a = snerun.snelist() >>> a.run(syntax='type in ["Ib"]') meta 72 objs 3%|██▋ | 5/154 [00:00<00:18, 7.93it/s] >>> print (a.dset) {} >>> a.add_subset('z>.01') >>> print (a.dset) {'z>.01': {'ZTF21abmlldj': <sdapy.snerun.snobject object at 0x7fd11c9efe80>, 'ZTF19abqxibq': <sdapy.snerun.snobject object at 0x7fd11cbf10b8>, 'ZTF19abcegvm': <sdapy.snerun.snobject object at 0x7fd11dcbdfd0>, 'ZTF19abztknu': <sdapy.snerun.snobject object at 0x7fd11dcc19e8>, 'ZTF20acvebcu': <sdapy.snerun.snobject object at 0x7fd11b4c7be0>, 'ZTF19acgjosf': <sdapy.snerun.snobject object at 0x7fd11cb619b0>, ... ...}}