gamma-cat icon indicating copy to clipboard operation
gamma-cat copied to clipboard

Script to get some specific data

Open pdeiml opened this issue 8 years ago • 4 comments

Make an IPython notebook that shows how to get the following data for every TeV source

  • Spectral points
  • How to dump spectral point data to text files
  • Spectral global model (power-law or exp cutoff PL)
  • Integral flux above 20 TeV computed from the spectral model

pdeiml avatar Feb 02 '17 12:02 pdeiml

In the best case, the spectral global model is a plot like this: x-axis: energy [TeV], logarithmic scale y-axis: dN/dE * E^2 in [erg cm-2 s-1], logarithmic scale

pdeiml avatar Feb 08 '17 08:02 pdeiml

I've started to write some docs on how gammapy.catalog works: http://docs.gammapy.org/en/latest/catalog/index.html

I will update http://nbviewer.jupyter.org/github/gammapy/gammapy-extra/blob/master/notebooks/source_catalogs.ipynb a little bit now, but it will remain incomplete.

@pdeiml - That could be useful for you to get started with accessing gamma-cat spectral points and models and plotting them.

Instead of continuing with docs (which is time-consuming), I'll write the script next that prints which spectra we're missing.

cdeil avatar Feb 10 '17 09:02 cdeil

I just pushed the small update to the notebook ... there's an example how to access Gamma-cat here now: http://nbviewer.jupyter.org/github/gammapy/gammapy-extra/blob/master/notebooks/source_catalogs.ipynb#Access-catalogs-and-sources

@adonath - For gamma-cat, currently _make_source_dict returns a Row object, and that gets stored in the data attribute of the GammaCatSourceObject. That's a bug, it should be turned into an OrderedDict like for the other catalogs / objects, no?

I'll try to change / fix this now, but wanted to ping you in case you implemented that and there was a reason for this.

cdeil avatar Feb 10 '17 09:02 cdeil

I've started to add scripts to dump the info and plot a spectrum for each source here: https://github.com/cdeil/gamma-cat-status

cdeil avatar Feb 13 '17 08:02 cdeil