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

Gammapy compatibility completely gone #243

Open mireianievas opened 3 years ago

mireianievas commented 3 years ago

Hi,

There are a few classes that were removed in recent gammapy versions (>0.9) that completely break compatibility in gammacat. In particular, GammaCatResource, GammaCatResourceIndex, GammaCatDataCollection are gone from gammapy.catalog.gammacat.py

I managed to run it with gammapy 0.9 and compile everything, with the following quick and dirty fixes:

gammapy.spectrum.models.py L860: cutoff = np.exp(-(energy lambda_).value) [add the .value at the end, otherwise it is not a proper floating number] gammapy.spectrum.utils.py L261: n = int((logmax - logmin) ndecade) [add the int(), otherwise it is a float and it does not work in subsequent lines]