gammapy / gamma-cat

An open data collection and source catalog for gamma-ray astronomy
https://gamma-cat.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
15 stars 17 forks source link

Script to get some specific data #70

Open pdeiml opened 7 years ago

pdeiml commented 7 years ago

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

pdeiml commented 7 years ago

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

cdeil commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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