question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cleanup `MapDataset.to_spectrum()`

See original GitHub issue

We currently have MapDataset.to_spectrum() and MapDataset.to_spectrum_dataset. The difference between the two is not very clear from the doc-string.

https://github.com/gammapy/gammapy/blob/1071cedc49ed484776c1bfe00892efcd46375973/gammapy/datasets/map.py#L1242

If I understand correctly, the latter does a containmemt correction for extended sources.

For clarity, we can maybe merge the two, or make to_spectrum hidden?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
adonathcommented, Aug 11, 2021

The reason why it was named MapDataset.to_spectrum() is the consistency with MapDataset.to_image(), which also returns a MapDataset. So one could choose e.g. .to_region_map_dataset() and .to_image_map_dataset().

0reactions
adonathcommented, Aug 16, 2021

Solved by #3471.

Read more comments on GitHub >

github_iconTop Results From Across the Web

gammapy.datasets - GitHub
A Python package for gamma-ray astronomy. Contribute to gammapy/gammapy development by creating an account on GitHub.
Read more >
"Cleanup called..." while loading MNIST Datasets
I'm using TensorFlow to load the MNIST dataset, and it keeps printing "Cleanup called..." on the output cell continuously.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found