threeML.catalogs package

Submodules

threeML.catalogs.Fermi module

class threeML.catalogs.Fermi.FermiGBMBurstCatalog(update=False)[source]

Bases: VirtualObservatoryCatalog

apply_format(table)[source]
get_detector_information()[source]

Return the detectors used for spectral analysis as well as their background intervals. Peak flux and fluence intervals are also returned as well as best fit models

Returns:

detector information dictionary

get_model(model='band', interval='fluence')[source]

Return the fitted model from the Fermi-LAT GBM catalog in 3ML Model form. You can choose band, comp, plaw, or sbpl models corresponding to the models fitted in the GBM catalog. The interval for the fit can be the ‘fluence’ or ‘peak’ interval

Parameters:
  • model – one of ‘band’ (default), ‘comp’, ‘plaw’, ‘sbpl’

  • interval – ‘peak’ or ‘fluence’ (default)

Returns:

a dictionary of 3ML likelihood models that can be fitted

class threeML.catalogs.Fermi.FermiGBMTriggerCatalog(update=False)[source]

Bases: VirtualObservatoryCatalog

apply_format(table)[source]
class threeML.catalogs.Fermi.FermiLATSourceCatalog(update=False)[source]

Bases: VirtualObservatoryCatalog

apply_format(table)[source]
get_model(use_association_name=True)[source]
class threeML.catalogs.Fermi.FermiLLEBurstCatalog(update=False)[source]

Bases: VirtualObservatoryCatalog

apply_format(table)[source]
class threeML.catalogs.Fermi.ModelFrom3FGL(ra_center, dec_center, *sources)[source]

Bases: Model

fix_point_sources_within_radius(radius, normalization_only=True)[source]

Fixes the parameters for the point sources within the given radius of the center of the search cone

Parameters:
  • radius – radius in degree

  • normalization_only – if True, fixes only the normalization of the source (default: True)

Returns:

none

free_point_sources_within_radius(radius, normalization_only=True)[source]

Free the parameters for the point sources within the given radius of the center of the search cone

Parameters:
  • radius – radius in degree

  • normalization_only – if True, frees only the normalization of the source (default: True)

Returns:

none

threeML.catalogs.FermiGBM module

class threeML.catalogs.FermiGBM.FermiGBMBurstCatalog(update=False)[source]

Bases: VirtualObservatoryCatalog

apply_format(table)[source]
get_detector_information()[source]

Return the detectors used for spectral analysis as well as their background intervals. Peak flux and fluence intervals are also returned as well as best fit models

Returns:

detector information dictionary

get_model(model='band', interval='fluence')[source]

Return the fitted model from the Fermi-LAT GBM catalog in 3ML Model form. You can choose band, comp, plaw, or sbpl models corresponding to the models fitted in the GBM catalog. The interval for the fit can be the ‘fluence’ or ‘peak’ interval

Parameters:
  • model – one of ‘band’ (default), ‘comp’, ‘plaw’, ‘sbpl’

  • interval – ‘peak’ or ‘fluence’ (default)

Returns:

a dictionary of 3ML likelihood models that can be fitted

class threeML.catalogs.FermiGBM.FermiGBMTriggerCatalog(update=False)[source]

Bases: VirtualObservatoryCatalog

apply_format(table)[source]

threeML.catalogs.FermiLAT module

class threeML.catalogs.FermiLAT.FermiLATSourceCatalog(update=False)[source]

Bases: VirtualObservatoryCatalog

apply_format(table)[source]
get_model(use_association_name=True, exposure=None, npred_min=0)[source]

Build the model with FGL sources :param use_association_name: use the name of the associated source (stored in assoc_name column) :param exposure: exposure in cm2 * seconds (can be calculated with gtexposure) :param npred_min: minimum number of predicted events. :return: model

class threeML.catalogs.FermiLAT.FermiPySourceCatalog(catalog_name='4FGL', update=True)[source]

Bases: FermiLATSourceCatalog

Searches for sources in a cone of given radius and center

Parameters:
  • ra – decimal degrees, R.A. of the center of the cone

  • dec – decimal degrees, Dec. of the center of the cone

  • radius – radius in degrees

Returns:

a table with the list of sources

threeML.catalogs.FermiLLE module

class threeML.catalogs.FermiLLE.FermiLLEBurstCatalog(update=False)[source]

Bases: VirtualObservatoryCatalog

apply_format(table)[source]

threeML.catalogs.Swift module

class threeML.catalogs.Swift.SwiftGRBCatalog(update=False)[source]

Bases: VirtualObservatoryCatalog

apply_format(table)[source]
get_other_instrument_information()[source]

Return the detectors used for spectral analysis as well as their background intervals. Peak flux and fluence intervals are also returned as well as best fit models

Returns:

observing information dataframe indexed by source

get_other_observation_information()[source]

returns a structured pandas table containing the other observing instruments, their GCNs and if obtainable, their trigger numbers/ data identifiers. Currently, the trigger number is only obtained for Fermi-LAT-GBM.

Returns:

get_redshift()[source]

Get the redshift and redshift type from the searched sources

Returns:

property other_observing_instruments
query_other_observing_instruments(*instruments)[source]

search for observations that were also seen by the requested instrument. to see what instruments are available, use the .other_observing_instruments call

Parameters:

instruments – other instruments

Returns:

threeML.catalogs.VirtualObservatoryCatalog module

exception threeML.catalogs.VirtualObservatoryCatalog.ConeSearchFailed[source]

Bases: RuntimeError

class threeML.catalogs.VirtualObservatoryCatalog.VirtualObservatoryCatalog(name, url, description)[source]

Bases: object

apply_format(table)[source]

Searches for sources in a cone of given radius and center

Parameters:
  • ra – decimal degrees, R.A. of the center of the cone

  • dec – decimal degrees, Dec. of the center of the cone

  • radius – radius in degrees

Returns:

a table with the list of sources

property dec_center
get_model()[source]
query(query)[source]

query the entire VO table for the given logical argument. Queries are in the form of pandas queries: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.query.html

To obtain a preview of the availble columns, try catalog.variables

Parameters:

query – pandas style query string

Returns:

query_sources(*sources)[source]

query for the specific source names.

Parameters:

sources – source(s) to search for

Returns:

property ra_center
property result

return a searchable pandas dataframe of results from the last query. :return:

search_around_source(source_name, radius)[source]

Search for sources around the named source. The coordinates of the provided source are resolved using the astropy.coordinates.name_resolve facility.

Parameters:
  • source_name – name of the source, like “Crab”

  • radius – radius of the search, in degrees

Returns:

(ra, dec, table), where ra,dec are the coordinates of the source as resolved by astropy, and table is

a table with the list of sources

threeML.catalogs.catalog_utils module

class threeML.catalogs.catalog_utils.ModelFromFGL(ra_center, dec_center, *sources)[source]

Bases: Model

fix_extended_sources_within_radius(radius, normalization_only=True)[source]

Fixes the parameters for the point sources within the given radius of the center of the search cone

Parameters:
  • radius – radius in degree

  • normalization_only – if True, fixes only the normalization of the source (default: True)

Returns:

none

fix_point_sources_within_radius(radius, normalization_only=True)[source]

Fixes the parameters for the point sources within the given radius of the center of the search cone

Parameters:
  • radius – radius in degree

  • normalization_only – if True, fixes only the normalization of the source (default: True)

Returns:

none

free_extended_sources_within_radius(radius, normalization_only=True)[source]

Free the parameters for the point sources within the given radius of the center of the search cone

Parameters:
  • radius – radius in degree

  • normalization_only – if True, frees only the normalization of the source (default: True)

Returns:

none

free_point_sources_within_radius(radius, normalization_only=True)[source]

Free the parameters for the point sources within the given radius of the center of the search cone

Parameters:
  • radius – radius in degree

  • normalization_only – if True, frees only the normalization of the source (default: True)

Returns:

none

Module contents