plotting `ConstantSpatialModel`
See original GitHub issueModels.plot_regions()/plot_positions()
fails if it contains any ConstantSpatialModel
(or ConstantFluxSpatialModel
), with a rather complicated error message. I suppose this is because there is no position
defined for these models.
It would be nice to have this fixed before the 1.0rc release.
A quick solution can be to simply add an exception for ValueError
as well here https://github.com/gammapy/gammapy/blob/a68be851d6523742627ed293aa1122c795680f8e/gammapy/modeling/models/core.py#L918.
Issue Analytics
- State:
- Created a year ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Constant spatial model — gammapy v0.19
Here is an example plot of the model: from gammapy.maps import WcsGeom from gammapy.modeling.models import ( ConstantSpatialModel, Models, ...
Read more >Chapter 9: Spatial Models - Florida State University
Here we show you how to create a spatial framework for combining cyclone data with spatially continuous climate data. The method tessellates the...
Read more >Visualising spatial prior models
This topic covers how to visualize spatial models near a coast. The method for visualizing spatial models can be used for other models....
Read more >8 Plotting spatial data
The base plot method plots data with ellipsoidal coordinates using the equirectangular projection, using a latitude parameter equal to the middle latitude of ......
Read more >Loading and Plotting Spatial Data - TerpConnect
Spatial data objects in R can be rather complex - broadly, a landscape can be ... Load and plot line and polygon shape...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For compatibility with regions 0.6 we have to remove the
np.nan
values anyway. So I’ll do the compatibility update with regions 0.6 and the we see whether the plotting issue remains…OK
Triggers:
Which is raised from matplotlib…