pst.pipeline.PstParseTriggers

class pst.pipeline.PstParseTriggers.PstParseTriggers(hpmap=None, fithdr=None, xmlinf=None, defconf=None, logger=None)

PstParseTriggers: Read and process trigger healpix map from a given source

Parameters
hpmaplist

healpix fits for 3d localization

fithdrdict

healpix fits map informations

xmlinfdict

voevent xml file informations

defconfdict

default configure

loggerclass

logger

Returns
pixint or array of int

The healpix pixel numbers. Scalar if all input are scalar, array otherwise. Usual numpy broadcasting rules apply.

See also

pix2ang, pix2vec, vec2pix

Examples

see also https://github.com/saberyoung/pstools/blob/master/notebook/test_triggers.ipynb

>>> import healpy as hp
>>> hp.ang2pix(16, np.pi/2, 0)
1440
>>> print(hp.ang2pix(16, [np.pi/2, np.pi/4, np.pi/2, 0, np.pi], [0., np.pi/4, np.pi/2 + 1e-15, 0, 0]))
[1440  427 1520    0 3068]

Methods

calc_area(self[, cls])

calculate uncertainty region area, unit in sq.

calc_contours(self[, cls])

calculate index in specific confidence levels

coo(self, coo[, wdir, savefits, nside, …])

apply parser on ra, dec, error box obtain hpmap

download_skymap(wdir, tmpfile, url)

Look up URL of sky map, download sky map, and parse FITS file.

fits(self, skymap[, nest])

apply parser on healpix fits or fits url

make_report(self[, style])

make a summary report on input source

parse_root_coo(self, root, nside)

obtain ra,dec,loc

parse_root_skymap(self, root)

obtain healpix fits map via skymap url

root(self, root[, wdir, savefits, nside, coord])

apply parser on root element of the XML document, parsed by lxml.etree

url(self, url[, wdir, savefits])

apply parser on skymap url

xml(self, xml[, wdir, savefits, nside, coord])

apply parser on voenevt XML file

calc_airmas

calc_moon

calc_solar

calc_sun

checkhp

data_list

get

make_hpmap

parse_xml

read_skymap

reset

resetall

run_config

set

calc_area(self, cls=None)

calculate uncertainty region area, unit in sq. deg

calc_contours(self, cls=None)

calculate index in specific confidence levels

coo(self, coo, wdir=None, savefits=None, nside=None, coord=None, nest=None)

apply parser on ra, dec, error box obtain hpmap

static download_skymap(wdir, tmpfile, url)

Look up URL of sky map, download sky map, and parse FITS file.

fits(self, skymap, nest=None)

apply parser on healpix fits or fits url

make_report(self, style=None)

make a summary report on input source

parse_root_coo(self, root, nside)

obtain ra,dec,loc

parse_root_skymap(self, root)

obtain healpix fits map via skymap url

root(self, root, wdir=None, savefits=None, nside=None, coord=None)

apply parser on root element of the XML document, parsed by lxml.etree

url(self, url, wdir=None, savefits=None)

apply parser on skymap url

xml(self, xml, wdir=None, savefits=None, nside=None, coord=None)

apply parser on voenevt XML file