sdapy.snerun.snelist.parse_meta

snelist.parse_meta(withnew='skip', metafile=None, **kwargs)

Read a meta table from local

Parameters
withnewbool
if meta already exists, and a new meta table comimg:

use [new] meta instead of the original one or [skip] the new one or [merge] them together

sourcestr

which source for metadata: OAC or BTS

metafilestr

if you want to use your own meta, set source to None and input a existing table metafile

syntaxstr

syntax used to make subset of meta table, e.g. type in [“SN Ib”, “SN Ic”], which will only parse all SNe Ibcs

verbosebool

show detailed running informations

idkeystr

object ID column name, e.g. ZTF name or IAU name

idkey1str

meta key1, could be IAU or other externel survey name

sortkeystr

the column used to sort self.meta table

use_aliasbool

use aliasid instead of objid? For ZTF objects, it’s much easier to use ZTFID instead of IAUID, however by default, the objid is IAUID. Set use_alias as True can use ZTFID as objid throughout the following process

rakeystr

meta key for ra

deckeystr

meta key for dec

zkeystr

meta key for redshift

distkeystr

meta key for distance

dmkeystr

meta key for distance module

mkwebvkeystr

meta key for milky way ebv

hostebvkey: `str`

meta key for host ebv

mkwavkeystr

meta key for milky way Av

hostavkeystr

meta key for host Av

typekeystr

meta key for SN type

peaktkeystr

meta key for jd at peak

Examples

>>> from sdapy import snerun
>>> a = snerun.snelist()
>>> a.parse_meta(withnew='skip', source='BTS', metafile=None, syntax='type in ["Ib","Ic"]')
meta 154 objs
>>> print (a.meta)
              alias           ra          dec       peakt    peakfilt  ...   vissave vispeak30    visnow          b    A_V
objid                                                                  ...
ZTF21abmlldj  SN2021uvy  00:29:30.87  +12:06:21.0  1449.86    r        ...   5.177543  8.253165  5.257744 -50.406787  0.185
'''
[154 rows x 20 columns]