Skip to content

Problems found with Gammapy v0.19 #3673

Answered by registerrier
monicava asked this question in Help
Discussion options

You must be logged in to vote

Hi @monicava ,

  1. Masking gives the error AttributeError: 'WcsNDMap' object has no attribute 'shape'
exclusion_region = CircleSkyRegion(
    center=SkyCoord(183.604, -8.708, unit="deg", frame="galactic"),
    radius=0.5 * u.deg,
)
skydir = target_position.galactic
exclusion_mask = Map.create(
    npix=(150, 150), binsz=0.05, skydir=skydir, proj="TAN", frame="icrs"
)
mask = exclusion_mask.geom.region_mask([exclusion_region], inside=False)
exclusion_mask.data = mask
exclusion_mask.plot();

AttributeError Traceback (most recent call last) /var/folders/y2/ty2m_5q50bsdx5hq513k71pr0000gn/T/ipykernel_21610/2571132427.py in 10 11 mask = exclusion_mask.geom.region_mask([exclusion_region], inside=F…

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
2 replies
@monicava
Comment options

@registerrier
Comment options

Answer selected by adonath
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
8 replies
@monicava
Comment options

@adonath
Comment options

@monicava
Comment options

@monicava
Comment options

@registerrier
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants