gbm_drm_gen.io package

Submodules

gbm_drm_gen.io.balrog_drm module

class gbm_drm_gen.io.balrog_drm.BALROG_DRM(drm_generator, ra, dec)[source]

Bases: threeML.utils.OGIP.response.InstrumentResponse

__init__(drm_generator, ra, dec)[source]
Parameters
  • drm_generator – BALROG DRM generator

  • ra – RA of the source

  • dec – DEC of the source

set_location(ra, dec, cache=False)[source]

Set the source location :param ra: :param dec: :return:

set_time(time)[source]

set the time of the source :param time: :return:

gbm_drm_gen.io.balrog_healpix_map module

class gbm_drm_gen.io.balrog_healpix_map.BALROGHealpixMap(analysis_results, nside=32)[source]

Bases: object

__init__(analysis_results, nside=32)[source]
write_map(filename)[source]
property map
property ra
property ra_healpix
property dec

gbm_drm_gen.io.balrog_like module

class gbm_drm_gen.io.balrog_like.BALROGLike(name, observation, drm_generator=None, background=None, time=0, free_position=True, verbose=True, use_cache=False, **kwargs)[source]

Bases: threeML.plugins.DispersionSpectrumLike.DispersionSpectrumLike

__init__(name, observation, drm_generator=None, background=None, time=0, free_position=True, verbose=True, use_cache=False, **kwargs)[source]

BALROGLike is a general plugin for fitting GBM spectra and locations at the same time

Parameters
  • name – plugin name

  • observation – observed spectrum

  • drm_generator – the drm generator for this

  • background – background spectrum

  • time – time of the observation

  • free_position – keep the position free

  • verbose – the verbosity level of the plugin

set_model(likelihoodModel)[source]

Set the model and free the location parameters

Parameters

likelihoodModel

Returns

None

get_model(precalc_fluxes=None)[source]

The model integrated over the energy bins. Note that it only returns the model for the currently active channels/measurements

Returns

array of folded model

classmethod from_spectrumlike(spectrum_like, time, drm_generator=None, free_position=True)[source]

Generate a BALROGlike from an existing SpectrumLike child

Parameters
  • spectrum_like – the existing spectrumlike

  • time – the time to generate the RSPs at

  • drm_generator – optional BALROG DRM generator

  • free_position – if the position should be free

Returns

gbm_drm_gen.io.palantir module

class gbm_drm_gen.io.palantir.Palantir(result, nside=64, trigdat=None, poshist=None, time=0.0)[source]

Bases: object

__init__(result, nside=64, trigdat=None, poshist=None, time=0.0)[source]

View the 3ML BALROG results

Parameters
  • result – 3ML BALROG result

  • nside – power of 2

  • trigdat – optional trigdat files

  • time – time of observation

add_healpix_map(healpix_map, name, cmap)[source]
skymap(*dets, **kwargs)[source]
Parameters
  • dets – optional detectors

  • cmap – colormap for location

  • show_earth – show the earth points

  • width – no idea

  • fov – FOV of GBM detectors

Returns

figure

get_flux_upper_bound(ene_min, ene_max, percentile=95.0)[source]
property healpix_map
property balrog_map

gbm_drm_gen.io.response_generator module

Module contents